[clang] be1516d - [PowerPC] Precommit test of `vec_promote` on `vector char`. NFC.

Kai Luo via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 21 21:16:36 PDT 2023


Author: Kai Luo
Date: 2023-08-22T04:14:34Z
New Revision: be1516d46b1c9ad873d1b30b3494c3a3d0d8e02b

URL: https://github.com/llvm/llvm-project/commit/be1516d46b1c9ad873d1b30b3494c3a3d0d8e02b
DIFF: https://github.com/llvm/llvm-project/commit/be1516d46b1c9ad873d1b30b3494c3a3d0d8e02b.diff

LOG: [PowerPC] Precommit test of `vec_promote` on `vector char`. NFC.

Added: 
    

Modified: 
    clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c b/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
index 790f886985a9f5..89c361454a421b 100644
--- a/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
+++ b/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
@@ -2247,6 +2247,22 @@ res_vull = vec_promote(ull, 0);
 // CHECK: insertelement <2 x i64>
 // CHECK-LE: store <2 x i64> zeroinitializer
 // CHECK-LE: insertelement <2 x i64>
+
+res_vsc = vec_promote(asc[0], 8);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: [[IDX:%.*]] = and i32 {{.*}}, 7
+// CHECK: insertelement <16 x i8> {{.*}}, i8 {{.*}}, i32 [[IDX]]
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: [[IDX:%.*]] = and i32 {{.*}}, 7
+// CHECK-LE: insertelement <16 x i8> {{.*}}, i8 {{.*}}, i32 [[IDX]]
+
+res_vuc = vec_promote(auc[0], 8);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: [[IDX:%.*]] = and i32 {{.*}}, 7
+// CHECK: insertelement <16 x i8> {{.*}}, i8 {{.*}}, i32 [[IDX]]
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: [[IDX:%.*]] = and i32 {{.*}}, 7
+// CHECK-LE: insertelement <16 x i8> {{.*}}, i8 {{.*}}, i32 [[IDX]]
 }
 
 // The return type of the call expression may be 
diff erent from the return type of the shufflevector.


        


More information about the cfe-commits mailing list