@@ -166,6 +166,17 @@ define <2 x i32> @test_vectors_sext(<2 x i1> %cca, <2 x i1> %ccb) {
166
166
ret <2 x i32 > %r
167
167
}
168
168
169
+ define <2 x i32 > @test_vectors_sext_nonsplat (<2 x i1 > %cca , <2 x i1 > %ccb ) {
170
+ ; CHECK-LABEL: @test_vectors_sext_nonsplat(
171
+ ; CHECK-NEXT: [[CCAX:%.*]] = sext <2 x i1> %cca to <2 x i32>
172
+ ; CHECK-NEXT: [[R:%.*]] = select <2 x i1> %ccb, <2 x i32> [[CCAX]], <2 x i32> <i32 0, i32 -1>
173
+ ; CHECK-NEXT: ret <2 x i32> [[R]]
174
+ ;
175
+ %ccax = sext <2 x i1 > %cca to <2 x i32 >
176
+ %r = select <2 x i1 > %ccb , <2 x i32 > %ccax , <2 x i32 > <i32 0 , i32 -1 >
177
+ ret <2 x i32 > %r
178
+ }
179
+
169
180
define <2 x i32 > @test_vectors_zext (<2 x i1 > %cca , <2 x i1 > %ccb ) {
170
181
; CHECK-LABEL: @test_vectors_zext(
171
182
; CHECK-NEXT: [[FOLD_R:%.*]] = and <2 x i1> %ccb, %cca
@@ -177,6 +188,17 @@ define <2 x i32> @test_vectors_zext(<2 x i1> %cca, <2 x i1> %ccb) {
177
188
ret <2 x i32 > %r
178
189
}
179
190
191
+ define <2 x i32 > @test_vectors_zext_nonsplat (<2 x i1 > %cca , <2 x i1 > %ccb ) {
192
+ ; CHECK-LABEL: @test_vectors_zext_nonsplat(
193
+ ; CHECK-NEXT: [[CCAX:%.*]] = zext <2 x i1> %cca to <2 x i32>
194
+ ; CHECK-NEXT: [[R:%.*]] = select <2 x i1> %ccb, <2 x i32> [[CCAX]], <2 x i32> <i32 1, i32 0>
195
+ ; CHECK-NEXT: ret <2 x i32> [[R]]
196
+ ;
197
+ %ccax = zext <2 x i1 > %cca to <2 x i32 >
198
+ %r = select <2 x i1 > %ccb , <2 x i32 > %ccax , <2 x i32 > <i32 1 , i32 0 >
199
+ ret <2 x i32 > %r
200
+ }
201
+
180
202
define <2 x i32 > @scalar_select_of_vectors_sext (<2 x i1 > %cca , i1 %ccb ) {
181
203
; CHECK-LABEL: @scalar_select_of_vectors_sext(
182
204
; CHECK-NEXT: [[FOLD_R:%.*]] = select i1 %ccb, <2 x i1> %cca, <2 x i1> zeroinitializer
0 commit comments