ret void
}
+define <3 x i4> @partial_undef_vec() {
+; CHECK-LABEL: @partial_undef_vec(
+; CHECK-NEXT: [[F:%.*]] = freeze <3 x i4> <i4 poison, i4 1, i4 undef>
+; CHECK-NEXT: ret <3 x i4> [[F]]
+;
+ %f = freeze <3 x i4> <i4 poison, i4 1, i4 undef>
+ ret <3 x i4> %f
+}
+
; Move the freeze forward to prevent poison from spreading.
define i32 @early_freeze_test1(i32 %x, i32 %y) {
define i32 @propagate_drop_flags_udiv(i32 %arg) {
; CHECK-LABEL: @propagate_drop_flags_udiv(
; CHECK-NEXT: [[ARG_FR:%.*]] = freeze i32 [[ARG:%.*]]
-; CHECK-NEXT: [[V1:%.*]] = lshr i32 [[ARG_FR]], 1
-; CHECK-NEXT: ret i32 [[V1]]
+; CHECK-NEXT: [[V11:%.*]] = lshr i32 [[ARG_FR]], 1
+; CHECK-NEXT: ret i32 [[V11]]
;
%v1 = udiv exact i32 %arg, 2
%v1.fr = freeze i32 %v1
ret <2 x i8> %s
}
+define <2 x i8> @partial_cond_freeze_constant_false_val_vec(<2 x i8> %x) {
+; CHECK-LABEL: @partial_cond_freeze_constant_false_val_vec(
+; CHECK-NEXT: [[COND_FR:%.*]] = freeze <2 x i1> <i1 true, i1 undef>
+; CHECK-NEXT: [[S:%.*]] = select <2 x i1> [[COND_FR]], <2 x i8> [[X:%.*]], <2 x i8> <i8 1, i8 2>
+; CHECK-NEXT: ret <2 x i8> [[S]]
+;
+ %cond.fr = freeze <2 x i1> <i1 true, i1 undef>
+ %s = select <2 x i1> %cond.fr, <2 x i8> %x, <2 x i8> <i8 1, i8 2>
+ ret <2 x i8> %s
+}
+
+define <2 x i8> @partial_cond_freeze_both_arms_constant_vec() {
+; CHECK-LABEL: @partial_cond_freeze_both_arms_constant_vec(
+; CHECK-NEXT: [[COND_FR:%.*]] = freeze <2 x i1> <i1 false, i1 undef>
+; CHECK-NEXT: [[S:%.*]] = select <2 x i1> [[COND_FR]], <2 x i8> <i8 1, i8 2>, <2 x i8> <i8 42, i8 43>
+; CHECK-NEXT: ret <2 x i8> [[S]]
+;
+ %cond.fr = freeze <2 x i1> <i1 false, i1 undef>
+ %s = select <2 x i1> %cond.fr, <2 x i8> <i8 1, i8 2>, <2 x i8> <i8 42, i8 43>
+ ret <2 x i8> %s
+}
+
declare void @foo2(i8, i8)
define void @cond_freeze_multipleuses(i8 %x, i8 %y) {