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: vsetvli zero, a1, e8, mf8, ta, ma
28 ; CHECK-NEXT: vmv1r.v v0, v8
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: vsetvli zero, a1, e8, mf8, ta, ma
44 ; CHECK-NEXT: vmv1r.v v0, v8
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: vsetvli zero, a1, e8, mf8, ta, ma
76 ; CHECK-NEXT: vmv1r.v v0, v8
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: vsetvli zero, a1, e8, mf8, ta, ma
92 ; CHECK-NEXT: vmv1r.v v0, v8
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: vsetvli zero, a1, e8, mf4, ta, ma
124 ; CHECK-NEXT: vmv1r.v v0, v8
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: vsetvli zero, a1, e8, mf4, ta, ma
140 ; CHECK-NEXT: vmv1r.v v0, v8
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: vsetvli zero, a1, e8, mf2, ta, ma
172 ; CHECK-NEXT: vmv1r.v v0, v8
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: vsetvli zero, a1, e8, mf2, ta, ma
188 ; CHECK-NEXT: vmv1r.v v0, v8
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: li a3, 128
235 ; CHECK-NEXT: mv a2, a1
236 ; CHECK-NEXT: bltu a1, a3, .LBB14_2
237 ; CHECK-NEXT: # %bb.1:
238 ; CHECK-NEXT: li a2, 128
239 ; CHECK-NEXT: .LBB14_2:
240 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
241 ; CHECK-NEXT: vmnot.m v11, v0
242 ; CHECK-NEXT: vmv1r.v v0, v9
243 ; CHECK-NEXT: vcpop.m a2, v11, v0.t
244 ; CHECK-NEXT: seqz a2, a2
245 ; CHECK-NEXT: and a0, a2, a0
246 ; CHECK-NEXT: addi a2, a1, -128
247 ; CHECK-NEXT: sltu a1, a1, a2
248 ; CHECK-NEXT: addi a1, a1, -1
249 ; CHECK-NEXT: and a1, a1, a2
250 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
251 ; CHECK-NEXT: vmnot.m v8, v8
252 ; CHECK-NEXT: vmv1r.v v0, v10
253 ; CHECK-NEXT: vcpop.m a1, v8, v0.t
254 ; CHECK-NEXT: seqz a1, a1
255 ; CHECK-NEXT: and a0, a1, a0
257 %r = call i1 @llvm.vp.reduce.and.v256i1(i1 %s, <256 x i1> %v, <256 x i1> %m, i32 %evl)
261 declare i1 @llvm.vp.reduce.or.v16i1(i1, <16 x i1>, <16 x i1>, i32)
263 define zeroext i1 @vpreduce_or_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
264 ; CHECK-LABEL: vpreduce_or_v16i1:
266 ; CHECK-NEXT: vmv1r.v v9, v0
267 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
268 ; CHECK-NEXT: vmv1r.v v0, v8
269 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
270 ; CHECK-NEXT: snez a1, a1
271 ; CHECK-NEXT: or a0, a1, a0
273 %r = call i1 @llvm.vp.reduce.or.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
277 declare i1 @llvm.vp.reduce.xor.v16i1(i1, <16 x i1>, <16 x i1>, i32)
279 define zeroext i1 @vpreduce_xor_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
280 ; CHECK-LABEL: vpreduce_xor_v16i1:
282 ; CHECK-NEXT: vmv1r.v v9, v0
283 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
284 ; CHECK-NEXT: vmv1r.v v0, v8
285 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
286 ; CHECK-NEXT: andi a1, a1, 1
287 ; CHECK-NEXT: xor a0, a1, a0
289 %r = call i1 @llvm.vp.reduce.xor.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
293 declare i1 @llvm.vp.reduce.add.v1i1(i1, <1 x i1>, <1 x i1>, i32)
295 define zeroext i1 @vpreduce_add_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
296 ; CHECK-LABEL: vpreduce_add_v1i1:
298 ; CHECK-NEXT: vmv1r.v v9, v0
299 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
300 ; CHECK-NEXT: vmv1r.v v0, v8
301 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
302 ; CHECK-NEXT: andi a1, a1, 1
303 ; CHECK-NEXT: xor a0, a1, a0
305 %r = call i1 @llvm.vp.reduce.add.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
309 declare i1 @llvm.vp.reduce.add.v2i1(i1, <2 x i1>, <2 x i1>, i32)
311 define zeroext i1 @vpreduce_add_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
312 ; CHECK-LABEL: vpreduce_add_v2i1:
314 ; CHECK-NEXT: vmv1r.v v9, v0
315 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
316 ; CHECK-NEXT: vmv1r.v v0, v8
317 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
318 ; CHECK-NEXT: andi a1, a1, 1
319 ; CHECK-NEXT: xor a0, a1, a0
321 %r = call i1 @llvm.vp.reduce.add.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
325 declare i1 @llvm.vp.reduce.add.v4i1(i1, <4 x i1>, <4 x i1>, i32)
327 define zeroext i1 @vpreduce_add_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
328 ; CHECK-LABEL: vpreduce_add_v4i1:
330 ; CHECK-NEXT: vmv1r.v v9, v0
331 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
332 ; CHECK-NEXT: vmv1r.v v0, v8
333 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
334 ; CHECK-NEXT: andi a1, a1, 1
335 ; CHECK-NEXT: xor a0, a1, a0
337 %r = call i1 @llvm.vp.reduce.add.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
341 declare i1 @llvm.vp.reduce.add.v8i1(i1, <8 x i1>, <8 x i1>, i32)
343 define zeroext i1 @vpreduce_add_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
344 ; CHECK-LABEL: vpreduce_add_v8i1:
346 ; CHECK-NEXT: vmv1r.v v9, v0
347 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
348 ; CHECK-NEXT: vmv1r.v v0, v8
349 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
350 ; CHECK-NEXT: andi a1, a1, 1
351 ; CHECK-NEXT: xor a0, a1, a0
353 %r = call i1 @llvm.vp.reduce.add.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
357 declare i1 @llvm.vp.reduce.add.v16i1(i1, <16 x i1>, <16 x i1>, i32)
359 define zeroext i1 @vpreduce_add_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
360 ; CHECK-LABEL: vpreduce_add_v16i1:
362 ; CHECK-NEXT: vmv1r.v v9, v0
363 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
364 ; CHECK-NEXT: vmv1r.v v0, v8
365 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
366 ; CHECK-NEXT: andi a1, a1, 1
367 ; CHECK-NEXT: xor a0, a1, a0
369 %r = call i1 @llvm.vp.reduce.add.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
373 declare i1 @llvm.vp.reduce.smax.v1i1(i1, <1 x i1>, <1 x i1>, i32)
375 define zeroext i1 @vpreduce_smax_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
376 ; CHECK-LABEL: vpreduce_smax_v1i1:
378 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
379 ; CHECK-NEXT: vmnot.m v9, v0
380 ; CHECK-NEXT: vmv1r.v v0, v8
381 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
382 ; CHECK-NEXT: seqz a1, a1
383 ; CHECK-NEXT: and a0, a1, a0
385 %r = call i1 @llvm.vp.reduce.smax.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
389 declare i1 @llvm.vp.reduce.smax.v2i1(i1, <2 x i1>, <2 x i1>, i32)
391 define zeroext i1 @vpreduce_smax_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
392 ; CHECK-LABEL: vpreduce_smax_v2i1:
394 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
395 ; CHECK-NEXT: vmnot.m v9, v0
396 ; CHECK-NEXT: vmv1r.v v0, v8
397 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
398 ; CHECK-NEXT: seqz a1, a1
399 ; CHECK-NEXT: and a0, a1, a0
401 %r = call i1 @llvm.vp.reduce.smax.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
405 declare i1 @llvm.vp.reduce.smax.v4i1(i1, <4 x i1>, <4 x i1>, i32)
407 define zeroext i1 @vpreduce_smax_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
408 ; CHECK-LABEL: vpreduce_smax_v4i1:
410 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
411 ; CHECK-NEXT: vmnot.m v9, v0
412 ; CHECK-NEXT: vmv1r.v v0, v8
413 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
414 ; CHECK-NEXT: seqz a1, a1
415 ; CHECK-NEXT: and a0, a1, a0
417 %r = call i1 @llvm.vp.reduce.smax.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
421 declare i1 @llvm.vp.reduce.smax.v8i1(i1, <8 x i1>, <8 x i1>, i32)
423 define zeroext i1 @vpreduce_smax_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
424 ; CHECK-LABEL: vpreduce_smax_v8i1:
426 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
427 ; CHECK-NEXT: vmnot.m v9, v0
428 ; CHECK-NEXT: vmv1r.v v0, v8
429 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
430 ; CHECK-NEXT: seqz a1, a1
431 ; CHECK-NEXT: and a0, a1, a0
433 %r = call i1 @llvm.vp.reduce.smax.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
437 declare i1 @llvm.vp.reduce.smax.v16i1(i1, <16 x i1>, <16 x i1>, i32)
439 define zeroext i1 @vpreduce_smax_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
440 ; CHECK-LABEL: vpreduce_smax_v16i1:
442 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
443 ; CHECK-NEXT: vmnot.m v9, v0
444 ; CHECK-NEXT: vmv1r.v v0, v8
445 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
446 ; CHECK-NEXT: seqz a1, a1
447 ; CHECK-NEXT: and a0, a1, a0
449 %r = call i1 @llvm.vp.reduce.smax.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
453 declare i1 @llvm.vp.reduce.smax.v32i1(i1, <32 x i1>, <32 x i1>, i32)
455 define zeroext i1 @vpreduce_smax_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
456 ; CHECK-LABEL: vpreduce_smax_v32i1:
458 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
459 ; CHECK-NEXT: vmnot.m v9, v0
460 ; CHECK-NEXT: vmv1r.v v0, v8
461 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
462 ; CHECK-NEXT: seqz a1, a1
463 ; CHECK-NEXT: and a0, a1, a0
465 %r = call i1 @llvm.vp.reduce.smax.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
469 declare i1 @llvm.vp.reduce.smax.v64i1(i1, <64 x i1>, <64 x i1>, i32)
471 define zeroext i1 @vpreduce_smax_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
472 ; CHECK-LABEL: vpreduce_smax_v64i1:
474 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
475 ; CHECK-NEXT: vmnot.m v9, v0
476 ; CHECK-NEXT: vmv1r.v v0, v8
477 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
478 ; CHECK-NEXT: seqz a1, a1
479 ; CHECK-NEXT: and a0, a1, a0
481 %r = call i1 @llvm.vp.reduce.smax.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
485 declare i1 @llvm.vp.reduce.smin.v1i1(i1, <1 x i1>, <1 x i1>, i32)
487 define zeroext i1 @vpreduce_smin_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
488 ; CHECK-LABEL: vpreduce_smin_v1i1:
490 ; CHECK-NEXT: vmv1r.v v9, v0
491 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
492 ; CHECK-NEXT: vmv1r.v v0, v8
493 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
494 ; CHECK-NEXT: snez a1, a1
495 ; CHECK-NEXT: or a0, a1, a0
497 %r = call i1 @llvm.vp.reduce.smin.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
501 declare i1 @llvm.vp.reduce.smin.v2i1(i1, <2 x i1>, <2 x i1>, i32)
503 define zeroext i1 @vpreduce_smin_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
504 ; CHECK-LABEL: vpreduce_smin_v2i1:
506 ; CHECK-NEXT: vmv1r.v v9, v0
507 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
508 ; CHECK-NEXT: vmv1r.v v0, v8
509 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
510 ; CHECK-NEXT: snez a1, a1
511 ; CHECK-NEXT: or a0, a1, a0
513 %r = call i1 @llvm.vp.reduce.smin.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
517 declare i1 @llvm.vp.reduce.smin.v4i1(i1, <4 x i1>, <4 x i1>, i32)
519 define zeroext i1 @vpreduce_smin_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
520 ; CHECK-LABEL: vpreduce_smin_v4i1:
522 ; CHECK-NEXT: vmv1r.v v9, v0
523 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
524 ; CHECK-NEXT: vmv1r.v v0, v8
525 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
526 ; CHECK-NEXT: snez a1, a1
527 ; CHECK-NEXT: or a0, a1, a0
529 %r = call i1 @llvm.vp.reduce.smin.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
533 declare i1 @llvm.vp.reduce.smin.v8i1(i1, <8 x i1>, <8 x i1>, i32)
535 define zeroext i1 @vpreduce_smin_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
536 ; CHECK-LABEL: vpreduce_smin_v8i1:
538 ; CHECK-NEXT: vmv1r.v v9, v0
539 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
540 ; CHECK-NEXT: vmv1r.v v0, v8
541 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
542 ; CHECK-NEXT: snez a1, a1
543 ; CHECK-NEXT: or a0, a1, a0
545 %r = call i1 @llvm.vp.reduce.smin.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
549 declare i1 @llvm.vp.reduce.smin.v16i1(i1, <16 x i1>, <16 x i1>, i32)
551 define zeroext i1 @vpreduce_smin_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
552 ; CHECK-LABEL: vpreduce_smin_v16i1:
554 ; CHECK-NEXT: vmv1r.v v9, v0
555 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
556 ; CHECK-NEXT: vmv1r.v v0, v8
557 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
558 ; CHECK-NEXT: snez a1, a1
559 ; CHECK-NEXT: or a0, a1, a0
561 %r = call i1 @llvm.vp.reduce.smin.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
565 declare i1 @llvm.vp.reduce.smin.v32i1(i1, <32 x i1>, <32 x i1>, i32)
567 define zeroext i1 @vpreduce_smin_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
568 ; CHECK-LABEL: vpreduce_smin_v32i1:
570 ; CHECK-NEXT: vmv1r.v v9, v0
571 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
572 ; CHECK-NEXT: vmv1r.v v0, v8
573 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
574 ; CHECK-NEXT: snez a1, a1
575 ; CHECK-NEXT: or a0, a1, a0
577 %r = call i1 @llvm.vp.reduce.smin.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
581 declare i1 @llvm.vp.reduce.smin.v64i1(i1, <64 x i1>, <64 x i1>, i32)
583 define zeroext i1 @vpreduce_smin_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
584 ; CHECK-LABEL: vpreduce_smin_v64i1:
586 ; CHECK-NEXT: vmv1r.v v9, v0
587 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
588 ; CHECK-NEXT: vmv1r.v v0, v8
589 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
590 ; CHECK-NEXT: snez a1, a1
591 ; CHECK-NEXT: or a0, a1, a0
593 %r = call i1 @llvm.vp.reduce.smin.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
597 declare i1 @llvm.vp.reduce.umax.v1i1(i1, <1 x i1>, <1 x i1>, i32)
599 define zeroext i1 @vpreduce_umax_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
600 ; CHECK-LABEL: vpreduce_umax_v1i1:
602 ; CHECK-NEXT: vmv1r.v v9, v0
603 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
604 ; CHECK-NEXT: vmv1r.v v0, v8
605 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
606 ; CHECK-NEXT: snez a1, a1
607 ; CHECK-NEXT: or a0, a1, a0
609 %r = call i1 @llvm.vp.reduce.umax.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
613 declare i1 @llvm.vp.reduce.umax.v2i1(i1, <2 x i1>, <2 x i1>, i32)
615 define zeroext i1 @vpreduce_umax_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
616 ; CHECK-LABEL: vpreduce_umax_v2i1:
618 ; CHECK-NEXT: vmv1r.v v9, v0
619 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
620 ; CHECK-NEXT: vmv1r.v v0, v8
621 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
622 ; CHECK-NEXT: snez a1, a1
623 ; CHECK-NEXT: or a0, a1, a0
625 %r = call i1 @llvm.vp.reduce.umax.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
629 declare i1 @llvm.vp.reduce.umax.v4i1(i1, <4 x i1>, <4 x i1>, i32)
631 define zeroext i1 @vpreduce_umax_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
632 ; CHECK-LABEL: vpreduce_umax_v4i1:
634 ; CHECK-NEXT: vmv1r.v v9, v0
635 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
636 ; CHECK-NEXT: vmv1r.v v0, v8
637 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
638 ; CHECK-NEXT: snez a1, a1
639 ; CHECK-NEXT: or a0, a1, a0
641 %r = call i1 @llvm.vp.reduce.umax.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
645 declare i1 @llvm.vp.reduce.umax.v8i1(i1, <8 x i1>, <8 x i1>, i32)
647 define zeroext i1 @vpreduce_umax_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
648 ; CHECK-LABEL: vpreduce_umax_v8i1:
650 ; CHECK-NEXT: vmv1r.v v9, v0
651 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
652 ; CHECK-NEXT: vmv1r.v v0, v8
653 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
654 ; CHECK-NEXT: snez a1, a1
655 ; CHECK-NEXT: or a0, a1, a0
657 %r = call i1 @llvm.vp.reduce.umax.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
661 declare i1 @llvm.vp.reduce.umax.v16i1(i1, <16 x i1>, <16 x i1>, i32)
663 define zeroext i1 @vpreduce_umax_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
664 ; CHECK-LABEL: vpreduce_umax_v16i1:
666 ; CHECK-NEXT: vmv1r.v v9, v0
667 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
668 ; CHECK-NEXT: vmv1r.v v0, v8
669 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
670 ; CHECK-NEXT: snez a1, a1
671 ; CHECK-NEXT: or a0, a1, a0
673 %r = call i1 @llvm.vp.reduce.umax.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
677 declare i1 @llvm.vp.reduce.umax.v32i1(i1, <32 x i1>, <32 x i1>, i32)
679 define zeroext i1 @vpreduce_umax_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
680 ; CHECK-LABEL: vpreduce_umax_v32i1:
682 ; CHECK-NEXT: vmv1r.v v9, v0
683 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
684 ; CHECK-NEXT: vmv1r.v v0, v8
685 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
686 ; CHECK-NEXT: snez a1, a1
687 ; CHECK-NEXT: or a0, a1, a0
689 %r = call i1 @llvm.vp.reduce.umax.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
693 declare i1 @llvm.vp.reduce.umax.v64i1(i1, <64 x i1>, <64 x i1>, i32)
695 define zeroext i1 @vpreduce_umax_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
696 ; CHECK-LABEL: vpreduce_umax_v64i1:
698 ; CHECK-NEXT: vmv1r.v v9, v0
699 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
700 ; CHECK-NEXT: vmv1r.v v0, v8
701 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
702 ; CHECK-NEXT: snez a1, a1
703 ; CHECK-NEXT: or a0, a1, a0
705 %r = call i1 @llvm.vp.reduce.umax.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
709 declare i1 @llvm.vp.reduce.umin.v1i1(i1, <1 x i1>, <1 x i1>, i32)
711 define zeroext i1 @vpreduce_umin_v1i1(i1 zeroext %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
712 ; CHECK-LABEL: vpreduce_umin_v1i1:
714 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
715 ; CHECK-NEXT: vmnot.m v9, v0
716 ; CHECK-NEXT: vmv1r.v v0, v8
717 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
718 ; CHECK-NEXT: seqz a1, a1
719 ; CHECK-NEXT: and a0, a1, a0
721 %r = call i1 @llvm.vp.reduce.umin.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
725 declare i1 @llvm.vp.reduce.umin.v2i1(i1, <2 x i1>, <2 x i1>, i32)
727 define zeroext i1 @vpreduce_umin_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
728 ; CHECK-LABEL: vpreduce_umin_v2i1:
730 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
731 ; CHECK-NEXT: vmnot.m v9, v0
732 ; CHECK-NEXT: vmv1r.v v0, v8
733 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
734 ; CHECK-NEXT: seqz a1, a1
735 ; CHECK-NEXT: and a0, a1, a0
737 %r = call i1 @llvm.vp.reduce.umin.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
741 declare i1 @llvm.vp.reduce.umin.v4i1(i1, <4 x i1>, <4 x i1>, i32)
743 define zeroext i1 @vpreduce_umin_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
744 ; CHECK-LABEL: vpreduce_umin_v4i1:
746 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
747 ; CHECK-NEXT: vmnot.m v9, v0
748 ; CHECK-NEXT: vmv1r.v v0, v8
749 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
750 ; CHECK-NEXT: seqz a1, a1
751 ; CHECK-NEXT: and a0, a1, a0
753 %r = call i1 @llvm.vp.reduce.umin.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
757 declare i1 @llvm.vp.reduce.umin.v8i1(i1, <8 x i1>, <8 x i1>, i32)
759 define zeroext i1 @vpreduce_umin_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
760 ; CHECK-LABEL: vpreduce_umin_v8i1:
762 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
763 ; CHECK-NEXT: vmnot.m v9, v0
764 ; CHECK-NEXT: vmv1r.v v0, v8
765 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
766 ; CHECK-NEXT: seqz a1, a1
767 ; CHECK-NEXT: and a0, a1, a0
769 %r = call i1 @llvm.vp.reduce.umin.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
773 declare i1 @llvm.vp.reduce.umin.v16i1(i1, <16 x i1>, <16 x i1>, i32)
775 define zeroext i1 @vpreduce_umin_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
776 ; CHECK-LABEL: vpreduce_umin_v16i1:
778 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
779 ; CHECK-NEXT: vmnot.m v9, v0
780 ; CHECK-NEXT: vmv1r.v v0, v8
781 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
782 ; CHECK-NEXT: seqz a1, a1
783 ; CHECK-NEXT: and a0, a1, a0
785 %r = call i1 @llvm.vp.reduce.umin.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
789 declare i1 @llvm.vp.reduce.umin.v32i1(i1, <32 x i1>, <32 x i1>, i32)
791 define zeroext i1 @vpreduce_umin_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
792 ; CHECK-LABEL: vpreduce_umin_v32i1:
794 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
795 ; CHECK-NEXT: vmnot.m v9, v0
796 ; CHECK-NEXT: vmv1r.v v0, v8
797 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
798 ; CHECK-NEXT: seqz a1, a1
799 ; CHECK-NEXT: and a0, a1, a0
801 %r = call i1 @llvm.vp.reduce.umin.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
805 declare i1 @llvm.vp.reduce.umin.v64i1(i1, <64 x i1>, <64 x i1>, i32)
807 define zeroext i1 @vpreduce_umin_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
808 ; CHECK-LABEL: vpreduce_umin_v64i1:
810 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
811 ; CHECK-NEXT: vmnot.m v9, v0
812 ; CHECK-NEXT: vmv1r.v v0, v8
813 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
814 ; CHECK-NEXT: seqz a1, a1
815 ; CHECK-NEXT: and a0, a1, a0
817 %r = call i1 @llvm.vp.reduce.umin.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)
821 declare i1 @llvm.vp.reduce.mul.v1i1(i1, <1 x i1>, <1 x i1>, i32)
823 define i1 @vpreduce_mul_v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 zeroext %evl) {
824 ; CHECK-LABEL: vpreduce_mul_v1i1:
826 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
827 ; CHECK-NEXT: vmnot.m v9, v0
828 ; CHECK-NEXT: vmv1r.v v0, v8
829 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
830 ; CHECK-NEXT: seqz a1, a1
831 ; CHECK-NEXT: and a0, a1, a0
833 %r = call i1 @llvm.vp.reduce.mul.v1i1(i1 %s, <1 x i1> %v, <1 x i1> %m, i32 %evl)
837 declare i1 @llvm.vp.reduce.mul.v2i1(i1, <2 x i1>, <2 x i1>, i32)
839 define zeroext i1 @vpreduce_mul_v2i1(i1 zeroext %s, <2 x i1> %v, <2 x i1> %m, i32 zeroext %evl) {
840 ; CHECK-LABEL: vpreduce_mul_v2i1:
842 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
843 ; CHECK-NEXT: vmnot.m v9, v0
844 ; CHECK-NEXT: vmv1r.v v0, v8
845 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
846 ; CHECK-NEXT: seqz a1, a1
847 ; CHECK-NEXT: and a0, a1, a0
849 %r = call i1 @llvm.vp.reduce.mul.v2i1(i1 %s, <2 x i1> %v, <2 x i1> %m, i32 %evl)
853 declare i1 @llvm.vp.reduce.mul.v4i1(i1, <4 x i1>, <4 x i1>, i32)
855 define zeroext i1 @vpreduce_mul_v4i1(i1 zeroext %s, <4 x i1> %v, <4 x i1> %m, i32 zeroext %evl) {
856 ; CHECK-LABEL: vpreduce_mul_v4i1:
858 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
859 ; CHECK-NEXT: vmnot.m v9, v0
860 ; CHECK-NEXT: vmv1r.v v0, v8
861 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
862 ; CHECK-NEXT: seqz a1, a1
863 ; CHECK-NEXT: and a0, a1, a0
865 %r = call i1 @llvm.vp.reduce.mul.v4i1(i1 %s, <4 x i1> %v, <4 x i1> %m, i32 %evl)
869 declare i1 @llvm.vp.reduce.mul.v8i1(i1, <8 x i1>, <8 x i1>, i32)
871 define zeroext i1 @vpreduce_mul_v8i1(i1 zeroext %s, <8 x i1> %v, <8 x i1> %m, i32 zeroext %evl) {
872 ; CHECK-LABEL: vpreduce_mul_v8i1:
874 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
875 ; CHECK-NEXT: vmnot.m v9, v0
876 ; CHECK-NEXT: vmv1r.v v0, v8
877 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
878 ; CHECK-NEXT: seqz a1, a1
879 ; CHECK-NEXT: and a0, a1, a0
881 %r = call i1 @llvm.vp.reduce.mul.v8i1(i1 %s, <8 x i1> %v, <8 x i1> %m, i32 %evl)
885 declare i1 @llvm.vp.reduce.mul.v16i1(i1, <16 x i1>, <16 x i1>, i32)
887 define zeroext i1 @vpreduce_mul_v16i1(i1 zeroext %s, <16 x i1> %v, <16 x i1> %m, i32 zeroext %evl) {
888 ; CHECK-LABEL: vpreduce_mul_v16i1:
890 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
891 ; CHECK-NEXT: vmnot.m v9, v0
892 ; CHECK-NEXT: vmv1r.v v0, v8
893 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
894 ; CHECK-NEXT: seqz a1, a1
895 ; CHECK-NEXT: and a0, a1, a0
897 %r = call i1 @llvm.vp.reduce.mul.v16i1(i1 %s, <16 x i1> %v, <16 x i1> %m, i32 %evl)
901 declare i1 @llvm.vp.reduce.mul.v32i1(i1, <32 x i1>, <32 x i1>, i32)
903 define zeroext i1 @vpreduce_mul_v32i1(i1 zeroext %s, <32 x i1> %v, <32 x i1> %m, i32 zeroext %evl) {
904 ; CHECK-LABEL: vpreduce_mul_v32i1:
906 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
907 ; CHECK-NEXT: vmnot.m v9, v0
908 ; CHECK-NEXT: vmv1r.v v0, v8
909 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
910 ; CHECK-NEXT: seqz a1, a1
911 ; CHECK-NEXT: and a0, a1, a0
913 %r = call i1 @llvm.vp.reduce.mul.v32i1(i1 %s, <32 x i1> %v, <32 x i1> %m, i32 %evl)
917 declare i1 @llvm.vp.reduce.mul.v64i1(i1, <64 x i1>, <64 x i1>, i32)
919 define zeroext i1 @vpreduce_mul_v64i1(i1 zeroext %s, <64 x i1> %v, <64 x i1> %m, i32 zeroext %evl) {
920 ; CHECK-LABEL: vpreduce_mul_v64i1:
922 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
923 ; CHECK-NEXT: vmnot.m v9, v0
924 ; CHECK-NEXT: vmv1r.v v0, v8
925 ; CHECK-NEXT: vcpop.m a1, v9, v0.t
926 ; CHECK-NEXT: seqz a1, a1
927 ; CHECK-NEXT: and a0, a1, a0
929 %r = call i1 @llvm.vp.reduce.mul.v64i1(i1 %s, <64 x i1> %v, <64 x i1> %m, i32 %evl)