Skip to content

Commit a8b9c93

Browse files
committed
[InstSimplify] add test for select of vector constants; NFC
1 parent 3ae38d9 commit a8b9c93

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/test/Transforms/InstSimplify/select.ll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ define <3 x float> @equal_arms_vec_less_undef(<3 x i1> %cond) {
7575
ret <3 x float> %V
7676
}
7777

78+
define <3 x float> @equal_arms_vec_more_undef(<3 x i1> %cond) {
79+
; CHECK-LABEL: @equal_arms_vec_more_undef(
80+
; CHECK-NEXT: [[V:%.*]] = select <3 x i1> [[COND:%.*]], <3 x float> <float 4.200000e+01, float undef, float undef>, <3 x float> <float undef, float undef, float 4.300000e+01>
81+
; CHECK-NEXT: ret <3 x float> [[V]]
82+
;
83+
%V = select <3 x i1> %cond, <3 x float> <float 42.0, float undef, float undef>, <3 x float> <float undef, float undef, float 43.0>
84+
ret <3 x float> %V
85+
}
86+
7887
define <2 x i8> @vsel_tvec(<2 x i8> %x, <2 x i8> %y) {
7988
; CHECK-LABEL: @vsel_tvec(
8089
; CHECK-NEXT: ret <2 x i8> [[X:%.*]]

0 commit comments

Comments
 (0)