@@ -934,6 +934,39 @@ void foo14() {
934
934
// LLVM: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
935
935
936
936
// OGCG: %[[VEC_A:.*]] = alloca <4 x float>, align 16
937
+ // OGCG: %[[VEC_B:.*]] = alloca <4 x float>, align 16
938
+ // OGCG: store <4 x float> <float {{.*}}, float {{.*}}, float {{.*}}, float {{.*}}>, ptr %[[VEC_A]], align 16
939
+ // OGCG: store <4 x float> <float {{.*}}, float {{.*}}, float {{.*}}, float {{.*}}>, ptr %[[VEC_B]], align 16
940
+ // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
941
+ // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
942
+ // OGCG: %[[EQ:.*]] = fcmp oeq <4 x float> %[[TMP_A]], %[[TMP_B]]
943
+ // OGCG: %[[RES:.*]] = sext <4 x i1> %[[EQ]] to <4 x i32>
944
+ // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
945
+ // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
946
+ // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
947
+ // OGCG: %[[NE:.*]] = fcmp une <4 x float> %[[TMP_A]], %[[TMP_B]]
948
+ // OGCG: %[[RES:.*]] = sext <4 x i1> %[[NE]] to <4 x i32>
949
+ // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
950
+ // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
951
+ // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
952
+ // OGCG: %[[LT:.*]] = fcmp olt <4 x float> %[[TMP_A]], %[[TMP_B]]
953
+ // OGCG: %[[RES:.*]] = sext <4 x i1> %[[LT]] to <4 x i32>
954
+ // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
955
+ // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
956
+ // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
957
+ // OGCG: %[[GT:.*]] = fcmp ogt <4 x float> %[[TMP_A]], %[[TMP_B]]
958
+ // OGCG: %[[RES:.*]] = sext <4 x i1> %[[GT]] to <4 x i32>
959
+ // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
960
+ // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
961
+ // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
962
+ // OGCG: %[[LE:.*]] = fcmp ole <4 x float> %[[TMP_A]], %[[TMP_B]]
963
+ // OGCG: %[[RES:.*]] = sext <4 x i1> %[[LE]] to <4 x i32>
964
+ // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
965
+ // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
966
+ // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
967
+ // OGCG: %[[GE:.*]] = fcmp oge <4 x float> %[[TMP_A]], %[[TMP_B]]
968
+ // OGCG: %[[RES:.*]] = sext <4 x i1> %[[GE]] to <4 x i32>
969
+ // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
937
970
938
971
void foo16 () {
939
972
vi4 a = {1 , 2 , 3 , 4 };
@@ -953,24 +986,24 @@ void foo16() {
953
986
// CIR: %[[CONST_4:.*]] = cir.const #cir.int<4> : !s32i
954
987
// CIR: %[[VEC_A_VAL:.*]] = cir.vec.create(%[[CONST_1]], %[[CONST_2]], %[[CONST_3]], %[[CONST_4]] :
955
988
// CIR-SAME: !s32i, !s32i, !s32i, !s32i) : !cir.vector<4 x !s32i>
956
- // CIR: cir.store %[[VEC_A_VAL]], %[[VEC_A]] : !cir.vector<4 x !s32i>, !cir.ptr<!cir.vector<4 x !s32i>>
957
- // CIR: %[[TMP_A:.*]] = cir.load %[[VEC_A]] : !cir.ptr<!cir.vector<4 x !s32i>>, !cir.vector<4 x !s32i>
989
+ // CIR: cir.store{{.*}} %[[VEC_A_VAL]], %[[VEC_A]] : !cir.vector<4 x !s32i>, !cir.ptr<!cir.vector<4 x !s32i>>
990
+ // CIR: %[[TMP_A:.*]] = cir.load{{.*}} %[[VEC_A]] : !cir.ptr<!cir.vector<4 x !s32i>>, !cir.vector<4 x !s32i>
958
991
// CIR: %[[SH_AMOUNT:.*]] = cir.const #cir.int<3> : !s32i
959
992
// CIR: %[[SPLAT_VEC:.*]] = cir.vec.splat %[[SH_AMOUNT]] : !s32i, !cir.vector<4 x !s32i>
960
993
// CIR: %[[SHL:.*]] = cir.shift(left, %[[TMP_A]] : !cir.vector<4 x !s32i>, %[[SPLAT_VEC]] : !cir.vector<4 x !s32i>) -> !cir.vector<4 x !s32i>
961
- // CIR: cir.store %[[SHL]], %[[SHL_RES]] : !cir.vector<4 x !s32i>, !cir.ptr<!cir.vector<4 x !s32i>>
994
+ // CIR: cir.store{{.*}} %[[SHL]], %[[SHL_RES]] : !cir.vector<4 x !s32i>, !cir.ptr<!cir.vector<4 x !s32i>>
962
995
// CIR: %[[CONST_1:.*]] = cir.const #cir.int<1> : !u32i
963
996
// CIR: %[[CONST_2:.*]] = cir.const #cir.int<2> : !u32i
964
997
// CIR: %[[CONST_3:.*]] = cir.const #cir.int<3> : !u32i
965
998
// CIR: %[[CONST_4:.*]] = cir.const #cir.int<4> : !u32i
966
999
// CIR: %[[VEC_B_VAL:.*]] = cir.vec.create(%[[CONST_1]], %[[CONST_2]], %[[CONST_3]], %[[CONST_4]] :
967
1000
// CIR-SAME: !u32i, !u32i, !u32i, !u32i) : !cir.vector<4 x !u32i>
968
- // CIR: cir.store %[[VEC_B_VAL]], %[[VEC_B]] : !cir.vector<4 x !u32i>, !cir.ptr<!cir.vector<4 x !u32i>>
969
- // CIR: %[[TMP_B:.*]] = cir.load %[[VEC_B]] : !cir.ptr<!cir.vector<4 x !u32i>>, !cir.vector<4 x !u32i>
1001
+ // CIR: cir.store{{.*}} %[[VEC_B_VAL]], %[[VEC_B]] : !cir.vector<4 x !u32i>, !cir.ptr<!cir.vector<4 x !u32i>>
1002
+ // CIR: %[[TMP_B:.*]] = cir.load{{.*}} %[[VEC_B]] : !cir.ptr<!cir.vector<4 x !u32i>>, !cir.vector<4 x !u32i>
970
1003
// CIR: %[[SH_AMOUNT:.*]] = cir.const #cir.int<3> : !u32i
971
1004
// CIR: %[[SPLAT_VEC:.*]] = cir.vec.splat %[[SH_AMOUNT]] : !u32i, !cir.vector<4 x !u32i>
972
1005
// CIR: %[[SHR:.*]] = cir.shift(right, %[[TMP_B]] : !cir.vector<4 x !u32i>, %[[SPLAT_VEC]] : !cir.vector<4 x !u32i>) -> !cir.vector<4 x !u32i>
973
- // CIR: cir.store %[[SHR]], %[[SHR_RES]] : !cir.vector<4 x !u32i>, !cir.ptr<!cir.vector<4 x !u32i>>
1006
+ // CIR: cir.store{{.*}} %[[SHR]], %[[SHR_RES]] : !cir.vector<4 x !u32i>, !cir.ptr<!cir.vector<4 x !u32i>>
974
1007
975
1008
// LLVM: %[[VEC_A:.*]] = alloca <4 x i32>, i64 1, align 16
976
1009
// LLVM: %[[SHL_RES:.*]] = alloca <4 x i32>, i64 1, align 16
@@ -997,36 +1030,3 @@ void foo16() {
997
1030
// OGCG: %[[TMP_B:.*]] = load <4 x i32>, ptr %[[VEC_B]], align 16
998
1031
// OGCG: %[[SHR:.*]] = lshr <4 x i32> %[[TMP_B]], splat (i32 3)
999
1032
// OGCG: store <4 x i32> %[[SHR]], ptr %[[SHR_RES]], align 16
1000
- // OGCG: %[[VEC_B:.*]] = alloca <4 x float>, align 16
1001
- // OGCG: store <4 x float> <float {{.*}}, float {{.*}}, float {{.*}}, float {{.*}}>, ptr %[[VEC_A]], align 16
1002
- // OGCG: store <4 x float> <float {{.*}}, float {{.*}}, float {{.*}}, float {{.*}}>, ptr %[[VEC_B]], align 16
1003
- // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
1004
- // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
1005
- // OGCG: %[[EQ:.*]] = fcmp oeq <4 x float> %[[TMP_A]], %[[TMP_B]]
1006
- // OGCG: %[[RES:.*]] = sext <4 x i1> %[[EQ]] to <4 x i32>
1007
- // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
1008
- // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
1009
- // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
1010
- // OGCG: %[[NE:.*]] = fcmp une <4 x float> %[[TMP_A]], %[[TMP_B]]
1011
- // OGCG: %[[RES:.*]] = sext <4 x i1> %[[NE]] to <4 x i32>
1012
- // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
1013
- // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
1014
- // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
1015
- // OGCG: %[[LT:.*]] = fcmp olt <4 x float> %[[TMP_A]], %[[TMP_B]]
1016
- // OGCG: %[[RES:.*]] = sext <4 x i1> %[[LT]] to <4 x i32>
1017
- // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
1018
- // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
1019
- // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
1020
- // OGCG: %[[GT:.*]] = fcmp ogt <4 x float> %[[TMP_A]], %[[TMP_B]]
1021
- // OGCG: %[[RES:.*]] = sext <4 x i1> %[[GT]] to <4 x i32>
1022
- // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
1023
- // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
1024
- // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
1025
- // OGCG: %[[LE:.*]] = fcmp ole <4 x float> %[[TMP_A]], %[[TMP_B]]
1026
- // OGCG: %[[RES:.*]] = sext <4 x i1> %[[LE]] to <4 x i32>
1027
- // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
1028
- // OGCG: %[[TMP_A:.*]] = load <4 x float>, ptr %[[VEC_A]], align 16
1029
- // OGCG: %[[TMP_B:.*]] = load <4 x float>, ptr %[[VEC_B]], align 16
1030
- // OGCG: %[[GE:.*]] = fcmp oge <4 x float> %[[TMP_A]], %[[TMP_B]]
1031
- // OGCG: %[[RES:.*]] = sext <4 x i1> %[[GE]] to <4 x i32>
1032
- // OGCG: store <4 x i32> %[[RES]], ptr {{.*}}, align 16
0 commit comments