@@ -136,10 +136,14 @@ define i32 @select_const_i32_from_icmp(ptr %v, i64 %n) {
136136; CHECK-VF1IC4-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP5]], align 4
137137; CHECK-VF1IC4-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP6]], align 4
138138; CHECK-VF1IC4-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP7]], align 4
139- ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP8]], 3
140- ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP9]], 3
141- ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP10]], 3
142- ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = icmp ne i32 [[TMP11]], 3
139+ ; CHECK-VF1IC4-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP8]], 3
140+ ; CHECK-VF1IC4-NEXT: [[TMP17:%.*]] = icmp eq i32 [[TMP9]], 3
141+ ; CHECK-VF1IC4-NEXT: [[TMP18:%.*]] = icmp eq i32 [[TMP10]], 3
142+ ; CHECK-VF1IC4-NEXT: [[TMP19:%.*]] = icmp eq i32 [[TMP11]], 3
143+ ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = xor i1 [[TMP16]], true
144+ ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = xor i1 [[TMP17]], true
145+ ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = xor i1 [[TMP18]], true
146+ ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = xor i1 [[TMP19]], true
143147; CHECK-VF1IC4-NEXT: [[TMP20]] = or i1 [[VEC_PHI]], [[TMP12]]
144148; CHECK-VF1IC4-NEXT: [[TMP21]] = or i1 [[VEC_PHI1]], [[TMP13]]
145149; CHECK-VF1IC4-NEXT: [[TMP22]] = or i1 [[VEC_PHI2]], [[TMP14]]
@@ -512,10 +516,14 @@ define i32 @select_i32_from_icmp(ptr %v, i32 %a, i32 %b, i64 %n) {
512516; CHECK-VF1IC4-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP5]], align 4
513517; CHECK-VF1IC4-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP6]], align 4
514518; CHECK-VF1IC4-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP7]], align 4
515- ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP8]], 3
516- ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP9]], 3
517- ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP10]], 3
518- ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = icmp ne i32 [[TMP11]], 3
519+ ; CHECK-VF1IC4-NEXT: [[TMP16:%.*]] = icmp eq i32 [[TMP8]], 3
520+ ; CHECK-VF1IC4-NEXT: [[TMP17:%.*]] = icmp eq i32 [[TMP9]], 3
521+ ; CHECK-VF1IC4-NEXT: [[TMP18:%.*]] = icmp eq i32 [[TMP10]], 3
522+ ; CHECK-VF1IC4-NEXT: [[TMP19:%.*]] = icmp eq i32 [[TMP11]], 3
523+ ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = xor i1 [[TMP16]], true
524+ ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = xor i1 [[TMP17]], true
525+ ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = xor i1 [[TMP18]], true
526+ ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = xor i1 [[TMP19]], true
519527; CHECK-VF1IC4-NEXT: [[TMP20]] = or i1 [[VEC_PHI]], [[TMP12]]
520528; CHECK-VF1IC4-NEXT: [[TMP21]] = or i1 [[VEC_PHI1]], [[TMP13]]
521529; CHECK-VF1IC4-NEXT: [[TMP22]] = or i1 [[VEC_PHI2]], [[TMP14]]
@@ -700,10 +708,14 @@ define i32 @select_const_i32_from_fcmp_fast(ptr %v, i64 %n) {
700708; CHECK-VF1IC4-NEXT: [[TMP9:%.*]] = load float, ptr [[TMP5]], align 4
701709; CHECK-VF1IC4-NEXT: [[TMP10:%.*]] = load float, ptr [[TMP6]], align 4
702710; CHECK-VF1IC4-NEXT: [[TMP11:%.*]] = load float, ptr [[TMP7]], align 4
703- ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = fcmp fast one float [[TMP8]], 3.000000e+00
704- ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = fcmp fast one float [[TMP9]], 3.000000e+00
705- ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = fcmp fast one float [[TMP10]], 3.000000e+00
706- ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = fcmp fast one float [[TMP11]], 3.000000e+00
711+ ; CHECK-VF1IC4-NEXT: [[TMP16:%.*]] = fcmp fast ueq float [[TMP8]], 3.000000e+00
712+ ; CHECK-VF1IC4-NEXT: [[TMP17:%.*]] = fcmp fast ueq float [[TMP9]], 3.000000e+00
713+ ; CHECK-VF1IC4-NEXT: [[TMP18:%.*]] = fcmp fast ueq float [[TMP10]], 3.000000e+00
714+ ; CHECK-VF1IC4-NEXT: [[TMP19:%.*]] = fcmp fast ueq float [[TMP11]], 3.000000e+00
715+ ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = xor i1 [[TMP16]], true
716+ ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = xor i1 [[TMP17]], true
717+ ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = xor i1 [[TMP18]], true
718+ ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = xor i1 [[TMP19]], true
707719; CHECK-VF1IC4-NEXT: [[TMP20]] = or i1 [[VEC_PHI]], [[TMP12]]
708720; CHECK-VF1IC4-NEXT: [[TMP21]] = or i1 [[VEC_PHI1]], [[TMP13]]
709721; CHECK-VF1IC4-NEXT: [[TMP22]] = or i1 [[VEC_PHI2]], [[TMP14]]
@@ -888,10 +900,14 @@ define i32 @select_const_i32_from_fcmp(ptr %v, i64 %n) {
888900; CHECK-VF1IC4-NEXT: [[TMP9:%.*]] = load float, ptr [[TMP5]], align 4
889901; CHECK-VF1IC4-NEXT: [[TMP10:%.*]] = load float, ptr [[TMP6]], align 4
890902; CHECK-VF1IC4-NEXT: [[TMP11:%.*]] = load float, ptr [[TMP7]], align 4
891- ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = fcmp one float [[TMP8]], 3.000000e+00
892- ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = fcmp one float [[TMP9]], 3.000000e+00
893- ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = fcmp one float [[TMP10]], 3.000000e+00
894- ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = fcmp one float [[TMP11]], 3.000000e+00
903+ ; CHECK-VF1IC4-NEXT: [[TMP16:%.*]] = fcmp ueq float [[TMP8]], 3.000000e+00
904+ ; CHECK-VF1IC4-NEXT: [[TMP17:%.*]] = fcmp ueq float [[TMP9]], 3.000000e+00
905+ ; CHECK-VF1IC4-NEXT: [[TMP18:%.*]] = fcmp ueq float [[TMP10]], 3.000000e+00
906+ ; CHECK-VF1IC4-NEXT: [[TMP19:%.*]] = fcmp ueq float [[TMP11]], 3.000000e+00
907+ ; CHECK-VF1IC4-NEXT: [[TMP12:%.*]] = xor i1 [[TMP16]], true
908+ ; CHECK-VF1IC4-NEXT: [[TMP13:%.*]] = xor i1 [[TMP17]], true
909+ ; CHECK-VF1IC4-NEXT: [[TMP14:%.*]] = xor i1 [[TMP18]], true
910+ ; CHECK-VF1IC4-NEXT: [[TMP15:%.*]] = xor i1 [[TMP19]], true
895911; CHECK-VF1IC4-NEXT: [[TMP20]] = or i1 [[VEC_PHI]], [[TMP12]]
896912; CHECK-VF1IC4-NEXT: [[TMP21]] = or i1 [[VEC_PHI1]], [[TMP13]]
897913; CHECK-VF1IC4-NEXT: [[TMP22]] = or i1 [[VEC_PHI2]], [[TMP14]]
@@ -1043,7 +1059,8 @@ define i32 @select_i32_from_icmp_same_inputs(i32 %a, i32 %b, i64 %n) {
10431059; CHECK-VF1IC4: [[VECTOR_PH]]:
10441060; CHECK-VF1IC4-NEXT: [[N_MOD_VF:%.*]] = urem i64 [[N]], 4
10451061; CHECK-VF1IC4-NEXT: [[N_VEC:%.*]] = sub i64 [[N]], [[N_MOD_VF]]
1046- ; CHECK-VF1IC4-NEXT: [[TMP0:%.*]] = icmp ne i32 [[A]], 3
1062+ ; CHECK-VF1IC4-NEXT: [[TMP1:%.*]] = icmp eq i32 [[A]], 3
1063+ ; CHECK-VF1IC4-NEXT: [[TMP0:%.*]] = xor i1 [[TMP1]], true
10471064; CHECK-VF1IC4-NEXT: br label %[[VECTOR_BODY:.*]]
10481065; CHECK-VF1IC4: [[VECTOR_BODY]]:
10491066; CHECK-VF1IC4-NEXT: [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[VECTOR_BODY]] ]
0 commit comments