1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
5 declare i1 @llvm.vp.reduce.and.v1i1(i1, <1 x i1>, <1 x i1>, i32)
7 define zeroext i1 @vpreduce_and_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
8 ; CHECK-LABEL: vpreduce_and_v1i1:
10 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
11 ; CHECK-NEXT: vmnot.m v9, v0
12 ; CHECK-NEXT: vmv1r.v v0, v8
13 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
14 ; CHECK-NEXT: seqz a1, a1
15 ; CHECK-NEXT: and a0, a1, a0
17 %r = call i1 @llvm.vp.reduce.and.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
21 declare i1 @llvm.vp.reduce.or.v1i1(i1, <1 x i1>, <1 x i1>, i32)
23 define zeroext i1 @vpreduce_or_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
24 ; CHECK-LABEL: vpreduce_or_v1i1:
26 ; CHECK-NEXT: vmv1r.v v9, v0
27 ; CHECK-NEXT: vmv1r.v v0, v8
28 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
29 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
30 ; CHECK-NEXT: snez a1, a1
31 ; CHECK-NEXT: or a0, a1, a0
33 %r = call i1 @llvm.vp.reduce.or.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
37 declare i1 @llvm.vp.reduce.xor.v1i1(i1, <1 x i1>, <1 x i1>, i32)
39 define zeroext i1 @vpreduce_xor_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
40 ; CHECK-LABEL: vpreduce_xor_v1i1:
42 ; CHECK-NEXT: vmv1r.v v9, v0
43 ; CHECK-NEXT: vmv1r.v v0, v8
44 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
45 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
46 ; CHECK-NEXT: andi a1, a1, 1
47 ; CHECK-NEXT: xor a0, a1, a0
49 %r = call i1 @llvm.vp.reduce.xor.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
53 declare i1 @llvm.vp.reduce.and.v2i1(i1, <2 x i1>, <2 x i1>, i32)
55 define zeroext i1 @vpreduce_and_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
56 ; CHECK-LABEL: vpreduce_and_v2i1:
58 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
59 ; CHECK-NEXT: vmnot.m v9, v0
60 ; CHECK-NEXT: vmv1r.v v0, v8
61 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
62 ; CHECK-NEXT: seqz a1, a1
63 ; CHECK-NEXT: and a0, a1, a0
65 %r = call i1 @llvm.vp.reduce.and.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
69 declare i1 @llvm.vp.reduce.or.v2i1(i1, <2 x i1>, <2 x i1>, i32)
71 define zeroext i1 @vpreduce_or_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
72 ; CHECK-LABEL: vpreduce_or_v2i1:
74 ; CHECK-NEXT: vmv1r.v v9, v0
75 ; CHECK-NEXT: vmv1r.v v0, v8
76 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
77 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
78 ; CHECK-NEXT: snez a1, a1
79 ; CHECK-NEXT: or a0, a1, a0
81 %r = call i1 @llvm.vp.reduce.or.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
85 declare i1 @llvm.vp.reduce.xor.v2i1(i1, <2 x i1>, <2 x i1>, i32)
87 define zeroext i1 @vpreduce_xor_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
88 ; CHECK-LABEL: vpreduce_xor_v2i1:
90 ; CHECK-NEXT: vmv1r.v v9, v0
91 ; CHECK-NEXT: vmv1r.v v0, v8
92 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
93 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
94 ; CHECK-NEXT: andi a1, a1, 1
95 ; CHECK-NEXT: xor a0, a1, a0
97 %r = call i1 @llvm.vp.reduce.xor.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
101 declare i1 @llvm.vp.reduce.and.v4i1(i1, <4 x i1>, <4 x i1>, i32)
103 define zeroext i1 @vpreduce_and_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
104 ; CHECK-LABEL: vpreduce_and_v4i1:
106 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
107 ; CHECK-NEXT: vmnot.m v9, v0
108 ; CHECK-NEXT: vmv1r.v v0, v8
109 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
110 ; CHECK-NEXT: seqz a1, a1
111 ; CHECK-NEXT: and a0, a1, a0
113 %r = call i1 @llvm.vp.reduce.and.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
117 declare i1 @llvm.vp.reduce.or.v4i1(i1, <4 x i1>, <4 x i1>, i32)
119 define zeroext i1 @vpreduce_or_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
120 ; CHECK-LABEL: vpreduce_or_v4i1:
122 ; CHECK-NEXT: vmv1r.v v9, v0
123 ; CHECK-NEXT: vmv1r.v v0, v8
124 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
125 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
126 ; CHECK-NEXT: snez a1, a1
127 ; CHECK-NEXT: or a0, a1, a0
129 %r = call i1 @llvm.vp.reduce.or.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
133 declare i1 @llvm.vp.reduce.xor.v4i1(i1, <4 x i1>, <4 x i1>, i32)
135 define zeroext i1 @vpreduce_xor_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
136 ; CHECK-LABEL: vpreduce_xor_v4i1:
138 ; CHECK-NEXT: vmv1r.v v9, v0
139 ; CHECK-NEXT: vmv1r.v v0, v8
140 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
141 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
142 ; CHECK-NEXT: andi a1, a1, 1
143 ; CHECK-NEXT: xor a0, a1, a0
145 %r = call i1 @llvm.vp.reduce.xor.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
149 declare i1 @llvm.vp.reduce.and.v8i1(i1, <8 x i1>, <8 x i1>, i32)
151 define zeroext i1 @vpreduce_and_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
152 ; CHECK-LABEL: vpreduce_and_v8i1:
154 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
155 ; CHECK-NEXT: vmnot.m v9, v0
156 ; CHECK-NEXT: vmv1r.v v0, v8
157 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
158 ; CHECK-NEXT: seqz a1, a1
159 ; CHECK-NEXT: and a0, a1, a0
161 %r = call i1 @llvm.vp.reduce.and.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
165 declare i1 @llvm.vp.reduce.or.v8i1(i1, <8 x i1>, <8 x i1>, i32)
167 define zeroext i1 @vpreduce_or_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
168 ; CHECK-LABEL: vpreduce_or_v8i1:
170 ; CHECK-NEXT: vmv1r.v v9, v0
171 ; CHECK-NEXT: vmv1r.v v0, v8
172 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
173 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
174 ; CHECK-NEXT: snez a1, a1
175 ; CHECK-NEXT: or a0, a1, a0
177 %r = call i1 @llvm.vp.reduce.or.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
181 declare i1 @llvm.vp.reduce.xor.v8i1(i1, <8 x i1>, <8 x i1>, i32)
183 define zeroext i1 @vpreduce_xor_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
184 ; CHECK-LABEL: vpreduce_xor_v8i1:
186 ; CHECK-NEXT: vmv1r.v v9, v0
187 ; CHECK-NEXT: vmv1r.v v0, v8
188 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
189 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
190 ; CHECK-NEXT: andi a1, a1, 1
191 ; CHECK-NEXT: xor a0, a1, a0
193 %r = call i1 @llvm.vp.reduce.xor.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
197 declare i1 @llvm.vp.reduce.and.v10i1(i1, <10 x i1>, <10 x i1>, i32)
199 define zeroext i1 @vpreduce_and_v10i1(i1 zeroext %s, <10 x i1> %v, <10 x i1> %m, i32 zeroext %evl) {
200 ; CHECK-LABEL: vpreduce_and_v10i1:
202 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
203 ; CHECK-NEXT: vmnot.m v9, v0
204 ; CHECK-NEXT: vmv1r.v v0, v8
205 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
206 ; CHECK-NEXT: seqz a1, a1
207 ; CHECK-NEXT: and a0, a1, a0
209 %r = call i1 @llvm.vp.reduce.and.v10i1(i1 %s, <10 x i1> %v, <10 x i1> %m, i32 %evl)
213 declare i1 @llvm.vp.reduce.and.v16i1(i1, <16 x i1>, <16 x i1>, i32)
215 define zeroext i1 @vpreduce_and_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
216 ; CHECK-LABEL: vpreduce_and_v16i1:
218 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
219 ; CHECK-NEXT: vmnot.m v9, v0
220 ; CHECK-NEXT: vmv1r.v v0, v8
221 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
222 ; CHECK-NEXT: seqz a1, a1
223 ; CHECK-NEXT: and a0, a1, a0
225 %r = call i1 @llvm.vp.reduce.and.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
229 declare i1 @llvm.vp.reduce.and.v256i1(i1, <256 x i1>, <256 x i1>, i32)
231 define zeroext i1 @vpreduce_and_v256i1(i1 zeroext %s, <256 x i1> %v, <256 x i1> %m, i32 zeroext %evl) {
232 ; CHECK-LABEL: vpreduce_and_v256i1:
234 ; CHECK-NEXT: vmv1r.v v11, v9
235 ; CHECK-NEXT: vmv1r.v v9, v0
236 ; CHECK-NEXT: li a3, 128
237 ; CHECK-NEXT: mv a2, a1
238 ; CHECK-NEXT: bltu a1, a3, .LBB14_2
239 ; CHECK-NEXT: # %bb.1:
240 ; CHECK-NEXT: li a2, 128
241 ; CHECK-NEXT: .LBB14_2:
242 ; CHECK-NEXT: vmv1r.v v0, v11
243 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
244 ; CHECK-NEXT: vmnot.m v9, v9
245 ; CHECK-NEXT: vcpop.m a2, v9, v0.t
246 ; CHECK-NEXT: seqz a2, a2
247 ; CHECK-NEXT: and a0, a2, a0
248 ; CHECK-NEXT: addi a2, a1, -128
249 ; CHECK-NEXT: sltu a1, a1, a2
250 ; CHECK-NEXT: addi a1, a1, -1
251 ; CHECK-NEXT: and a1, a1, a2
252 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
253 ; CHECK-NEXT: vmnot.m v8, v8
254 ; CHECK-NEXT: vmv1r.v v0, v10
255 ; CHECK-NEXT: vcpop.m a1, v8, v0.t
256 ; CHECK-NEXT: seqz a1, a1
257 ; CHECK-NEXT: and a0, a1, a0
259 %r = call i1 @llvm.vp.reduce.and.v256i1(i1 %s, <256 x i1> %v, <256 x i1> %m, i32 %evl)
263 declare i1 @llvm.vp.reduce.or.v16i1(i1, <16 x i1>, <16 x i1>, i32)
265 define zeroext i1 @vpreduce_or_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
266 ; CHECK-LABEL: vpreduce_or_v16i1:
268 ; CHECK-NEXT: vmv1r.v v9, v0
269 ; CHECK-NEXT: vmv1r.v v0, v8
270 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
271 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
272 ; CHECK-NEXT: snez a1, a1
273 ; CHECK-NEXT: or a0, a1, a0
275 %r = call i1 @llvm.vp.reduce.or.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
279 declare i1 @llvm.vp.reduce.xor.v16i1(i1, <16 x i1>, <16 x i1>, i32)
281 define zeroext i1 @vpreduce_xor_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
282 ; CHECK-LABEL: vpreduce_xor_v16i1:
284 ; CHECK-NEXT: vmv1r.v v9, v0
285 ; CHECK-NEXT: vmv1r.v v0, v8
286 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
287 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
288 ; CHECK-NEXT: andi a1, a1, 1
289 ; CHECK-NEXT: xor a0, a1, a0
291 %r = call i1 @llvm.vp.reduce.xor.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
295 declare i1 @llvm.vp.reduce.add.v1i1(i1, <1 x i1>, <1 x i1>, i32)
297 define zeroext i1 @vpreduce_add_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
298 ; CHECK-LABEL: vpreduce_add_v1i1:
300 ; CHECK-NEXT: vmv1r.v v9, v0
301 ; CHECK-NEXT: vmv1r.v v0, v8
302 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
303 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
304 ; CHECK-NEXT: andi a1, a1, 1
305 ; CHECK-NEXT: xor a0, a1, a0
307 %r = call i1 @llvm.vp.reduce.add.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
311 declare i1 @llvm.vp.reduce.add.v2i1(i1, <2 x i1>, <2 x i1>, i32)
313 define zeroext i1 @vpreduce_add_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
314 ; CHECK-LABEL: vpreduce_add_v2i1:
316 ; CHECK-NEXT: vmv1r.v v9, v0
317 ; CHECK-NEXT: vmv1r.v v0, v8
318 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
319 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
320 ; CHECK-NEXT: andi a1, a1, 1
321 ; CHECK-NEXT: xor a0, a1, a0
323 %r = call i1 @llvm.vp.reduce.add.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
327 declare i1 @llvm.vp.reduce.add.v4i1(i1, <4 x i1>, <4 x i1>, i32)
329 define zeroext i1 @vpreduce_add_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
330 ; CHECK-LABEL: vpreduce_add_v4i1:
332 ; CHECK-NEXT: vmv1r.v v9, v0
333 ; CHECK-NEXT: vmv1r.v v0, v8
334 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
335 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
336 ; CHECK-NEXT: andi a1, a1, 1
337 ; CHECK-NEXT: xor a0, a1, a0
339 %r = call i1 @llvm.vp.reduce.add.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
343 declare i1 @llvm.vp.reduce.add.v8i1(i1, <8 x i1>, <8 x i1>, i32)
345 define zeroext i1 @vpreduce_add_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
346 ; CHECK-LABEL: vpreduce_add_v8i1:
348 ; CHECK-NEXT: vmv1r.v v9, v0
349 ; CHECK-NEXT: vmv1r.v v0, v8
350 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
351 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
352 ; CHECK-NEXT: andi a1, a1, 1
353 ; CHECK-NEXT: xor a0, a1, a0
355 %r = call i1 @llvm.vp.reduce.add.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
359 declare i1 @llvm.vp.reduce.add.v16i1(i1, <16 x i1>, <16 x i1>, i32)
361 define zeroext i1 @vpreduce_add_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
362 ; CHECK-LABEL: vpreduce_add_v16i1:
364 ; CHECK-NEXT: vmv1r.v v9, v0
365 ; CHECK-NEXT: vmv1r.v v0, v8
366 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
367 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
368 ; CHECK-NEXT: andi a1, a1, 1
369 ; CHECK-NEXT: xor a0, a1, a0
371 %r = call i1 @llvm.vp.reduce.add.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
375 declare i1 @llvm.vp.reduce.smax.v1i1(i1, <1 x i1>, <1 x i1>, i32)
377 define zeroext i1 @vpreduce_smax_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
378 ; CHECK-LABEL: vpreduce_smax_v1i1:
380 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
381 ; CHECK-NEXT: vmnot.m v9, v0
382 ; CHECK-NEXT: vmv1r.v v0, v8
383 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
384 ; CHECK-NEXT: seqz a1, a1
385 ; CHECK-NEXT: and a0, a1, a0
387 %r = call i1 @llvm.vp.reduce.smax.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
391 declare i1 @llvm.vp.reduce.smax.v2i1(i1, <2 x i1>, <2 x i1>, i32)
393 define zeroext i1 @vpreduce_smax_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
394 ; CHECK-LABEL: vpreduce_smax_v2i1:
396 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
397 ; CHECK-NEXT: vmnot.m v9, v0
398 ; CHECK-NEXT: vmv1r.v v0, v8
399 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
400 ; CHECK-NEXT: seqz a1, a1
401 ; CHECK-NEXT: and a0, a1, a0
403 %r = call i1 @llvm.vp.reduce.smax.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
407 declare i1 @llvm.vp.reduce.smax.v4i1(i1, <4 x i1>, <4 x i1>, i32)
409 define zeroext i1 @vpreduce_smax_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
410 ; CHECK-LABEL: vpreduce_smax_v4i1:
412 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
413 ; CHECK-NEXT: vmnot.m v9, v0
414 ; CHECK-NEXT: vmv1r.v v0, v8
415 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
416 ; CHECK-NEXT: seqz a1, a1
417 ; CHECK-NEXT: and a0, a1, a0
419 %r = call i1 @llvm.vp.reduce.smax.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
423 declare i1 @llvm.vp.reduce.smax.v8i1(i1, <8 x i1>, <8 x i1>, i32)
425 define zeroext i1 @vpreduce_smax_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
426 ; CHECK-LABEL: vpreduce_smax_v8i1:
428 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
429 ; CHECK-NEXT: vmnot.m v9, v0
430 ; CHECK-NEXT: vmv1r.v v0, v8
431 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
432 ; CHECK-NEXT: seqz a1, a1
433 ; CHECK-NEXT: and a0, a1, a0
435 %r = call i1 @llvm.vp.reduce.smax.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
439 declare i1 @llvm.vp.reduce.smax.v16i1(i1, <16 x i1>, <16 x i1>, i32)
441 define zeroext i1 @vpreduce_smax_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
442 ; CHECK-LABEL: vpreduce_smax_v16i1:
444 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
445 ; CHECK-NEXT: vmnot.m v9, v0
446 ; CHECK-NEXT: vmv1r.v v0, v8
447 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
448 ; CHECK-NEXT: seqz a1, a1
449 ; CHECK-NEXT: and a0, a1, a0
451 %r = call i1 @llvm.vp.reduce.smax.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
455 declare i1 @llvm.vp.reduce.smax.v32i1(i1, <32 x i1>, <32 x i1>, i32)
457 define zeroext i1 @vpreduce_smax_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
458 ; CHECK-LABEL: vpreduce_smax_v32i1:
460 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
461 ; CHECK-NEXT: vmnot.m v9, v0
462 ; CHECK-NEXT: vmv1r.v v0, v8
463 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
464 ; CHECK-NEXT: seqz a1, a1
465 ; CHECK-NEXT: and a0, a1, a0
467 %r = call i1 @llvm.vp.reduce.smax.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
471 declare i1 @llvm.vp.reduce.smax.v64i1(i1, <64 x i1>, <64 x i1>, i32)
473 define zeroext i1 @vpreduce_smax_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
474 ; CHECK-LABEL: vpreduce_smax_v64i1:
476 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
477 ; CHECK-NEXT: vmnot.m v9, v0
478 ; CHECK-NEXT: vmv1r.v v0, v8
479 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
480 ; CHECK-NEXT: seqz a1, a1
481 ; CHECK-NEXT: and a0, a1, a0
483 %r = call i1 @llvm.vp.reduce.smax.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
487 declare i1 @llvm.vp.reduce.smin.v1i1(i1, <1 x i1>, <1 x i1>, i32)
489 define zeroext i1 @vpreduce_smin_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
490 ; CHECK-LABEL: vpreduce_smin_v1i1:
492 ; CHECK-NEXT: vmv1r.v v9, v0
493 ; CHECK-NEXT: vmv1r.v v0, v8
494 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
495 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
496 ; CHECK-NEXT: snez a1, a1
497 ; CHECK-NEXT: or a0, a1, a0
499 %r = call i1 @llvm.vp.reduce.smin.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
503 declare i1 @llvm.vp.reduce.smin.v2i1(i1, <2 x i1>, <2 x i1>, i32)
505 define zeroext i1 @vpreduce_smin_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
506 ; CHECK-LABEL: vpreduce_smin_v2i1:
508 ; CHECK-NEXT: vmv1r.v v9, v0
509 ; CHECK-NEXT: vmv1r.v v0, v8
510 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
511 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
512 ; CHECK-NEXT: snez a1, a1
513 ; CHECK-NEXT: or a0, a1, a0
515 %r = call i1 @llvm.vp.reduce.smin.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
519 declare i1 @llvm.vp.reduce.smin.v4i1(i1, <4 x i1>, <4 x i1>, i32)
521 define zeroext i1 @vpreduce_smin_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
522 ; CHECK-LABEL: vpreduce_smin_v4i1:
524 ; CHECK-NEXT: vmv1r.v v9, v0
525 ; CHECK-NEXT: vmv1r.v v0, v8
526 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
527 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
528 ; CHECK-NEXT: snez a1, a1
529 ; CHECK-NEXT: or a0, a1, a0
531 %r = call i1 @llvm.vp.reduce.smin.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
535 declare i1 @llvm.vp.reduce.smin.v8i1(i1, <8 x i1>, <8 x i1>, i32)
537 define zeroext i1 @vpreduce_smin_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
538 ; CHECK-LABEL: vpreduce_smin_v8i1:
540 ; CHECK-NEXT: vmv1r.v v9, v0
541 ; CHECK-NEXT: vmv1r.v v0, v8
542 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
543 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
544 ; CHECK-NEXT: snez a1, a1
545 ; CHECK-NEXT: or a0, a1, a0
547 %r = call i1 @llvm.vp.reduce.smin.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
551 declare i1 @llvm.vp.reduce.smin.v16i1(i1, <16 x i1>, <16 x i1>, i32)
553 define zeroext i1 @vpreduce_smin_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
554 ; CHECK-LABEL: vpreduce_smin_v16i1:
556 ; CHECK-NEXT: vmv1r.v v9, v0
557 ; CHECK-NEXT: vmv1r.v v0, v8
558 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
559 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
560 ; CHECK-NEXT: snez a1, a1
561 ; CHECK-NEXT: or a0, a1, a0
563 %r = call i1 @llvm.vp.reduce.smin.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
567 declare i1 @llvm.vp.reduce.smin.v32i1(i1, <32 x i1>, <32 x i1>, i32)
569 define zeroext i1 @vpreduce_smin_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
570 ; CHECK-LABEL: vpreduce_smin_v32i1:
572 ; CHECK-NEXT: vmv1r.v v9, v0
573 ; CHECK-NEXT: vmv1r.v v0, v8
574 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
575 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
576 ; CHECK-NEXT: snez a1, a1
577 ; CHECK-NEXT: or a0, a1, a0
579 %r = call i1 @llvm.vp.reduce.smin.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
583 declare i1 @llvm.vp.reduce.smin.v64i1(i1, <64 x i1>, <64 x i1>, i32)
585 define zeroext i1 @vpreduce_smin_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
586 ; CHECK-LABEL: vpreduce_smin_v64i1:
588 ; CHECK-NEXT: vmv1r.v v9, v0
589 ; CHECK-NEXT: vmv1r.v v0, v8
590 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
591 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
592 ; CHECK-NEXT: snez a1, a1
593 ; CHECK-NEXT: or a0, a1, a0
595 %r = call i1 @llvm.vp.reduce.smin.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
599 declare i1 @llvm.vp.reduce.umax.v1i1(i1, <1 x i1>, <1 x i1>, i32)
601 define zeroext i1 @vpreduce_umax_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
602 ; CHECK-LABEL: vpreduce_umax_v1i1:
604 ; CHECK-NEXT: vmv1r.v v9, v0
605 ; CHECK-NEXT: vmv1r.v v0, v8
606 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
607 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
608 ; CHECK-NEXT: snez a1, a1
609 ; CHECK-NEXT: or a0, a1, a0
611 %r = call i1 @llvm.vp.reduce.umax.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
615 declare i1 @llvm.vp.reduce.umax.v2i1(i1, <2 x i1>, <2 x i1>, i32)
617 define zeroext i1 @vpreduce_umax_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
618 ; CHECK-LABEL: vpreduce_umax_v2i1:
620 ; CHECK-NEXT: vmv1r.v v9, v0
621 ; CHECK-NEXT: vmv1r.v v0, v8
622 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
623 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
624 ; CHECK-NEXT: snez a1, a1
625 ; CHECK-NEXT: or a0, a1, a0
627 %r = call i1 @llvm.vp.reduce.umax.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
631 declare i1 @llvm.vp.reduce.umax.v4i1(i1, <4 x i1>, <4 x i1>, i32)
633 define zeroext i1 @vpreduce_umax_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
634 ; CHECK-LABEL: vpreduce_umax_v4i1:
636 ; CHECK-NEXT: vmv1r.v v9, v0
637 ; CHECK-NEXT: vmv1r.v v0, v8
638 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
639 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
640 ; CHECK-NEXT: snez a1, a1
641 ; CHECK-NEXT: or a0, a1, a0
643 %r = call i1 @llvm.vp.reduce.umax.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
647 declare i1 @llvm.vp.reduce.umax.v8i1(i1, <8 x i1>, <8 x i1>, i32)
649 define zeroext i1 @vpreduce_umax_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
650 ; CHECK-LABEL: vpreduce_umax_v8i1:
652 ; CHECK-NEXT: vmv1r.v v9, v0
653 ; CHECK-NEXT: vmv1r.v v0, v8
654 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
655 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
656 ; CHECK-NEXT: snez a1, a1
657 ; CHECK-NEXT: or a0, a1, a0
659 %r = call i1 @llvm.vp.reduce.umax.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
663 declare i1 @llvm.vp.reduce.umax.v16i1(i1, <16 x i1>, <16 x i1>, i32)
665 define zeroext i1 @vpreduce_umax_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
666 ; CHECK-LABEL: vpreduce_umax_v16i1:
668 ; CHECK-NEXT: vmv1r.v v9, v0
669 ; CHECK-NEXT: vmv1r.v v0, v8
670 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
671 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
672 ; CHECK-NEXT: snez a1, a1
673 ; CHECK-NEXT: or a0, a1, a0
675 %r = call i1 @llvm.vp.reduce.umax.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
679 declare i1 @llvm.vp.reduce.umax.v32i1(i1, <32 x i1>, <32 x i1>, i32)
681 define zeroext i1 @vpreduce_umax_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
682 ; CHECK-LABEL: vpreduce_umax_v32i1:
684 ; CHECK-NEXT: vmv1r.v v9, v0
685 ; CHECK-NEXT: vmv1r.v v0, v8
686 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
687 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
688 ; CHECK-NEXT: snez a1, a1
689 ; CHECK-NEXT: or a0, a1, a0
691 %r = call i1 @llvm.vp.reduce.umax.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
695 declare i1 @llvm.vp.reduce.umax.v64i1(i1, <64 x i1>, <64 x i1>, i32)
697 define zeroext i1 @vpreduce_umax_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
698 ; CHECK-LABEL: vpreduce_umax_v64i1:
700 ; CHECK-NEXT: vmv1r.v v9, v0
701 ; CHECK-NEXT: vmv1r.v v0, v8
702 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
703 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
704 ; CHECK-NEXT: snez a1, a1
705 ; CHECK-NEXT: or a0, a1, a0
707 %r = call i1 @llvm.vp.reduce.umax.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
711 declare i1 @llvm.vp.reduce.umin.v1i1(i1, <1 x i1>, <1 x i1>, i32)
713 define zeroext i1 @vpreduce_umin_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
714 ; CHECK-LABEL: vpreduce_umin_v1i1:
716 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
717 ; CHECK-NEXT: vmnot.m v9, v0
718 ; CHECK-NEXT: vmv1r.v v0, v8
719 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
720 ; CHECK-NEXT: seqz a1, a1
721 ; CHECK-NEXT: and a0, a1, a0
723 %r = call i1 @llvm.vp.reduce.umin.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
727 declare i1 @llvm.vp.reduce.umin.v2i1(i1, <2 x i1>, <2 x i1>, i32)
729 define zeroext i1 @vpreduce_umin_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
730 ; CHECK-LABEL: vpreduce_umin_v2i1:
732 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
733 ; CHECK-NEXT: vmnot.m v9, v0
734 ; CHECK-NEXT: vmv1r.v v0, v8
735 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
736 ; CHECK-NEXT: seqz a1, a1
737 ; CHECK-NEXT: and a0, a1, a0
739 %r = call i1 @llvm.vp.reduce.umin.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
743 declare i1 @llvm.vp.reduce.umin.v4i1(i1, <4 x i1>, <4 x i1>, i32)
745 define zeroext i1 @vpreduce_umin_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
746 ; CHECK-LABEL: vpreduce_umin_v4i1:
748 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
749 ; CHECK-NEXT: vmnot.m v9, v0
750 ; CHECK-NEXT: vmv1r.v v0, v8
751 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
752 ; CHECK-NEXT: seqz a1, a1
753 ; CHECK-NEXT: and a0, a1, a0
755 %r = call i1 @llvm.vp.reduce.umin.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
759 declare i1 @llvm.vp.reduce.umin.v8i1(i1, <8 x i1>, <8 x i1>, i32)
761 define zeroext i1 @vpreduce_umin_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
762 ; CHECK-LABEL: vpreduce_umin_v8i1:
764 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
765 ; CHECK-NEXT: vmnot.m v9, v0
766 ; CHECK-NEXT: vmv1r.v v0, v8
767 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
768 ; CHECK-NEXT: seqz a1, a1
769 ; CHECK-NEXT: and a0, a1, a0
771 %r = call i1 @llvm.vp.reduce.umin.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
775 declare i1 @llvm.vp.reduce.umin.v16i1(i1, <16 x i1>, <16 x i1>, i32)
777 define zeroext i1 @vpreduce_umin_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
778 ; CHECK-LABEL: vpreduce_umin_v16i1:
780 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
781 ; CHECK-NEXT: vmnot.m v9, v0
782 ; CHECK-NEXT: vmv1r.v v0, v8
783 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
784 ; CHECK-NEXT: seqz a1, a1
785 ; CHECK-NEXT: and a0, a1, a0
787 %r = call i1 @llvm.vp.reduce.umin.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
791 declare i1 @llvm.vp.reduce.umin.v32i1(i1, <32 x i1>, <32 x i1>, i32)
793 define zeroext i1 @vpreduce_umin_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
794 ; CHECK-LABEL: vpreduce_umin_v32i1:
796 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
797 ; CHECK-NEXT: vmnot.m v9, v0
798 ; CHECK-NEXT: vmv1r.v v0, v8
799 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
800 ; CHECK-NEXT: seqz a1, a1
801 ; CHECK-NEXT: and a0, a1, a0
803 %r = call i1 @llvm.vp.reduce.umin.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
807 declare i1 @llvm.vp.reduce.umin.v64i1(i1, <64 x i1>, <64 x i1>, i32)
809 define zeroext i1 @vpreduce_umin_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
810 ; CHECK-LABEL: vpreduce_umin_v64i1:
812 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
813 ; CHECK-NEXT: vmnot.m v9, v0
814 ; CHECK-NEXT: vmv1r.v v0, v8
815 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
816 ; CHECK-NEXT: seqz a1, a1
817 ; CHECK-NEXT: and a0, a1, a0
819 %r = call i1 @llvm.vp.reduce.umin.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
823 declare i1 @llvm.vp.reduce.mul.v1i1(i1, <1 x i1>, <1 x i1>, i32)
825 define i1 @vpreduce_mul_v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
826 ; CHECK-LABEL: vpreduce_mul_v1i1:
828 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
829 ; CHECK-NEXT: vmnot.m v9, v0
830 ; CHECK-NEXT: vmv1r.v v0, v8
831 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
832 ; CHECK-NEXT: seqz a1, a1
833 ; CHECK-NEXT: and a0, a1, a0
835 %r = call i1 @llvm.vp.reduce.mul.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
839 declare i1 @llvm.vp.reduce.mul.v2i1(i1, <2 x i1>, <2 x i1>, i32)
841 define zeroext i1 @vpreduce_mul_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
842 ; CHECK-LABEL: vpreduce_mul_v2i1:
844 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
845 ; CHECK-NEXT: vmnot.m v9, v0
846 ; CHECK-NEXT: vmv1r.v v0, v8
847 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
848 ; CHECK-NEXT: seqz a1, a1
849 ; CHECK-NEXT: and a0, a1, a0
851 %r = call i1 @llvm.vp.reduce.mul.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
855 declare i1 @llvm.vp.reduce.mul.v4i1(i1, <4 x i1>, <4 x i1>, i32)
857 define zeroext i1 @vpreduce_mul_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
858 ; CHECK-LABEL: vpreduce_mul_v4i1:
860 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
861 ; CHECK-NEXT: vmnot.m v9, v0
862 ; CHECK-NEXT: vmv1r.v v0, v8
863 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
864 ; CHECK-NEXT: seqz a1, a1
865 ; CHECK-NEXT: and a0, a1, a0
867 %r = call i1 @llvm.vp.reduce.mul.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
871 declare i1 @llvm.vp.reduce.mul.v8i1(i1, <8 x i1>, <8 x i1>, i32)
873 define zeroext i1 @vpreduce_mul_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
874 ; CHECK-LABEL: vpreduce_mul_v8i1:
876 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
877 ; CHECK-NEXT: vmnot.m v9, v0
878 ; CHECK-NEXT: vmv1r.v v0, v8
879 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
880 ; CHECK-NEXT: seqz a1, a1
881 ; CHECK-NEXT: and a0, a1, a0
883 %r = call i1 @llvm.vp.reduce.mul.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
887 declare i1 @llvm.vp.reduce.mul.v16i1(i1, <16 x i1>, <16 x i1>, i32)
889 define zeroext i1 @vpreduce_mul_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
890 ; CHECK-LABEL: vpreduce_mul_v16i1:
892 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
893 ; CHECK-NEXT: vmnot.m v9, v0
894 ; CHECK-NEXT: vmv1r.v v0, v8
895 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
896 ; CHECK-NEXT: seqz a1, a1
897 ; CHECK-NEXT: and a0, a1, a0
899 %r = call i1 @llvm.vp.reduce.mul.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
903 declare i1 @llvm.vp.reduce.mul.v32i1(i1, <32 x i1>, <32 x i1>, i32)
905 define zeroext i1 @vpreduce_mul_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
906 ; CHECK-LABEL: vpreduce_mul_v32i1:
908 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
909 ; CHECK-NEXT: vmnot.m v9, v0
910 ; CHECK-NEXT: vmv1r.v v0, v8
911 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
912 ; CHECK-NEXT: seqz a1, a1
913 ; CHECK-NEXT: and a0, a1, a0
915 %r = call i1 @llvm.vp.reduce.mul.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
919 declare i1 @llvm.vp.reduce.mul.v64i1(i1, <64 x i1>, <64 x i1>, i32)
921 define zeroext i1 @vpreduce_mul_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
922 ; CHECK-LABEL: vpreduce_mul_v64i1:
924 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
925 ; CHECK-NEXT: vmnot.m v9, v0
926 ; CHECK-NEXT: vmv1r.v v0, v8
927 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
928 ; CHECK-NEXT: seqz a1, a1
929 ; CHECK-NEXT: and a0, a1, a0
931 %r = call i1 @llvm.vp.reduce.mul.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)