1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+m,+v -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+m,+v -verify-machineinstrs < %s | FileCheck %s
5 declare i1 @llvm.vector.reduce.or.nxv1i1(<vscale x 1 x i1>)
7 define zeroext i1 @vreduce_or_nxv1i1(<vscale x 1 x i1> %v) {
8 ; CHECK-LABEL: vreduce_or_nxv1i1:
10 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
11 ; CHECK-NEXT: vcpop.m a0, v0
12 ; CHECK-NEXT: snez a0, a0
14 %red = call i1 @llvm.vector.reduce.or.nxv1i1(<vscale x 1 x i1> %v)
18 declare i1 @llvm.vector.reduce.xor.nxv1i1(<vscale x 1 x i1>)
20 define zeroext i1 @vreduce_xor_nxv1i1(<vscale x 1 x i1> %v) {
21 ; CHECK-LABEL: vreduce_xor_nxv1i1:
23 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
24 ; CHECK-NEXT: vcpop.m a0, v0
25 ; CHECK-NEXT: andi a0, a0, 1
27 %red = call i1 @llvm.vector.reduce.xor.nxv1i1(<vscale x 1 x i1> %v)
31 declare i1 @llvm.vector.reduce.and.nxv1i1(<vscale x 1 x i1>)
33 define zeroext i1 @vreduce_and_nxv1i1(<vscale x 1 x i1> %v) {
34 ; CHECK-LABEL: vreduce_and_nxv1i1:
36 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
37 ; CHECK-NEXT: vmnot.m v8, v0
38 ; CHECK-NEXT: vcpop.m a0, v8
39 ; CHECK-NEXT: seqz a0, a0
41 %red = call i1 @llvm.vector.reduce.and.nxv1i1(<vscale x 1 x i1> %v)
45 declare i1 @llvm.vector.reduce.umax.nxv1i1(<vscale x 1 x i1>)
47 define zeroext i1 @vreduce_umax_nxv1i1(<vscale x 1 x i1> %v) {
48 ; CHECK-LABEL: vreduce_umax_nxv1i1:
50 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
51 ; CHECK-NEXT: vcpop.m a0, v0
52 ; CHECK-NEXT: snez a0, a0
54 %red = call i1 @llvm.vector.reduce.umax.nxv1i1(<vscale x 1 x i1> %v)
58 declare i1 @llvm.vector.reduce.smax.nxv1i1(<vscale x 1 x i1>)
60 define zeroext i1 @vreduce_smax_nxv1i1(<vscale x 1 x i1> %v) {
61 ; CHECK-LABEL: vreduce_smax_nxv1i1:
63 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
64 ; CHECK-NEXT: vmnot.m v8, v0
65 ; CHECK-NEXT: vcpop.m a0, v8
66 ; CHECK-NEXT: seqz a0, a0
68 %red = call i1 @llvm.vector.reduce.smax.nxv1i1(<vscale x 1 x i1> %v)
72 declare i1 @llvm.vector.reduce.umin.nxv1i1(<vscale x 1 x i1>)
74 define zeroext i1 @vreduce_umin_nxv1i1(<vscale x 1 x i1> %v) {
75 ; CHECK-LABEL: vreduce_umin_nxv1i1:
77 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
78 ; CHECK-NEXT: vmnot.m v8, v0
79 ; CHECK-NEXT: vcpop.m a0, v8
80 ; CHECK-NEXT: seqz a0, a0
82 %red = call i1 @llvm.vector.reduce.umin.nxv1i1(<vscale x 1 x i1> %v)
86 declare i1 @llvm.vector.reduce.smin.nxv1i1(<vscale x 1 x i1>)
88 define zeroext i1 @vreduce_smin_nxv1i1(<vscale x 1 x i1> %v) {
89 ; CHECK-LABEL: vreduce_smin_nxv1i1:
91 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
92 ; CHECK-NEXT: vcpop.m a0, v0
93 ; CHECK-NEXT: snez a0, a0
95 %red = call i1 @llvm.vector.reduce.smin.nxv1i1(<vscale x 1 x i1> %v)
99 declare i1 @llvm.vector.reduce.or.nxv2i1(<vscale x 2 x i1>)
101 define zeroext i1 @vreduce_or_nxv2i1(<vscale x 2 x i1> %v) {
102 ; CHECK-LABEL: vreduce_or_nxv2i1:
104 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
105 ; CHECK-NEXT: vcpop.m a0, v0
106 ; CHECK-NEXT: snez a0, a0
108 %red = call i1 @llvm.vector.reduce.or.nxv2i1(<vscale x 2 x i1> %v)
112 declare i1 @llvm.vector.reduce.xor.nxv2i1(<vscale x 2 x i1>)
114 define zeroext i1 @vreduce_xor_nxv2i1(<vscale x 2 x i1> %v) {
115 ; CHECK-LABEL: vreduce_xor_nxv2i1:
117 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
118 ; CHECK-NEXT: vcpop.m a0, v0
119 ; CHECK-NEXT: andi a0, a0, 1
121 %red = call i1 @llvm.vector.reduce.xor.nxv2i1(<vscale x 2 x i1> %v)
125 declare i1 @llvm.vector.reduce.and.nxv2i1(<vscale x 2 x i1>)
127 define zeroext i1 @vreduce_and_nxv2i1(<vscale x 2 x i1> %v) {
128 ; CHECK-LABEL: vreduce_and_nxv2i1:
130 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
131 ; CHECK-NEXT: vmnot.m v8, v0
132 ; CHECK-NEXT: vcpop.m a0, v8
133 ; CHECK-NEXT: seqz a0, a0
135 %red = call i1 @llvm.vector.reduce.and.nxv2i1(<vscale x 2 x i1> %v)
139 declare i1 @llvm.vector.reduce.umax.nxv2i1(<vscale x 2 x i1>)
141 define zeroext i1 @vreduce_umax_nxv2i1(<vscale x 2 x i1> %v) {
142 ; CHECK-LABEL: vreduce_umax_nxv2i1:
144 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
145 ; CHECK-NEXT: vcpop.m a0, v0
146 ; CHECK-NEXT: snez a0, a0
148 %red = call i1 @llvm.vector.reduce.umax.nxv2i1(<vscale x 2 x i1> %v)
152 declare i1 @llvm.vector.reduce.smax.nxv2i1(<vscale x 2 x i1>)
154 define zeroext i1 @vreduce_smax_nxv2i1(<vscale x 2 x i1> %v) {
155 ; CHECK-LABEL: vreduce_smax_nxv2i1:
157 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
158 ; CHECK-NEXT: vmnot.m v8, v0
159 ; CHECK-NEXT: vcpop.m a0, v8
160 ; CHECK-NEXT: seqz a0, a0
162 %red = call i1 @llvm.vector.reduce.smax.nxv2i1(<vscale x 2 x i1> %v)
166 declare i1 @llvm.vector.reduce.umin.nxv2i1(<vscale x 2 x i1>)
168 define zeroext i1 @vreduce_umin_nxv2i1(<vscale x 2 x i1> %v) {
169 ; CHECK-LABEL: vreduce_umin_nxv2i1:
171 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
172 ; CHECK-NEXT: vmnot.m v8, v0
173 ; CHECK-NEXT: vcpop.m a0, v8
174 ; CHECK-NEXT: seqz a0, a0
176 %red = call i1 @llvm.vector.reduce.umin.nxv2i1(<vscale x 2 x i1> %v)
180 declare i1 @llvm.vector.reduce.smin.nxv2i1(<vscale x 2 x i1>)
182 define zeroext i1 @vreduce_smin_nxv2i1(<vscale x 2 x i1> %v) {
183 ; CHECK-LABEL: vreduce_smin_nxv2i1:
185 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
186 ; CHECK-NEXT: vcpop.m a0, v0
187 ; CHECK-NEXT: snez a0, a0
189 %red = call i1 @llvm.vector.reduce.smin.nxv2i1(<vscale x 2 x i1> %v)
193 declare i1 @llvm.vector.reduce.or.nxv4i1(<vscale x 4 x i1>)
195 define zeroext i1 @vreduce_or_nxv4i1(<vscale x 4 x i1> %v) {
196 ; CHECK-LABEL: vreduce_or_nxv4i1:
198 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
199 ; CHECK-NEXT: vcpop.m a0, v0
200 ; CHECK-NEXT: snez a0, a0
202 %red = call i1 @llvm.vector.reduce.or.nxv4i1(<vscale x 4 x i1> %v)
206 declare i1 @llvm.vector.reduce.xor.nxv4i1(<vscale x 4 x i1>)
208 define zeroext i1 @vreduce_xor_nxv4i1(<vscale x 4 x i1> %v) {
209 ; CHECK-LABEL: vreduce_xor_nxv4i1:
211 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
212 ; CHECK-NEXT: vcpop.m a0, v0
213 ; CHECK-NEXT: andi a0, a0, 1
215 %red = call i1 @llvm.vector.reduce.xor.nxv4i1(<vscale x 4 x i1> %v)
219 declare i1 @llvm.vector.reduce.and.nxv4i1(<vscale x 4 x i1>)
221 define zeroext i1 @vreduce_and_nxv4i1(<vscale x 4 x i1> %v) {
222 ; CHECK-LABEL: vreduce_and_nxv4i1:
224 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
225 ; CHECK-NEXT: vmnot.m v8, v0
226 ; CHECK-NEXT: vcpop.m a0, v8
227 ; CHECK-NEXT: seqz a0, a0
229 %red = call i1 @llvm.vector.reduce.and.nxv4i1(<vscale x 4 x i1> %v)
233 declare i1 @llvm.vector.reduce.umax.nxv4i1(<vscale x 4 x i1>)
235 define zeroext i1 @vreduce_umax_nxv4i1(<vscale x 4 x i1> %v) {
236 ; CHECK-LABEL: vreduce_umax_nxv4i1:
238 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
239 ; CHECK-NEXT: vcpop.m a0, v0
240 ; CHECK-NEXT: snez a0, a0
242 %red = call i1 @llvm.vector.reduce.umax.nxv4i1(<vscale x 4 x i1> %v)
246 declare i1 @llvm.vector.reduce.smax.nxv4i1(<vscale x 4 x i1>)
248 define zeroext i1 @vreduce_smax_nxv4i1(<vscale x 4 x i1> %v) {
249 ; CHECK-LABEL: vreduce_smax_nxv4i1:
251 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
252 ; CHECK-NEXT: vmnot.m v8, v0
253 ; CHECK-NEXT: vcpop.m a0, v8
254 ; CHECK-NEXT: seqz a0, a0
256 %red = call i1 @llvm.vector.reduce.smax.nxv4i1(<vscale x 4 x i1> %v)
260 declare i1 @llvm.vector.reduce.umin.nxv4i1(<vscale x 4 x i1>)
262 define zeroext i1 @vreduce_umin_nxv4i1(<vscale x 4 x i1> %v) {
263 ; CHECK-LABEL: vreduce_umin_nxv4i1:
265 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
266 ; CHECK-NEXT: vmnot.m v8, v0
267 ; CHECK-NEXT: vcpop.m a0, v8
268 ; CHECK-NEXT: seqz a0, a0
270 %red = call i1 @llvm.vector.reduce.umin.nxv4i1(<vscale x 4 x i1> %v)
274 declare i1 @llvm.vector.reduce.smin.nxv4i1(<vscale x 4 x i1>)
276 define zeroext i1 @vreduce_smin_nxv4i1(<vscale x 4 x i1> %v) {
277 ; CHECK-LABEL: vreduce_smin_nxv4i1:
279 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
280 ; CHECK-NEXT: vcpop.m a0, v0
281 ; CHECK-NEXT: snez a0, a0
283 %red = call i1 @llvm.vector.reduce.smin.nxv4i1(<vscale x 4 x i1> %v)
287 declare i1 @llvm.vector.reduce.or.nxv8i1(<vscale x 8 x i1>)
289 define zeroext i1 @vreduce_or_nxv8i1(<vscale x 8 x i1> %v) {
290 ; CHECK-LABEL: vreduce_or_nxv8i1:
292 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
293 ; CHECK-NEXT: vcpop.m a0, v0
294 ; CHECK-NEXT: snez a0, a0
296 %red = call i1 @llvm.vector.reduce.or.nxv8i1(<vscale x 8 x i1> %v)
300 declare i1 @llvm.vector.reduce.xor.nxv8i1(<vscale x 8 x i1>)
302 define zeroext i1 @vreduce_xor_nxv8i1(<vscale x 8 x i1> %v) {
303 ; CHECK-LABEL: vreduce_xor_nxv8i1:
305 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
306 ; CHECK-NEXT: vcpop.m a0, v0
307 ; CHECK-NEXT: andi a0, a0, 1
309 %red = call i1 @llvm.vector.reduce.xor.nxv8i1(<vscale x 8 x i1> %v)
313 declare i1 @llvm.vector.reduce.and.nxv8i1(<vscale x 8 x i1>)
315 define zeroext i1 @vreduce_and_nxv8i1(<vscale x 8 x i1> %v) {
316 ; CHECK-LABEL: vreduce_and_nxv8i1:
318 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
319 ; CHECK-NEXT: vmnot.m v8, v0
320 ; CHECK-NEXT: vcpop.m a0, v8
321 ; CHECK-NEXT: seqz a0, a0
323 %red = call i1 @llvm.vector.reduce.and.nxv8i1(<vscale x 8 x i1> %v)
327 declare i1 @llvm.vector.reduce.umax.nxv8i1(<vscale x 8 x i1>)
329 define zeroext i1 @vreduce_umax_nxv8i1(<vscale x 8 x i1> %v) {
330 ; CHECK-LABEL: vreduce_umax_nxv8i1:
332 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
333 ; CHECK-NEXT: vcpop.m a0, v0
334 ; CHECK-NEXT: snez a0, a0
336 %red = call i1 @llvm.vector.reduce.umax.nxv8i1(<vscale x 8 x i1> %v)
340 declare i1 @llvm.vector.reduce.smax.nxv8i1(<vscale x 8 x i1>)
342 define zeroext i1 @vreduce_smax_nxv8i1(<vscale x 8 x i1> %v) {
343 ; CHECK-LABEL: vreduce_smax_nxv8i1:
345 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
346 ; CHECK-NEXT: vmnot.m v8, v0
347 ; CHECK-NEXT: vcpop.m a0, v8
348 ; CHECK-NEXT: seqz a0, a0
350 %red = call i1 @llvm.vector.reduce.smax.nxv8i1(<vscale x 8 x i1> %v)
354 declare i1 @llvm.vector.reduce.umin.nxv8i1(<vscale x 8 x i1>)
356 define zeroext i1 @vreduce_umin_nxv8i1(<vscale x 8 x i1> %v) {
357 ; CHECK-LABEL: vreduce_umin_nxv8i1:
359 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
360 ; CHECK-NEXT: vmnot.m v8, v0
361 ; CHECK-NEXT: vcpop.m a0, v8
362 ; CHECK-NEXT: seqz a0, a0
364 %red = call i1 @llvm.vector.reduce.umin.nxv8i1(<vscale x 8 x i1> %v)
368 declare i1 @llvm.vector.reduce.smin.nxv8i1(<vscale x 8 x i1>)
370 define zeroext i1 @vreduce_smin_nxv8i1(<vscale x 8 x i1> %v) {
371 ; CHECK-LABEL: vreduce_smin_nxv8i1:
373 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
374 ; CHECK-NEXT: vcpop.m a0, v0
375 ; CHECK-NEXT: snez a0, a0
377 %red = call i1 @llvm.vector.reduce.smin.nxv8i1(<vscale x 8 x i1> %v)
381 declare i1 @llvm.vector.reduce.or.nxv16i1(<vscale x 16 x i1>)
383 define zeroext i1 @vreduce_or_nxv16i1(<vscale x 16 x i1> %v) {
384 ; CHECK-LABEL: vreduce_or_nxv16i1:
386 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
387 ; CHECK-NEXT: vcpop.m a0, v0
388 ; CHECK-NEXT: snez a0, a0
390 %red = call i1 @llvm.vector.reduce.or.nxv16i1(<vscale x 16 x i1> %v)
394 declare i1 @llvm.vector.reduce.xor.nxv16i1(<vscale x 16 x i1>)
396 define zeroext i1 @vreduce_xor_nxv16i1(<vscale x 16 x i1> %v) {
397 ; CHECK-LABEL: vreduce_xor_nxv16i1:
399 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
400 ; CHECK-NEXT: vcpop.m a0, v0
401 ; CHECK-NEXT: andi a0, a0, 1
403 %red = call i1 @llvm.vector.reduce.xor.nxv16i1(<vscale x 16 x i1> %v)
407 declare i1 @llvm.vector.reduce.and.nxv16i1(<vscale x 16 x i1>)
409 define zeroext i1 @vreduce_and_nxv16i1(<vscale x 16 x i1> %v) {
410 ; CHECK-LABEL: vreduce_and_nxv16i1:
412 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
413 ; CHECK-NEXT: vmnot.m v8, v0
414 ; CHECK-NEXT: vcpop.m a0, v8
415 ; CHECK-NEXT: seqz a0, a0
417 %red = call i1 @llvm.vector.reduce.and.nxv16i1(<vscale x 16 x i1> %v)
421 declare i1 @llvm.vector.reduce.umax.nxv16i1(<vscale x 16 x i1>)
423 define zeroext i1 @vreduce_umax_nxv16i1(<vscale x 16 x i1> %v) {
424 ; CHECK-LABEL: vreduce_umax_nxv16i1:
426 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
427 ; CHECK-NEXT: vcpop.m a0, v0
428 ; CHECK-NEXT: snez a0, a0
430 %red = call i1 @llvm.vector.reduce.umax.nxv16i1(<vscale x 16 x i1> %v)
434 declare i1 @llvm.vector.reduce.smax.nxv16i1(<vscale x 16 x i1>)
436 define zeroext i1 @vreduce_smax_nxv16i1(<vscale x 16 x i1> %v) {
437 ; CHECK-LABEL: vreduce_smax_nxv16i1:
439 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
440 ; CHECK-NEXT: vmnot.m v8, v0
441 ; CHECK-NEXT: vcpop.m a0, v8
442 ; CHECK-NEXT: seqz a0, a0
444 %red = call i1 @llvm.vector.reduce.smax.nxv16i1(<vscale x 16 x i1> %v)
448 declare i1 @llvm.vector.reduce.umin.nxv16i1(<vscale x 16 x i1>)
450 define zeroext i1 @vreduce_umin_nxv16i1(<vscale x 16 x i1> %v) {
451 ; CHECK-LABEL: vreduce_umin_nxv16i1:
453 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
454 ; CHECK-NEXT: vmnot.m v8, v0
455 ; CHECK-NEXT: vcpop.m a0, v8
456 ; CHECK-NEXT: seqz a0, a0
458 %red = call i1 @llvm.vector.reduce.umin.nxv16i1(<vscale x 16 x i1> %v)
462 declare i1 @llvm.vector.reduce.smin.nxv16i1(<vscale x 16 x i1>)
464 define zeroext i1 @vreduce_smin_nxv16i1(<vscale x 16 x i1> %v) {
465 ; CHECK-LABEL: vreduce_smin_nxv16i1:
467 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
468 ; CHECK-NEXT: vcpop.m a0, v0
469 ; CHECK-NEXT: snez a0, a0
471 %red = call i1 @llvm.vector.reduce.smin.nxv16i1(<vscale x 16 x i1> %v)
475 declare i1 @llvm.vector.reduce.or.nxv32i1(<vscale x 32 x i1>)
477 define zeroext i1 @vreduce_or_nxv32i1(<vscale x 32 x i1> %v) {
478 ; CHECK-LABEL: vreduce_or_nxv32i1:
480 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
481 ; CHECK-NEXT: vcpop.m a0, v0
482 ; CHECK-NEXT: snez a0, a0
484 %red = call i1 @llvm.vector.reduce.or.nxv32i1(<vscale x 32 x i1> %v)
488 declare i1 @llvm.vector.reduce.xor.nxv32i1(<vscale x 32 x i1>)
490 define zeroext i1 @vreduce_xor_nxv32i1(<vscale x 32 x i1> %v) {
491 ; CHECK-LABEL: vreduce_xor_nxv32i1:
493 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
494 ; CHECK-NEXT: vcpop.m a0, v0
495 ; CHECK-NEXT: andi a0, a0, 1
497 %red = call i1 @llvm.vector.reduce.xor.nxv32i1(<vscale x 32 x i1> %v)
501 declare i1 @llvm.vector.reduce.and.nxv32i1(<vscale x 32 x i1>)
503 define zeroext i1 @vreduce_and_nxv32i1(<vscale x 32 x i1> %v) {
504 ; CHECK-LABEL: vreduce_and_nxv32i1:
506 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
507 ; CHECK-NEXT: vmnot.m v8, v0
508 ; CHECK-NEXT: vcpop.m a0, v8
509 ; CHECK-NEXT: seqz a0, a0
511 %red = call i1 @llvm.vector.reduce.and.nxv32i1(<vscale x 32 x i1> %v)
515 declare i1 @llvm.vector.reduce.umax.nxv32i1(<vscale x 32 x i1>)
517 define zeroext i1 @vreduce_umax_nxv32i1(<vscale x 32 x i1> %v) {
518 ; CHECK-LABEL: vreduce_umax_nxv32i1:
520 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
521 ; CHECK-NEXT: vcpop.m a0, v0
522 ; CHECK-NEXT: snez a0, a0
524 %red = call i1 @llvm.vector.reduce.umax.nxv32i1(<vscale x 32 x i1> %v)
528 declare i1 @llvm.vector.reduce.smax.nxv32i1(<vscale x 32 x i1>)
530 define zeroext i1 @vreduce_smax_nxv32i1(<vscale x 32 x i1> %v) {
531 ; CHECK-LABEL: vreduce_smax_nxv32i1:
533 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
534 ; CHECK-NEXT: vmnot.m v8, v0
535 ; CHECK-NEXT: vcpop.m a0, v8
536 ; CHECK-NEXT: seqz a0, a0
538 %red = call i1 @llvm.vector.reduce.smax.nxv32i1(<vscale x 32 x i1> %v)
542 declare i1 @llvm.vector.reduce.umin.nxv32i1(<vscale x 32 x i1>)
544 define zeroext i1 @vreduce_umin_nxv32i1(<vscale x 32 x i1> %v) {
545 ; CHECK-LABEL: vreduce_umin_nxv32i1:
547 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
548 ; CHECK-NEXT: vmnot.m v8, v0
549 ; CHECK-NEXT: vcpop.m a0, v8
550 ; CHECK-NEXT: seqz a0, a0
552 %red = call i1 @llvm.vector.reduce.umin.nxv32i1(<vscale x 32 x i1> %v)
556 declare i1 @llvm.vector.reduce.smin.nxv32i1(<vscale x 32 x i1>)
558 define zeroext i1 @vreduce_smin_nxv32i1(<vscale x 32 x i1> %v) {
559 ; CHECK-LABEL: vreduce_smin_nxv32i1:
561 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
562 ; CHECK-NEXT: vcpop.m a0, v0
563 ; CHECK-NEXT: snez a0, a0
565 %red = call i1 @llvm.vector.reduce.smin.nxv32i1(<vscale x 32 x i1> %v)
569 declare i1 @llvm.vector.reduce.or.nxv64i1(<vscale x 64 x i1>)
571 define zeroext i1 @vreduce_or_nxv64i1(<vscale x 64 x i1> %v) {
572 ; CHECK-LABEL: vreduce_or_nxv64i1:
574 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
575 ; CHECK-NEXT: vcpop.m a0, v0
576 ; CHECK-NEXT: snez a0, a0
578 %red = call i1 @llvm.vector.reduce.or.nxv64i1(<vscale x 64 x i1> %v)
582 declare i1 @llvm.vector.reduce.xor.nxv64i1(<vscale x 64 x i1>)
584 define zeroext i1 @vreduce_xor_nxv64i1(<vscale x 64 x i1> %v) {
585 ; CHECK-LABEL: vreduce_xor_nxv64i1:
587 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
588 ; CHECK-NEXT: vcpop.m a0, v0
589 ; CHECK-NEXT: andi a0, a0, 1
591 %red = call i1 @llvm.vector.reduce.xor.nxv64i1(<vscale x 64 x i1> %v)
595 declare i1 @llvm.vector.reduce.and.nxv64i1(<vscale x 64 x i1>)
597 define zeroext i1 @vreduce_and_nxv64i1(<vscale x 64 x i1> %v) {
598 ; CHECK-LABEL: vreduce_and_nxv64i1:
600 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
601 ; CHECK-NEXT: vmnot.m v8, v0
602 ; CHECK-NEXT: vcpop.m a0, v8
603 ; CHECK-NEXT: seqz a0, a0
605 %red = call i1 @llvm.vector.reduce.and.nxv64i1(<vscale x 64 x i1> %v)
609 declare i1 @llvm.vector.reduce.umax.nxv64i1(<vscale x 64 x i1>)
611 define zeroext i1 @vreduce_umax_nxv64i1(<vscale x 64 x i1> %v) {
612 ; CHECK-LABEL: vreduce_umax_nxv64i1:
614 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
615 ; CHECK-NEXT: vcpop.m a0, v0
616 ; CHECK-NEXT: snez a0, a0
618 %red = call i1 @llvm.vector.reduce.umax.nxv64i1(<vscale x 64 x i1> %v)
622 declare i1 @llvm.vector.reduce.smax.nxv64i1(<vscale x 64 x i1>)
624 define zeroext i1 @vreduce_smax_nxv64i1(<vscale x 64 x i1> %v) {
625 ; CHECK-LABEL: vreduce_smax_nxv64i1:
627 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
628 ; CHECK-NEXT: vmnot.m v8, v0
629 ; CHECK-NEXT: vcpop.m a0, v8
630 ; CHECK-NEXT: seqz a0, a0
632 %red = call i1 @llvm.vector.reduce.smax.nxv64i1(<vscale x 64 x i1> %v)
636 declare i1 @llvm.vector.reduce.umin.nxv64i1(<vscale x 64 x i1>)
638 define zeroext i1 @vreduce_umin_nxv64i1(<vscale x 64 x i1> %v) {
639 ; CHECK-LABEL: vreduce_umin_nxv64i1:
641 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
642 ; CHECK-NEXT: vmnot.m v8, v0
643 ; CHECK-NEXT: vcpop.m a0, v8
644 ; CHECK-NEXT: seqz a0, a0
646 %red = call i1 @llvm.vector.reduce.umin.nxv64i1(<vscale x 64 x i1> %v)
650 declare i1 @llvm.vector.reduce.smin.nxv64i1(<vscale x 64 x i1>)
652 define zeroext i1 @vreduce_smin_nxv64i1(<vscale x 64 x i1> %v) {
653 ; CHECK-LABEL: vreduce_smin_nxv64i1:
655 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
656 ; CHECK-NEXT: vcpop.m a0, v0
657 ; CHECK-NEXT: snez a0, a0
659 %red = call i1 @llvm.vector.reduce.smin.nxv64i1(<vscale x 64 x i1> %v)
663 declare i1 @llvm.vector.reduce.add.nxv1i1(<vscale x 1 x i1>)
665 define zeroext i1 @vreduce_add_nxv1i1(<vscale x 1 x i1> %v) {
666 ; CHECK-LABEL: vreduce_add_nxv1i1:
668 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
669 ; CHECK-NEXT: vcpop.m a0, v0
670 ; CHECK-NEXT: andi a0, a0, 1
672 %red = call i1 @llvm.vector.reduce.add.nxv1i1(<vscale x 1 x i1> %v)
676 declare i1 @llvm.vector.reduce.add.nxv2i1(<vscale x 2 x i1>)
678 define zeroext i1 @vreduce_add_nxv2i1(<vscale x 2 x i1> %v) {
679 ; CHECK-LABEL: vreduce_add_nxv2i1:
681 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
682 ; CHECK-NEXT: vcpop.m a0, v0
683 ; CHECK-NEXT: andi a0, a0, 1
685 %red = call i1 @llvm.vector.reduce.add.nxv2i1(<vscale x 2 x i1> %v)
689 declare i1 @llvm.vector.reduce.add.nxv4i1(<vscale x 4 x i1>)
691 define zeroext i1 @vreduce_add_nxv4i1(<vscale x 4 x i1> %v) {
692 ; CHECK-LABEL: vreduce_add_nxv4i1:
694 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
695 ; CHECK-NEXT: vcpop.m a0, v0
696 ; CHECK-NEXT: andi a0, a0, 1
698 %red = call i1 @llvm.vector.reduce.add.nxv4i1(<vscale x 4 x i1> %v)
702 declare i1 @llvm.vector.reduce.add.nxv8i1(<vscale x 8 x i1>)
704 define zeroext i1 @vreduce_add_nxv8i1(<vscale x 8 x i1> %v) {
705 ; CHECK-LABEL: vreduce_add_nxv8i1:
707 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
708 ; CHECK-NEXT: vcpop.m a0, v0
709 ; CHECK-NEXT: andi a0, a0, 1
711 %red = call i1 @llvm.vector.reduce.add.nxv8i1(<vscale x 8 x i1> %v)
715 declare i1 @llvm.vector.reduce.add.nxv16i1(<vscale x 16 x i1>)
717 define zeroext i1 @vreduce_add_nxv16i1(<vscale x 16 x i1> %v) {
718 ; CHECK-LABEL: vreduce_add_nxv16i1:
720 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
721 ; CHECK-NEXT: vcpop.m a0, v0
722 ; CHECK-NEXT: andi a0, a0, 1
724 %red = call i1 @llvm.vector.reduce.add.nxv16i1(<vscale x 16 x i1> %v)
728 declare i1 @llvm.vector.reduce.add.nxv32i1(<vscale x 32 x i1>)
730 define zeroext i1 @vreduce_add_nxv32i1(<vscale x 32 x i1> %v) {
731 ; CHECK-LABEL: vreduce_add_nxv32i1:
733 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
734 ; CHECK-NEXT: vcpop.m a0, v0
735 ; CHECK-NEXT: andi a0, a0, 1
737 %red = call i1 @llvm.vector.reduce.add.nxv32i1(<vscale x 32 x i1> %v)
741 declare i1 @llvm.vector.reduce.add.nxv64i1(<vscale x 64 x i1>)
743 define zeroext i1 @vreduce_add_nxv64i1(<vscale x 64 x i1> %v) {
744 ; CHECK-LABEL: vreduce_add_nxv64i1:
746 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
747 ; CHECK-NEXT: vcpop.m a0, v0
748 ; CHECK-NEXT: andi a0, a0, 1
750 %red = call i1 @llvm.vector.reduce.add.nxv64i1(<vscale x 64 x i1> %v)