1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
4 declare i32 @llvm.vector.reduce.add.v1i32(<1 x i32> %a)
5 declare i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %a)
6 declare i32 @llvm.vector.reduce.mul.v1i32(<1 x i32> %a)
7 declare i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> %a)
8 declare i32 @llvm.vector.reduce.and.v1i32(<1 x i32> %a)
9 declare i32 @llvm.vector.reduce.and.v8i32(<8 x i32> %a)
10 declare i32 @llvm.vector.reduce.or.v1i32(<1 x i32> %a)
11 declare i32 @llvm.vector.reduce.or.v8i32(<8 x i32> %a)
12 declare i32 @llvm.vector.reduce.xor.v1i32(<1 x i32> %a)
13 declare i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> %a)
14 declare i32 @llvm.vector.reduce.smin.v1i32(<1 x i32> %a)
15 declare i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> %a)
16 declare i32 @llvm.vector.reduce.smax.v1i32(<1 x i32> %a)
17 declare i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> %a)
18 declare i32 @llvm.vector.reduce.umin.v1i32(<1 x i32> %a)
19 declare i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> %a)
20 declare i32 @llvm.vector.reduce.umax.v1i32(<1 x i32> %a)
21 declare i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> %a)
25 ; CHECK-LABEL: @add_0(
26 ; CHECK-NEXT: ret i32 0
28 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> zeroinitializer)
33 ; CHECK-LABEL: @add_1(
34 ; CHECK-NEXT: ret i32 8
36 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
40 define i32 @add_inc() {
41 ; CHECK-LABEL: @add_inc(
42 ; CHECK-NEXT: ret i32 18
44 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
48 define i32 @add_1v() {
49 ; CHECK-LABEL: @add_1v(
50 ; CHECK-NEXT: ret i32 10
52 %x = call i32 @llvm.vector.reduce.add.v1i32(<1 x i32> <i32 10>)
56 define i32 @add_undef() {
57 ; CHECK-LABEL: @add_undef(
58 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)
59 ; CHECK-NEXT: ret i32 [[X]]
61 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> undef)
65 define i32 @add_undef1() {
66 ; CHECK-LABEL: @add_undef1(
67 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
68 ; CHECK-NEXT: ret i32 [[X]]
70 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
74 define i32 @add_poison() {
75 ; CHECK-LABEL: @add_poison(
76 ; CHECK-NEXT: ret i32 poison
78 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> poison)
82 define i32 @add_poison1() {
83 ; CHECK-LABEL: @add_poison1(
84 ; CHECK-NEXT: ret i32 poison
86 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> <i32 1, i32 1, i32 poison, i32 1, i32 1, i32 42, i32 1, i32 1>)
90 define i32 @add_constexpr() {
91 ; CHECK-LABEL: @add_constexpr(
92 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> bitcast (<4 x i64> <i64 0, i64 1, i64 2, i64 3> to <8 x i32>))
93 ; CHECK-NEXT: ret i32 [[X]]
95 %x = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> bitcast (<4 x i64> <i64 0, i64 1, i64 2, i64 3> to <8 x i32>))
100 ; CHECK-LABEL: @mul_0(
101 ; CHECK-NEXT: ret i32 0
103 %x = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> zeroinitializer)
107 define i32 @mul_1() {
108 ; CHECK-LABEL: @mul_1(
109 ; CHECK-NEXT: ret i32 1
111 %x = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
115 define i32 @mul_inc() {
116 ; CHECK-LABEL: @mul_inc(
117 ; CHECK-NEXT: ret i32 40320
119 %x = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
123 define i32 @mul_1v() {
124 ; CHECK-LABEL: @mul_1v(
125 ; CHECK-NEXT: ret i32 10
127 %x = call i32 @llvm.vector.reduce.mul.v1i32(<1 x i32> <i32 10>)
131 define i32 @mul_undef() {
132 ; CHECK-LABEL: @mul_undef(
133 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)
134 ; CHECK-NEXT: ret i32 [[X]]
136 %x = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> undef)
140 define i32 @mul_undef1() {
141 ; CHECK-LABEL: @mul_undef1(
142 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
143 ; CHECK-NEXT: ret i32 [[X]]
145 %x = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
149 define i32 @mul_poison() {
150 ; CHECK-LABEL: @mul_poison(
151 ; CHECK-NEXT: ret i32 poison
153 %x = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> poison)
157 define i32 @mul_poison1() {
158 ; CHECK-LABEL: @mul_poison1(
159 ; CHECK-NEXT: ret i32 poison
161 %x = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> <i32 0, i32 1, i32 poison, i32 1, i32 1, i32 1, i32 1, i32 1>)
165 define i32 @and_0() {
166 ; CHECK-LABEL: @and_0(
167 ; CHECK-NEXT: ret i32 0
169 %x = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> zeroinitializer)
173 define i32 @and_1() {
174 ; CHECK-LABEL: @and_1(
175 ; CHECK-NEXT: ret i32 1
177 %x = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
181 define i32 @and_inc() {
182 ; CHECK-LABEL: @and_inc(
183 ; CHECK-NEXT: ret i32 0
185 %x = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
189 define i32 @and_1v() {
190 ; CHECK-LABEL: @and_1v(
191 ; CHECK-NEXT: ret i32 10
193 %x = call i32 @llvm.vector.reduce.and.v1i32(<1 x i32> <i32 10>)
197 define i32 @and_undef() {
198 ; CHECK-LABEL: @and_undef(
199 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> undef)
200 ; CHECK-NEXT: ret i32 [[X]]
202 %x = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> undef)
206 define i32 @and_undef1() {
207 ; CHECK-LABEL: @and_undef1(
208 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
209 ; CHECK-NEXT: ret i32 [[X]]
211 %x = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
215 define i32 @and_poison() {
216 ; CHECK-LABEL: @and_poison(
217 ; CHECK-NEXT: ret i32 poison
219 %x = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> poison)
223 define i32 @and_poison1() {
224 ; CHECK-LABEL: @and_poison1(
225 ; CHECK-NEXT: ret i32 poison
227 %x = call i32 @llvm.vector.reduce.and.v8i32(<8 x i32> <i32 -1, i32 1, i32 poison, i32 1, i32 1, i32 1, i32 1, i32 1>)
232 ; CHECK-LABEL: @or_0(
233 ; CHECK-NEXT: ret i32 0
235 %x = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> zeroinitializer)
240 ; CHECK-LABEL: @or_1(
241 ; CHECK-NEXT: ret i32 1
243 %x = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
247 define i32 @or_inc() {
248 ; CHECK-LABEL: @or_inc(
249 ; CHECK-NEXT: ret i32 -1
251 %x = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
255 define i32 @or_1v() {
256 ; CHECK-LABEL: @or_1v(
257 ; CHECK-NEXT: ret i32 10
259 %x = call i32 @llvm.vector.reduce.or.v1i32(<1 x i32> <i32 10>)
263 define i32 @or_undef() {
264 ; CHECK-LABEL: @or_undef(
265 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> undef)
266 ; CHECK-NEXT: ret i32 [[X]]
268 %x = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> undef)
272 define i32 @or_undef1() {
273 ; CHECK-LABEL: @or_undef1(
274 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
275 ; CHECK-NEXT: ret i32 [[X]]
277 %x = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
281 define i32 @or_poison() {
282 ; CHECK-LABEL: @or_poison(
283 ; CHECK-NEXT: ret i32 poison
285 %x = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> poison)
289 define i32 @or_poison1() {
290 ; CHECK-LABEL: @or_poison1(
291 ; CHECK-NEXT: ret i32 poison
293 %x = call i32 @llvm.vector.reduce.or.v8i32(<8 x i32> <i32 1, i32 0, i32 poison, i32 1, i32 1, i32 1, i32 1, i32 1>)
297 define i32 @xor_0() {
298 ; CHECK-LABEL: @xor_0(
299 ; CHECK-NEXT: ret i32 0
301 %x = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> zeroinitializer)
305 define i32 @xor_1() {
306 ; CHECK-LABEL: @xor_1(
307 ; CHECK-NEXT: ret i32 0
309 %x = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
313 define i32 @xor_inc() {
314 ; CHECK-LABEL: @xor_inc(
315 ; CHECK-NEXT: ret i32 10
317 %x = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
321 define i32 @xor_1v() {
322 ; CHECK-LABEL: @xor_1v(
323 ; CHECK-NEXT: ret i32 10
325 %x = call i32 @llvm.vector.reduce.xor.v1i32(<1 x i32> <i32 10>)
329 define i32 @xor_undef() {
330 ; CHECK-LABEL: @xor_undef(
331 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> undef)
332 ; CHECK-NEXT: ret i32 [[X]]
334 %x = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> undef)
338 define i32 @xor_undef1() {
339 ; CHECK-LABEL: @xor_undef1(
340 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
341 ; CHECK-NEXT: ret i32 [[X]]
343 %x = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
347 define i32 @xor_poison() {
348 ; CHECK-LABEL: @xor_poison(
349 ; CHECK-NEXT: ret i32 poison
351 %x = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> poison)
355 define i32 @xor_poison1() {
356 ; CHECK-LABEL: @xor_poison1(
357 ; CHECK-NEXT: ret i32 poison
359 %x = call i32 @llvm.vector.reduce.xor.v8i32(<8 x i32> <i32 poison, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
363 define i32 @smin_0() {
364 ; CHECK-LABEL: @smin_0(
365 ; CHECK-NEXT: ret i32 0
367 %x = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> zeroinitializer)
371 define i32 @smin_1() {
372 ; CHECK-LABEL: @smin_1(
373 ; CHECK-NEXT: ret i32 1
375 %x = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
379 define i32 @smin_inc() {
380 ; CHECK-LABEL: @smin_inc(
381 ; CHECK-NEXT: ret i32 -6
383 %x = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
387 define i32 @smin_1v() {
388 ; CHECK-LABEL: @smin_1v(
389 ; CHECK-NEXT: ret i32 10
391 %x = call i32 @llvm.vector.reduce.smin.v1i32(<1 x i32> <i32 10>)
395 define i32 @smin_undef() {
396 ; CHECK-LABEL: @smin_undef(
397 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> undef)
398 ; CHECK-NEXT: ret i32 [[X]]
400 %x = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> undef)
404 define i32 @smin_undef1() {
405 ; CHECK-LABEL: @smin_undef1(
406 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
407 ; CHECK-NEXT: ret i32 [[X]]
409 %x = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
413 define i32 @smin_poison() {
414 ; CHECK-LABEL: @smin_poison(
415 ; CHECK-NEXT: ret i32 poison
417 %x = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> poison)
421 define i32 @smin_poison1() {
422 ; CHECK-LABEL: @smin_poison1(
423 ; CHECK-NEXT: ret i32 poison
425 %x = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 poison, i32 1, i32 1, i32 1>)
429 define i32 @smax_0() {
430 ; CHECK-LABEL: @smax_0(
431 ; CHECK-NEXT: ret i32 0
433 %x = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> zeroinitializer)
437 define i32 @smax_1() {
438 ; CHECK-LABEL: @smax_1(
439 ; CHECK-NEXT: ret i32 1
441 %x = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
445 define i32 @smax_inc() {
446 ; CHECK-LABEL: @smax_inc(
447 ; CHECK-NEXT: ret i32 8
449 %x = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
453 define i32 @smax_1v() {
454 ; CHECK-LABEL: @smax_1v(
455 ; CHECK-NEXT: ret i32 10
457 %x = call i32 @llvm.vector.reduce.smax.v1i32(<1 x i32> <i32 10>)
461 define i32 @smax_undef() {
462 ; CHECK-LABEL: @smax_undef(
463 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> undef)
464 ; CHECK-NEXT: ret i32 [[X]]
466 %x = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> undef)
470 define i32 @smax_undef1() {
471 ; CHECK-LABEL: @smax_undef1(
472 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
473 ; CHECK-NEXT: ret i32 [[X]]
475 %x = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
479 define i32 @smax_poison() {
480 ; CHECK-LABEL: @smax_poison(
481 ; CHECK-NEXT: ret i32 poison
483 %x = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> poison)
487 define i32 @smax_poison1() {
488 ; CHECK-LABEL: @smax_poison1(
489 ; CHECK-NEXT: ret i32 poison
491 %x = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> <i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 poison>)
495 define i32 @umin_0() {
496 ; CHECK-LABEL: @umin_0(
497 ; CHECK-NEXT: ret i32 0
499 %x = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> zeroinitializer)
503 define i32 @umin_1() {
504 ; CHECK-LABEL: @umin_1(
505 ; CHECK-NEXT: ret i32 1
507 %x = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
511 define i32 @umin_inc() {
512 ; CHECK-LABEL: @umin_inc(
513 ; CHECK-NEXT: ret i32 1
515 %x = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
519 define i32 @umin_1v() {
520 ; CHECK-LABEL: @umin_1v(
521 ; CHECK-NEXT: ret i32 10
523 %x = call i32 @llvm.vector.reduce.umin.v1i32(<1 x i32> <i32 10>)
527 define i32 @umin_undef() {
528 ; CHECK-LABEL: @umin_undef(
529 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> undef)
530 ; CHECK-NEXT: ret i32 [[X]]
532 %x = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> undef)
536 define i32 @umin_undef1() {
537 ; CHECK-LABEL: @umin_undef1(
538 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
539 ; CHECK-NEXT: ret i32 [[X]]
541 %x = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
545 define i32 @umin_poison() {
546 ; CHECK-LABEL: @umin_poison(
547 ; CHECK-NEXT: ret i32 poison
549 %x = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> poison)
553 define i32 @umin_poison1() {
554 ; CHECK-LABEL: @umin_poison1(
555 ; CHECK-NEXT: ret i32 poison
557 %x = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> <i32 1, i32 1, i32 -1, i32 poison, i32 1, i32 1, i32 1, i32 1>)
561 define i32 @umax_0() {
562 ; CHECK-LABEL: @umax_0(
563 ; CHECK-NEXT: ret i32 0
565 %x = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> zeroinitializer)
569 define i32 @umax_1() {
570 ; CHECK-LABEL: @umax_1(
571 ; CHECK-NEXT: ret i32 1
573 %x = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>)
577 define i32 @umax_inc() {
578 ; CHECK-LABEL: @umax_inc(
579 ; CHECK-NEXT: ret i32 -3
581 %x = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> <i32 1, i32 -3, i32 5, i32 7, i32 2, i32 4, i32 -6, i32 8>)
585 define i32 @umax_1v() {
586 ; CHECK-LABEL: @umax_1v(
587 ; CHECK-NEXT: ret i32 10
589 %x = call i32 @llvm.vector.reduce.umax.v1i32(<1 x i32> <i32 10>)
593 define i32 @umax_undef() {
594 ; CHECK-LABEL: @umax_undef(
595 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> undef)
596 ; CHECK-NEXT: ret i32 [[X]]
598 %x = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> undef)
602 define i32 @umax_undef1() {
603 ; CHECK-LABEL: @umax_undef1(
604 ; CHECK-NEXT: [[X:%.*]] = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
605 ; CHECK-NEXT: ret i32 [[X]]
607 %x = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> <i32 1, i32 1, i32 undef, i32 1, i32 1, i32 1, i32 1, i32 1>)
611 define i32 @umax_poison() {
612 ; CHECK-LABEL: @umax_poison(
613 ; CHECK-NEXT: ret i32 poison
615 %x = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> poison)
619 define i32 @umax_poison1() {
620 ; CHECK-LABEL: @umax_poison1(
621 ; CHECK-NEXT: ret i32 poison
623 %x = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> <i32 1, i32 1, i32 poison, i32 1, i32 1, i32 poison, i32 1, i32 1>)