1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 ; Instcombine should recognize that this code can be adjusted to fit the canonical max/min pattern.
8 define i32 @smax1(i32 %n) {
10 ; CHECK-NEXT: [[T:%.*]] = icmp sgt i32 %n, 0
11 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
12 ; CHECK-NEXT: ret i32 [[M]]
14 %t = icmp sgt i32 %n, 0
15 %m = select i1 %t, i32 %n, i32 0
21 define i32 @smin1(i32 %n) {
22 ; CHECK-LABEL: @smin1(
23 ; CHECK-NEXT: [[T:%.*]] = icmp slt i32 %n, 0
24 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
25 ; CHECK-NEXT: ret i32 [[M]]
27 %t = icmp slt i32 %n, 0
28 %m = select i1 %t, i32 %n, i32 0
32 ; Canonicalize min/max.
34 define i32 @smax2(i32 %n) {
35 ; CHECK-LABEL: @smax2(
36 ; CHECK-NEXT: [[T:%.*]] = icmp sgt i32 %n, 0
37 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
38 ; CHECK-NEXT: ret i32 [[M]]
40 %t = icmp sge i32 %n, 1
41 %m = select i1 %t, i32 %n, i32 0
45 ; Canonicalize min/max.
47 define i32 @smin2(i32 %n) {
48 ; CHECK-LABEL: @smin2(
49 ; CHECK-NEXT: [[T:%.*]] = icmp slt i32 %n, 0
50 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
51 ; CHECK-NEXT: ret i32 [[M]]
53 %t = icmp sle i32 %n, -1
54 %m = select i1 %t, i32 %n, i32 0
58 ; Canonicalize min/max.
60 define i32 @smax3(i32 %n) {
61 ; CHECK-LABEL: @smax3(
62 ; CHECK-NEXT: [[T:%.*]] = icmp sgt i32 %n, 0
63 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
64 ; CHECK-NEXT: ret i32 [[M]]
66 %t = icmp sgt i32 %n, -1
67 %m = select i1 %t, i32 %n, i32 0
71 ; Canonicalize min/max.
73 define <2 x i32> @smax3_vec(<2 x i32> %n) {
74 ; CHECK-LABEL: @smax3_vec(
75 ; CHECK-NEXT: [[T:%.*]] = icmp sgt <2 x i32> %n, zeroinitializer
76 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> zeroinitializer
77 ; CHECK-NEXT: ret <2 x i32> [[M]]
79 %t = icmp sgt <2 x i32> %n, <i32 -1, i32 -1>
80 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> zeroinitializer
84 ; Canonicalize min/max.
86 define i32 @smin3(i32 %n) {
87 ; CHECK-LABEL: @smin3(
88 ; CHECK-NEXT: [[T:%.*]] = icmp slt i32 %n, 0
89 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
90 ; CHECK-NEXT: ret i32 [[M]]
92 %t = icmp slt i32 %n, 1
93 %m = select i1 %t, i32 %n, i32 0
97 ; Canonicalize min/max.
99 define <2 x i32> @smin3_vec(<2 x i32> %n) {
100 ; CHECK-LABEL: @smin3_vec(
101 ; CHECK-NEXT: [[T:%.*]] = icmp slt <2 x i32> %n, zeroinitializer
102 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> zeroinitializer
103 ; CHECK-NEXT: ret <2 x i32> [[M]]
105 %t = icmp slt <2 x i32> %n, <i32 1, i32 1>
106 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> zeroinitializer
110 ; Canonicalize min/max.
112 define i32 @umax3(i32 %n) {
113 ; CHECK-LABEL: @umax3(
114 ; CHECK-NEXT: [[T:%.*]] = icmp ugt i32 %n, 5
115 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 5
116 ; CHECK-NEXT: ret i32 [[M]]
118 %t = icmp ugt i32 %n, 4
119 %m = select i1 %t, i32 %n, i32 5
123 ; Canonicalize min/max.
125 define <2 x i32> @umax3_vec(<2 x i32> %n) {
126 ; CHECK-LABEL: @umax3_vec(
127 ; CHECK-NEXT: [[T:%.*]] = icmp ugt <2 x i32> %n, <i32 5, i32 5>
128 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> <i32 5, i32 5>
129 ; CHECK-NEXT: ret <2 x i32> [[M]]
131 %t = icmp ugt <2 x i32> %n, <i32 4, i32 4>
132 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> <i32 5, i32 5>
136 ; Canonicalize min/max.
138 define i32 @umin3(i32 %n) {
139 ; CHECK-LABEL: @umin3(
140 ; CHECK-NEXT: [[T:%.*]] = icmp ult i32 %n, 6
141 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 6
142 ; CHECK-NEXT: ret i32 [[M]]
144 %t = icmp ult i32 %n, 7
145 %m = select i1 %t, i32 %n, i32 6
149 ; Canonicalize min/max.
151 define <2 x i32> @umin3_vec(<2 x i32> %n) {
152 ; CHECK-LABEL: @umin3_vec(
153 ; CHECK-NEXT: [[T:%.*]] = icmp ult <2 x i32> %n, <i32 6, i32 6>
154 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> <i32 6, i32 6>
155 ; CHECK-NEXT: ret <2 x i32> [[M]]
157 %t = icmp ult <2 x i32> %n, <i32 7, i32 7>
158 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> <i32 6, i32 6>
162 ; Canonicalize min/max.
164 define i32 @smax4(i32 %n) {
165 ; CHECK-LABEL: @smax4(
166 ; CHECK-NEXT: [[T:%.*]] = icmp sgt i32 %n, 0
167 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
168 ; CHECK-NEXT: ret i32 [[M]]
170 %t = icmp sge i32 %n, 0
171 %m = select i1 %t, i32 %n, i32 0
175 ; Canonicalize min/max.
177 define <2 x i32> @smax4_vec(<2 x i32> %n) {
178 ; CHECK-LABEL: @smax4_vec(
179 ; CHECK-NEXT: [[T:%.*]] = icmp sgt <2 x i32> %n, zeroinitializer
180 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> zeroinitializer
181 ; CHECK-NEXT: ret <2 x i32> [[M]]
183 %t = icmp sge <2 x i32> %n, zeroinitializer
184 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> zeroinitializer
188 ; Canonicalize min/max.
190 define i32 @smin4(i32 %n) {
191 ; CHECK-LABEL: @smin4(
192 ; CHECK-NEXT: [[T:%.*]] = icmp slt i32 %n, 0
193 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 0
194 ; CHECK-NEXT: ret i32 [[M]]
196 %t = icmp sle i32 %n, 0
197 %m = select i1 %t, i32 %n, i32 0
201 ; Canonicalize min/max.
203 define <2 x i32> @smin4_vec(<2 x i32> %n) {
204 ; CHECK-LABEL: @smin4_vec(
205 ; CHECK-NEXT: [[T:%.*]] = icmp slt <2 x i32> %n, zeroinitializer
206 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> zeroinitializer
207 ; CHECK-NEXT: ret <2 x i32> [[M]]
209 %t = icmp sle <2 x i32> %n, zeroinitializer
210 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> zeroinitializer
214 ; Canonicalize min/max.
216 define i32 @umax4(i32 %n) {
217 ; CHECK-LABEL: @umax4(
218 ; CHECK-NEXT: [[T:%.*]] = icmp ugt i32 %n, 8
219 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 8
220 ; CHECK-NEXT: ret i32 [[M]]
222 %t = icmp uge i32 %n, 8
223 %m = select i1 %t, i32 %n, i32 8
227 ; Canonicalize min/max.
229 define <2 x i32> @umax4_vec(<2 x i32> %n) {
230 ; CHECK-LABEL: @umax4_vec(
231 ; CHECK-NEXT: [[T:%.*]] = icmp ugt <2 x i32> %n, <i32 8, i32 8>
232 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> <i32 8, i32 8>
233 ; CHECK-NEXT: ret <2 x i32> [[M]]
235 %t = icmp uge <2 x i32> %n, <i32 8, i32 8>
236 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> <i32 8, i32 8>
240 ; Canonicalize min/max.
242 define i32 @umin4(i32 %n) {
243 ; CHECK-LABEL: @umin4(
244 ; CHECK-NEXT: [[T:%.*]] = icmp ult i32 %n, 9
245 ; CHECK-NEXT: [[M:%.*]] = select i1 [[T]], i32 %n, i32 9
246 ; CHECK-NEXT: ret i32 [[M]]
248 %t = icmp ule i32 %n, 9
249 %m = select i1 %t, i32 %n, i32 9
253 ; Canonicalize min/max.
255 define <2 x i32> @umin4_vec(<2 x i32> %n) {
256 ; CHECK-LABEL: @umin4_vec(
257 ; CHECK-NEXT: [[T:%.*]] = icmp ult <2 x i32> %n, <i32 9, i32 9>
258 ; CHECK-NEXT: [[M:%.*]] = select <2 x i1> [[T]], <2 x i32> %n, <2 x i32> <i32 9, i32 9>
259 ; CHECK-NEXT: ret <2 x i32> [[M]]
261 %t = icmp ule <2 x i32> %n, <i32 9, i32 9>
262 %m = select <2 x i1> %t, <2 x i32> %n, <2 x i32> <i32 9, i32 9>
266 define i64 @smax_sext(i32 %a) {
267 ; CHECK-LABEL: @smax_sext(
268 ; CHECK-NEXT: [[A_EXT:%.*]] = sext i32 %a to i64
269 ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i64 [[A_EXT]], 0
270 ; CHECK-NEXT: [[MAX:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 0
271 ; CHECK-NEXT: ret i64 [[MAX]]
273 %a_ext = sext i32 %a to i64
274 %cmp = icmp sgt i32 %a, -1
275 %max = select i1 %cmp, i64 %a_ext, i64 0
279 define <2 x i64> @smax_sext_vec(<2 x i32> %a) {
280 ; CHECK-LABEL: @smax_sext_vec(
281 ; CHECK-NEXT: [[A_EXT:%.*]] = sext <2 x i32> %a to <2 x i64>
282 ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <2 x i64> [[A_EXT]], zeroinitializer
283 ; CHECK-NEXT: [[MAX:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> zeroinitializer
284 ; CHECK-NEXT: ret <2 x i64> [[MAX]]
286 %a_ext = sext <2 x i32> %a to <2 x i64>
287 %cmp = icmp sgt <2 x i32> %a, <i32 -1, i32 -1>
288 %max = select <2 x i1> %cmp, <2 x i64> %a_ext, <2 x i64> zeroinitializer
292 define i64 @smin_sext(i32 %a) {
293 ; CHECK-LABEL: @smin_sext(
294 ; CHECK-NEXT: [[A_EXT:%.*]] = sext i32 %a to i64
295 ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i64 [[A_EXT]], 0
296 ; CHECK-NEXT: [[MIN:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 0
297 ; CHECK-NEXT: ret i64 [[MIN]]
299 %a_ext = sext i32 %a to i64
300 %cmp = icmp slt i32 %a, 1
301 %min = select i1 %cmp, i64 %a_ext, i64 0
305 define <2 x i64>@smin_sext_vec(<2 x i32> %a) {
306 ; CHECK-LABEL: @smin_sext_vec(
307 ; CHECK-NEXT: [[A_EXT:%.*]] = sext <2 x i32> %a to <2 x i64>
308 ; CHECK-NEXT: [[CMP:%.*]] = icmp slt <2 x i64> [[A_EXT]], zeroinitializer
309 ; CHECK-NEXT: [[MIN:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> zeroinitializer
310 ; CHECK-NEXT: ret <2 x i64> [[MIN]]
312 %a_ext = sext <2 x i32> %a to <2 x i64>
313 %cmp = icmp slt <2 x i32> %a, <i32 1, i32 1>
314 %min = select <2 x i1> %cmp, <2 x i64> %a_ext, <2 x i64> zeroinitializer
318 define i64 @umax_sext(i32 %a) {
319 ; CHECK-LABEL: @umax_sext(
320 ; CHECK-NEXT: [[A_EXT:%.*]] = sext i32 %a to i64
321 ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i64 [[A_EXT]], 3
322 ; CHECK-NEXT: [[MAX:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 3
323 ; CHECK-NEXT: ret i64 [[MAX]]
325 %a_ext = sext i32 %a to i64
326 %cmp = icmp ugt i32 %a, 2
327 %max = select i1 %cmp, i64 %a_ext, i64 3
331 define <2 x i64> @umax_sext_vec(<2 x i32> %a) {
332 ; CHECK-LABEL: @umax_sext_vec(
333 ; CHECK-NEXT: [[A_EXT:%.*]] = sext <2 x i32> %a to <2 x i64>
334 ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt <2 x i64> [[A_EXT]], <i64 3, i64 3>
335 ; CHECK-NEXT: [[MAX:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> <i64 3, i64 3>
336 ; CHECK-NEXT: ret <2 x i64> [[MAX]]
338 %a_ext = sext <2 x i32> %a to <2 x i64>
339 %cmp = icmp ugt <2 x i32> %a, <i32 2, i32 2>
340 %max = select <2 x i1> %cmp, <2 x i64> %a_ext, <2 x i64> <i64 3, i64 3>
344 define i64 @umin_sext(i32 %a) {
345 ; CHECK-LABEL: @umin_sext(
346 ; CHECK-NEXT: [[A_EXT:%.*]] = sext i32 %a to i64
347 ; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[A_EXT]], 2
348 ; CHECK-NEXT: [[MIN:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 2
349 ; CHECK-NEXT: ret i64 [[MIN]]
351 %a_ext = sext i32 %a to i64
352 %cmp = icmp ult i32 %a, 3
353 %min = select i1 %cmp, i64 %a_ext, i64 2
357 define <2 x i64> @umin_sext_vec(<2 x i32> %a) {
358 ; CHECK-LABEL: @umin_sext_vec(
359 ; CHECK-NEXT: [[A_EXT:%.*]] = sext <2 x i32> %a to <2 x i64>
360 ; CHECK-NEXT: [[CMP:%.*]] = icmp ult <2 x i64> [[A_EXT]], <i64 2, i64 2>
361 ; CHECK-NEXT: [[MIN:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> <i64 2, i64 2>
362 ; CHECK-NEXT: ret <2 x i64> [[MIN]]
364 %a_ext = sext <2 x i32> %a to <2 x i64>
365 %cmp = icmp ult <2 x i32> %a, <i32 3, i32 3>
366 %min = select <2 x i1> %cmp, <2 x i64> %a_ext, <2 x i64> <i64 2, i64 2>
370 define i64 @umax_sext2(i32 %a) {
371 ; CHECK-LABEL: @umax_sext2(
372 ; CHECK-NEXT: [[A_EXT:%.*]] = sext i32 %a to i64
373 ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i64 [[A_EXT]], 2
374 ; CHECK-NEXT: [[MIN:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 2
375 ; CHECK-NEXT: ret i64 [[MIN]]
377 %a_ext = sext i32 %a to i64
378 %cmp = icmp ult i32 %a, 3
379 %min = select i1 %cmp, i64 2, i64 %a_ext
383 define <2 x i64> @umax_sext2_vec(<2 x i32> %a) {
384 ; CHECK-LABEL: @umax_sext2_vec(
385 ; CHECK-NEXT: [[A_EXT:%.*]] = sext <2 x i32> %a to <2 x i64>
386 ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt <2 x i64> [[A_EXT]], <i64 2, i64 2>
387 ; CHECK-NEXT: [[MIN:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> <i64 2, i64 2>
388 ; CHECK-NEXT: ret <2 x i64> [[MIN]]
390 %a_ext = sext <2 x i32> %a to <2 x i64>
391 %cmp = icmp ult <2 x i32> %a, <i32 3, i32 3>
392 %min = select <2 x i1> %cmp, <2 x i64> <i64 2, i64 2>, <2 x i64> %a_ext
396 define i64 @umin_sext2(i32 %a) {
397 ; CHECK-LABEL: @umin_sext2(
398 ; CHECK-NEXT: [[A_EXT:%.*]] = sext i32 %a to i64
399 ; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[A_EXT]], 3
400 ; CHECK-NEXT: [[MIN:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 3
401 ; CHECK-NEXT: ret i64 [[MIN]]
403 %a_ext = sext i32 %a to i64
404 %cmp = icmp ugt i32 %a, 2
405 %min = select i1 %cmp, i64 3, i64 %a_ext
409 define <2 x i64> @umin_sext2_vec(<2 x i32> %a) {
410 ; CHECK-LABEL: @umin_sext2_vec(
411 ; CHECK-NEXT: [[A_EXT:%.*]] = sext <2 x i32> %a to <2 x i64>
412 ; CHECK-NEXT: [[CMP:%.*]] = icmp ult <2 x i64> [[A_EXT]], <i64 3, i64 3>
413 ; CHECK-NEXT: [[MIN:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> <i64 3, i64 3>
414 ; CHECK-NEXT: ret <2 x i64> [[MIN]]
416 %a_ext = sext <2 x i32> %a to <2 x i64>
417 %cmp = icmp ugt <2 x i32> %a, <i32 2, i32 2>
418 %min = select <2 x i1> %cmp, <2 x i64> <i64 3, i64 3>, <2 x i64> %a_ext
422 define i64 @umax_zext(i32 %a) {
423 ; CHECK-LABEL: @umax_zext(
424 ; CHECK-NEXT: [[A_EXT:%.*]] = zext i32 %a to i64
425 ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i64 [[A_EXT]], 3
426 ; CHECK-NEXT: [[MAX:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 3
427 ; CHECK-NEXT: ret i64 [[MAX]]
429 %a_ext = zext i32 %a to i64
430 %cmp = icmp ugt i32 %a, 2
431 %max = select i1 %cmp, i64 %a_ext, i64 3
435 define <2 x i64> @umax_zext_vec(<2 x i32> %a) {
436 ; CHECK-LABEL: @umax_zext_vec(
437 ; CHECK-NEXT: [[A_EXT:%.*]] = zext <2 x i32> %a to <2 x i64>
438 ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt <2 x i64> [[A_EXT]], <i64 3, i64 3>
439 ; CHECK-NEXT: [[MAX:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> <i64 3, i64 3>
440 ; CHECK-NEXT: ret <2 x i64> [[MAX]]
442 %a_ext = zext <2 x i32> %a to <2 x i64>
443 %cmp = icmp ugt <2 x i32> %a, <i32 2, i32 2>
444 %max = select <2 x i1> %cmp, <2 x i64> %a_ext, <2 x i64> <i64 3, i64 3>
448 define i64 @umin_zext(i32 %a) {
449 ; CHECK-LABEL: @umin_zext(
450 ; CHECK-NEXT: [[A_EXT:%.*]] = zext i32 %a to i64
451 ; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[A_EXT]], 2
452 ; CHECK-NEXT: [[MIN:%.*]] = select i1 [[CMP]], i64 [[A_EXT]], i64 2
453 ; CHECK-NEXT: ret i64 [[MIN]]
455 %a_ext = zext i32 %a to i64
456 %cmp = icmp ult i32 %a, 3
457 %min = select i1 %cmp, i64 %a_ext, i64 2
461 define <2 x i64> @umin_zext_vec(<2 x i32> %a) {
462 ; CHECK-LABEL: @umin_zext_vec(
463 ; CHECK-NEXT: [[A_EXT:%.*]] = zext <2 x i32> %a to <2 x i64>
464 ; CHECK-NEXT: [[CMP:%.*]] = icmp ult <2 x i64> [[A_EXT]], <i64 2, i64 2>
465 ; CHECK-NEXT: [[MIN:%.*]] = select <2 x i1> [[CMP]], <2 x i64> [[A_EXT]], <2 x i64> <i64 2, i64 2>
466 ; CHECK-NEXT: ret <2 x i64> [[MIN]]
468 %a_ext = zext <2 x i32> %a to <2 x i64>
469 %cmp = icmp ult <2 x i32> %a, <i32 3, i32 3>
470 %min = select <2 x i1> %cmp, <2 x i64> %a_ext, <2 x i64> <i64 2, i64 2>
474 ; Don't crash mishandling a pattern that can't be transformed.
476 define <2 x i16> @scalar_select_of_vectors(<2 x i16> %a, <2 x i16> %b, i8 %x) {
477 ; CHECK-LABEL: @scalar_select_of_vectors(
478 ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i8 %x, 0
479 ; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], <2 x i16> %a, <2 x i16> %b
480 ; CHECK-NEXT: ret <2 x i16> [[SEL]]
482 %cmp = icmp slt i8 %x, 0
483 %sel = select i1 %cmp, <2 x i16> %a, <2 x i16> %b