@@ -2642,6 +2642,28 @@ define <2 x i8> @partial_cond_freeze_constant_true_val_vec(<2 x i8> %x) {
2642
2642
ret <2 x i8 > %s
2643
2643
}
2644
2644
2645
+ define <2 x i8 > @partial_cond_freeze_constant_false_val_vec (<2 x i8 > %x ) {
2646
+ ; CHECK-LABEL: @partial_cond_freeze_constant_false_val_vec(
2647
+ ; CHECK-NEXT: [[COND_FR:%.*]] = freeze <2 x i1> <i1 true, i1 undef>
2648
+ ; CHECK-NEXT: [[S:%.*]] = select <2 x i1> [[COND_FR]], <2 x i8> [[X:%.*]], <2 x i8> <i8 1, i8 2>
2649
+ ; CHECK-NEXT: ret <2 x i8> [[S]]
2650
+ ;
2651
+ %cond.fr = freeze <2 x i1 > <i1 true , i1 undef >
2652
+ %s = select <2 x i1 > %cond.fr , <2 x i8 > %x , <2 x i8 > <i8 1 , i8 2 >
2653
+ ret <2 x i8 > %s
2654
+ }
2655
+
2656
+ define <2 x i8 > @partial_cond_freeze_both_arms_constant_vec () {
2657
+ ; CHECK-LABEL: @partial_cond_freeze_both_arms_constant_vec(
2658
+ ; CHECK-NEXT: [[COND_FR:%.*]] = freeze <2 x i1> <i1 false, i1 undef>
2659
+ ; CHECK-NEXT: [[S:%.*]] = select <2 x i1> [[COND_FR]], <2 x i8> <i8 1, i8 2>, <2 x i8> <i8 42, i8 43>
2660
+ ; CHECK-NEXT: ret <2 x i8> [[S]]
2661
+ ;
2662
+ %cond.fr = freeze <2 x i1 > <i1 false , i1 undef >
2663
+ %s = select <2 x i1 > %cond.fr , <2 x i8 > <i8 1 , i8 2 >, <2 x i8 > <i8 42 , i8 43 >
2664
+ ret <2 x i8 > %s
2665
+ }
2666
+
2645
2667
declare void @foo2 (i8 , i8 )
2646
2668
2647
2669
define void @cond_freeze_multipleuses (i8 %x , i8 %y ) {
0 commit comments