1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zfh,+zvfh,+f,+d -verify-machineinstrs < %s | FileCheck %s -check-prefixes=CHECK,RV32
3 ; RUN: llc -mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zfh,+zvfh,+f,+d -verify-machineinstrs < %s | FileCheck %s -check-prefixes=CHECK,RV64
5 define void @vselect_vv_v6i32(ptr %a, ptr %b, ptr %cc, ptr %z) {
6 ; CHECK-LABEL: vselect_vv_v6i32:
8 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
9 ; CHECK-NEXT: lbu a2, 0(a2)
10 ; CHECK-NEXT: vle32.v v8, (a1)
11 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
12 ; CHECK-NEXT: vslide1down.vx v10, v8, a2
13 ; CHECK-NEXT: srli a1, a2, 1
14 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
15 ; CHECK-NEXT: srli a1, a2, 2
16 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
17 ; CHECK-NEXT: srli a1, a2, 3
18 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
19 ; CHECK-NEXT: srli a1, a2, 4
20 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
21 ; CHECK-NEXT: srli a2, a2, 5
22 ; CHECK-NEXT: vslide1down.vx v10, v10, a2
23 ; CHECK-NEXT: vslidedown.vi v10, v10, 2
24 ; CHECK-NEXT: vand.vi v10, v10, 1
25 ; CHECK-NEXT: vmsne.vi v0, v10, 0
26 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, tu, mu
27 ; CHECK-NEXT: vle32.v v8, (a0), v0.t
28 ; CHECK-NEXT: vse32.v v8, (a3)
30 %va = load <6 x i32>, ptr %a
31 %vb = load <6 x i32>, ptr %b
32 %vcc = load <6 x i1>, ptr %cc
33 %vsel = select <6 x i1> %vcc, <6 x i32> %va, <6 x i32> %vb
34 store <6 x i32> %vsel, ptr %z
38 define void @vselect_vx_v6i32(i32 %a, ptr %b, ptr %cc, ptr %z) {
39 ; CHECK-LABEL: vselect_vx_v6i32:
41 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
42 ; CHECK-NEXT: lbu a2, 0(a2)
43 ; CHECK-NEXT: vle32.v v8, (a1)
44 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
45 ; CHECK-NEXT: vslide1down.vx v10, v8, a2
46 ; CHECK-NEXT: srli a1, a2, 1
47 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
48 ; CHECK-NEXT: srli a1, a2, 2
49 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
50 ; CHECK-NEXT: srli a1, a2, 3
51 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
52 ; CHECK-NEXT: srli a1, a2, 4
53 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
54 ; CHECK-NEXT: srli a2, a2, 5
55 ; CHECK-NEXT: vslide1down.vx v10, v10, a2
56 ; CHECK-NEXT: vslidedown.vi v10, v10, 2
57 ; CHECK-NEXT: vand.vi v10, v10, 1
58 ; CHECK-NEXT: vmsne.vi v0, v10, 0
59 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
60 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
61 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
62 ; CHECK-NEXT: vse32.v v8, (a3)
64 %vb = load <6 x i32>, ptr %b
65 %ahead = insertelement <6 x i32> poison, i32 %a, i32 0
66 %va = shufflevector <6 x i32> %ahead, <6 x i32> poison, <6 x i32> zeroinitializer
67 %vcc = load <6 x i1>, ptr %cc
68 %vsel = select <6 x i1> %vcc, <6 x i32> %va, <6 x i32> %vb
69 store <6 x i32> %vsel, ptr %z
73 define void @vselect_vi_v6i32(ptr %b, ptr %cc, ptr %z) {
74 ; CHECK-LABEL: vselect_vi_v6i32:
76 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
77 ; CHECK-NEXT: lbu a1, 0(a1)
78 ; CHECK-NEXT: vle32.v v8, (a0)
79 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
80 ; CHECK-NEXT: vslide1down.vx v10, v8, a1
81 ; CHECK-NEXT: srli a0, a1, 1
82 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
83 ; CHECK-NEXT: srli a0, a1, 2
84 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
85 ; CHECK-NEXT: srli a0, a1, 3
86 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
87 ; CHECK-NEXT: srli a0, a1, 4
88 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
89 ; CHECK-NEXT: srli a1, a1, 5
90 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
91 ; CHECK-NEXT: vslidedown.vi v10, v10, 2
92 ; CHECK-NEXT: vand.vi v10, v10, 1
93 ; CHECK-NEXT: vmsne.vi v0, v10, 0
94 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
95 ; CHECK-NEXT: vmerge.vim v8, v8, -1, v0
96 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
97 ; CHECK-NEXT: vse32.v v8, (a2)
99 %vb = load <6 x i32>, ptr %b
100 %a = insertelement <6 x i32> poison, i32 -1, i32 0
101 %va = shufflevector <6 x i32> %a, <6 x i32> poison, <6 x i32> zeroinitializer
102 %vcc = load <6 x i1>, ptr %cc
103 %vsel = select <6 x i1> %vcc, <6 x i32> %va, <6 x i32> %vb
104 store <6 x i32> %vsel, ptr %z
109 define void @vselect_vv_v6f32(ptr %a, ptr %b, ptr %cc, ptr %z) {
110 ; CHECK-LABEL: vselect_vv_v6f32:
112 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
113 ; CHECK-NEXT: lbu a2, 0(a2)
114 ; CHECK-NEXT: vle32.v v8, (a1)
115 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
116 ; CHECK-NEXT: vslide1down.vx v10, v8, a2
117 ; CHECK-NEXT: srli a1, a2, 1
118 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
119 ; CHECK-NEXT: srli a1, a2, 2
120 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
121 ; CHECK-NEXT: srli a1, a2, 3
122 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
123 ; CHECK-NEXT: srli a1, a2, 4
124 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
125 ; CHECK-NEXT: srli a2, a2, 5
126 ; CHECK-NEXT: vslide1down.vx v10, v10, a2
127 ; CHECK-NEXT: vslidedown.vi v10, v10, 2
128 ; CHECK-NEXT: vand.vi v10, v10, 1
129 ; CHECK-NEXT: vmsne.vi v0, v10, 0
130 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, tu, mu
131 ; CHECK-NEXT: vle32.v v8, (a0), v0.t
132 ; CHECK-NEXT: vse32.v v8, (a3)
134 %va = load <6 x float>, ptr %a
135 %vb = load <6 x float>, ptr %b
136 %vcc = load <6 x i1>, ptr %cc
137 %vsel = select <6 x i1> %vcc, <6 x float> %va, <6 x float> %vb
138 store <6 x float> %vsel, ptr %z
142 define void @vselect_vx_v6f32(float %a, ptr %b, ptr %cc, ptr %z) {
143 ; CHECK-LABEL: vselect_vx_v6f32:
145 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
146 ; CHECK-NEXT: lbu a1, 0(a1)
147 ; CHECK-NEXT: vle32.v v8, (a0)
148 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
149 ; CHECK-NEXT: vslide1down.vx v10, v8, a1
150 ; CHECK-NEXT: srli a0, a1, 1
151 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
152 ; CHECK-NEXT: srli a0, a1, 2
153 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
154 ; CHECK-NEXT: srli a0, a1, 3
155 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
156 ; CHECK-NEXT: srli a0, a1, 4
157 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
158 ; CHECK-NEXT: srli a1, a1, 5
159 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
160 ; CHECK-NEXT: vslidedown.vi v10, v10, 2
161 ; CHECK-NEXT: vand.vi v10, v10, 1
162 ; CHECK-NEXT: vmsne.vi v0, v10, 0
163 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
164 ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0
165 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
166 ; CHECK-NEXT: vse32.v v8, (a2)
168 %vb = load <6 x float>, ptr %b
169 %ahead = insertelement <6 x float> poison, float %a, i32 0
170 %va = shufflevector <6 x float> %ahead, <6 x float> poison, <6 x i32> zeroinitializer
171 %vcc = load <6 x i1>, ptr %cc
172 %vsel = select <6 x i1> %vcc, <6 x float> %va, <6 x float> %vb
173 store <6 x float> %vsel, ptr %z
177 define void @vselect_vfpzero_v6f32(ptr %b, ptr %cc, ptr %z) {
178 ; CHECK-LABEL: vselect_vfpzero_v6f32:
180 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
181 ; CHECK-NEXT: lbu a1, 0(a1)
182 ; CHECK-NEXT: vle32.v v8, (a0)
183 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
184 ; CHECK-NEXT: vslide1down.vx v10, v8, a1
185 ; CHECK-NEXT: srli a0, a1, 1
186 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
187 ; CHECK-NEXT: srli a0, a1, 2
188 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
189 ; CHECK-NEXT: srli a0, a1, 3
190 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
191 ; CHECK-NEXT: srli a0, a1, 4
192 ; CHECK-NEXT: vslide1down.vx v10, v10, a0
193 ; CHECK-NEXT: srli a1, a1, 5
194 ; CHECK-NEXT: vslide1down.vx v10, v10, a1
195 ; CHECK-NEXT: vslidedown.vi v10, v10, 2
196 ; CHECK-NEXT: vand.vi v10, v10, 1
197 ; CHECK-NEXT: vmsne.vi v0, v10, 0
198 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
199 ; CHECK-NEXT: vmerge.vim v8, v8, 0, v0
200 ; CHECK-NEXT: vsetivli zero, 6, e32, m2, ta, ma
201 ; CHECK-NEXT: vse32.v v8, (a2)
203 %vb = load <6 x float>, ptr %b
204 %a = insertelement <6 x float> poison, float 0.0, i32 0
205 %va = shufflevector <6 x float> %a, <6 x float> poison, <6 x i32> zeroinitializer
206 %vcc = load <6 x i1>, ptr %cc
207 %vsel = select <6 x i1> %vcc, <6 x float> %va, <6 x float> %vb
208 store <6 x float> %vsel, ptr %z
212 define void @vselect_vv_v8i32(ptr %a, ptr %b, ptr %cc, ptr %z) {
213 ; CHECK-LABEL: vselect_vv_v8i32:
215 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu
216 ; CHECK-NEXT: vlm.v v0, (a2)
217 ; CHECK-NEXT: vle32.v v8, (a1)
218 ; CHECK-NEXT: vle32.v v8, (a0), v0.t
219 ; CHECK-NEXT: vse32.v v8, (a3)
221 %va = load <8 x i32>, ptr %a
222 %vb = load <8 x i32>, ptr %b
223 %vcc = load <8 x i1>, ptr %cc
224 %vsel = select <8 x i1> %vcc, <8 x i32> %va, <8 x i32> %vb
225 store <8 x i32> %vsel, ptr %z
229 define void @vselect_vx_v8i32(i32 %a, ptr %b, ptr %cc, ptr %z) {
230 ; CHECK-LABEL: vselect_vx_v8i32:
232 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
233 ; CHECK-NEXT: vlm.v v0, (a2)
234 ; CHECK-NEXT: vle32.v v8, (a1)
235 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
236 ; CHECK-NEXT: vse32.v v8, (a3)
238 %vb = load <8 x i32>, ptr %b
239 %ahead = insertelement <8 x i32> poison, i32 %a, i32 0
240 %va = shufflevector <8 x i32> %ahead, <8 x i32> poison, <8 x i32> zeroinitializer
241 %vcc = load <8 x i1>, ptr %cc
242 %vsel = select <8 x i1> %vcc, <8 x i32> %va, <8 x i32> %vb
243 store <8 x i32> %vsel, ptr %z
247 define void @vselect_vi_v8i32(ptr %b, ptr %cc, ptr %z) {
248 ; CHECK-LABEL: vselect_vi_v8i32:
250 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
251 ; CHECK-NEXT: vlm.v v0, (a1)
252 ; CHECK-NEXT: vle32.v v8, (a0)
253 ; CHECK-NEXT: vmerge.vim v8, v8, -1, v0
254 ; CHECK-NEXT: vse32.v v8, (a2)
256 %vb = load <8 x i32>, ptr %b
257 %a = insertelement <8 x i32> poison, i32 -1, i32 0
258 %va = shufflevector <8 x i32> %a, <8 x i32> poison, <8 x i32> zeroinitializer
259 %vcc = load <8 x i1>, ptr %cc
260 %vsel = select <8 x i1> %vcc, <8 x i32> %va, <8 x i32> %vb
261 store <8 x i32> %vsel, ptr %z
265 define void @vselect_vv_v8f32(ptr %a, ptr %b, ptr %cc, ptr %z) {
266 ; CHECK-LABEL: vselect_vv_v8f32:
268 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu
269 ; CHECK-NEXT: vlm.v v0, (a2)
270 ; CHECK-NEXT: vle32.v v8, (a1)
271 ; CHECK-NEXT: vle32.v v8, (a0), v0.t
272 ; CHECK-NEXT: vse32.v v8, (a3)
274 %va = load <8 x float>, ptr %a
275 %vb = load <8 x float>, ptr %b
276 %vcc = load <8 x i1>, ptr %cc
277 %vsel = select <8 x i1> %vcc, <8 x float> %va, <8 x float> %vb
278 store <8 x float> %vsel, ptr %z
282 define void @vselect_vx_v8f32(float %a, ptr %b, ptr %cc, ptr %z) {
283 ; CHECK-LABEL: vselect_vx_v8f32:
285 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
286 ; CHECK-NEXT: vlm.v v0, (a1)
287 ; CHECK-NEXT: vle32.v v8, (a0)
288 ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0
289 ; CHECK-NEXT: vse32.v v8, (a2)
291 %vb = load <8 x float>, ptr %b
292 %ahead = insertelement <8 x float> poison, float %a, i32 0
293 %va = shufflevector <8 x float> %ahead, <8 x float> poison, <8 x i32> zeroinitializer
294 %vcc = load <8 x i1>, ptr %cc
295 %vsel = select <8 x i1> %vcc, <8 x float> %va, <8 x float> %vb
296 store <8 x float> %vsel, ptr %z
300 define void @vselect_vfpzero_v8f32(ptr %b, ptr %cc, ptr %z) {
301 ; CHECK-LABEL: vselect_vfpzero_v8f32:
303 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
304 ; CHECK-NEXT: vlm.v v0, (a1)
305 ; CHECK-NEXT: vle32.v v8, (a0)
306 ; CHECK-NEXT: vmerge.vim v8, v8, 0, v0
307 ; CHECK-NEXT: vse32.v v8, (a2)
309 %vb = load <8 x float>, ptr %b
310 %a = insertelement <8 x float> poison, float 0.0, i32 0
311 %va = shufflevector <8 x float> %a, <8 x float> poison, <8 x i32> zeroinitializer
312 %vcc = load <8 x i1>, ptr %cc
313 %vsel = select <8 x i1> %vcc, <8 x float> %va, <8 x float> %vb
314 store <8 x float> %vsel, ptr %z
318 define void @vselect_vv_v16i16(ptr %a, ptr %b, ptr %cc, ptr %z) {
319 ; CHECK-LABEL: vselect_vv_v16i16:
321 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu
322 ; CHECK-NEXT: vlm.v v0, (a2)
323 ; CHECK-NEXT: vle16.v v8, (a1)
324 ; CHECK-NEXT: vle16.v v8, (a0), v0.t
325 ; CHECK-NEXT: vse16.v v8, (a3)
327 %va = load <16 x i16>, ptr %a
328 %vb = load <16 x i16>, ptr %b
329 %vcc = load <16 x i1>, ptr %cc
330 %vsel = select <16 x i1> %vcc, <16 x i16> %va, <16 x i16> %vb
331 store <16 x i16> %vsel, ptr %z
335 define void @vselect_vx_v16i16(i16 signext %a, ptr %b, ptr %cc, ptr %z) {
336 ; CHECK-LABEL: vselect_vx_v16i16:
338 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
339 ; CHECK-NEXT: vlm.v v0, (a2)
340 ; CHECK-NEXT: vle16.v v8, (a1)
341 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
342 ; CHECK-NEXT: vse16.v v8, (a3)
344 %vb = load <16 x i16>, ptr %b
345 %ahead = insertelement <16 x i16> poison, i16 %a, i32 0
346 %va = shufflevector <16 x i16> %ahead, <16 x i16> poison, <16 x i32> zeroinitializer
347 %vcc = load <16 x i1>, ptr %cc
348 %vsel = select <16 x i1> %vcc, <16 x i16> %va, <16 x i16> %vb
349 store <16 x i16> %vsel, ptr %z
353 define void @vselect_vi_v16i16(ptr %b, ptr %cc, ptr %z) {
354 ; CHECK-LABEL: vselect_vi_v16i16:
356 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
357 ; CHECK-NEXT: vlm.v v0, (a1)
358 ; CHECK-NEXT: vle16.v v8, (a0)
359 ; CHECK-NEXT: vmerge.vim v8, v8, 4, v0
360 ; CHECK-NEXT: vse16.v v8, (a2)
362 %vb = load <16 x i16>, ptr %b
363 %a = insertelement <16 x i16> poison, i16 4, i32 0
364 %va = shufflevector <16 x i16> %a, <16 x i16> poison, <16 x i32> zeroinitializer
365 %vcc = load <16 x i1>, ptr %cc
366 %vsel = select <16 x i1> %vcc, <16 x i16> %va, <16 x i16> %vb
367 store <16 x i16> %vsel, ptr %z
371 define void @vselect_vv_v32f16(ptr %a, ptr %b, ptr %cc, ptr %z) {
372 ; CHECK-LABEL: vselect_vv_v32f16:
374 ; CHECK-NEXT: li a4, 32
375 ; CHECK-NEXT: vsetvli zero, a4, e16, m4, ta, mu
376 ; CHECK-NEXT: vlm.v v0, (a2)
377 ; CHECK-NEXT: vle16.v v8, (a1)
378 ; CHECK-NEXT: vle16.v v8, (a0), v0.t
379 ; CHECK-NEXT: vse16.v v8, (a3)
381 %va = load <32 x half>, ptr %a
382 %vb = load <32 x half>, ptr %b
383 %vcc = load <32 x i1>, ptr %cc
384 %vsel = select <32 x i1> %vcc, <32 x half> %va, <32 x half> %vb
385 store <32 x half> %vsel, ptr %z
389 define void @vselect_vx_v32f16(half %a, ptr %b, ptr %cc, ptr %z) {
390 ; CHECK-LABEL: vselect_vx_v32f16:
392 ; CHECK-NEXT: li a3, 32
393 ; CHECK-NEXT: vsetvli zero, a3, e16, m4, ta, ma
394 ; CHECK-NEXT: vlm.v v0, (a1)
395 ; CHECK-NEXT: vle16.v v8, (a0)
396 ; CHECK-NEXT: vfmerge.vfm v8, v8, fa0, v0
397 ; CHECK-NEXT: vse16.v v8, (a2)
399 %vb = load <32 x half>, ptr %b
400 %ahead = insertelement <32 x half> poison, half %a, i32 0
401 %va = shufflevector <32 x half> %ahead, <32 x half> poison, <32 x i32> zeroinitializer
402 %vcc = load <32 x i1>, ptr %cc
403 %vsel = select <32 x i1> %vcc, <32 x half> %va, <32 x half> %vb
404 store <32 x half> %vsel, ptr %z
408 define void @vselect_vfpzero_v32f16(ptr %b, ptr %cc, ptr %z) {
409 ; CHECK-LABEL: vselect_vfpzero_v32f16:
411 ; CHECK-NEXT: li a3, 32
412 ; CHECK-NEXT: vsetvli zero, a3, e16, m4, ta, ma
413 ; CHECK-NEXT: vlm.v v0, (a1)
414 ; CHECK-NEXT: vle16.v v8, (a0)
415 ; CHECK-NEXT: vmerge.vim v8, v8, 0, v0
416 ; CHECK-NEXT: vse16.v v8, (a2)
418 %vb = load <32 x half>, ptr %b
419 %a = insertelement <32 x half> poison, half 0.0, i32 0
420 %va = shufflevector <32 x half> %a, <32 x half> poison, <32 x i32> zeroinitializer
421 %vcc = load <32 x i1>, ptr %cc
422 %vsel = select <32 x i1> %vcc, <32 x half> %va, <32 x half> %vb
423 store <32 x half> %vsel, ptr %z
427 define <2 x i1> @vselect_v2i1(<2 x i1> %a, <2 x i1> %b, <2 x i1> %cc) {
428 ; CHECK-LABEL: vselect_v2i1:
430 ; CHECK-NEXT: vsetivli zero, 2, e8, mf8, ta, ma
431 ; CHECK-NEXT: vmandn.mm v8, v8, v9
432 ; CHECK-NEXT: vmand.mm v9, v0, v9
433 ; CHECK-NEXT: vmor.mm v0, v9, v8
435 %v = select <2 x i1> %cc, <2 x i1> %a, <2 x i1> %b
439 define <4 x i1> @vselect_v4i1(<4 x i1> %a, <4 x i1> %b, <4 x i1> %cc) {
440 ; CHECK-LABEL: vselect_v4i1:
442 ; CHECK-NEXT: vsetivli zero, 4, e8, mf4, ta, ma
443 ; CHECK-NEXT: vmandn.mm v8, v8, v9
444 ; CHECK-NEXT: vmand.mm v9, v0, v9
445 ; CHECK-NEXT: vmor.mm v0, v9, v8
447 %v = select <4 x i1> %cc, <4 x i1> %a, <4 x i1> %b
451 define <8 x i1> @vselect_v8i1(<8 x i1> %a, <8 x i1> %b, <8 x i1> %cc) {
452 ; CHECK-LABEL: vselect_v8i1:
454 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
455 ; CHECK-NEXT: vmandn.mm v8, v8, v9
456 ; CHECK-NEXT: vmand.mm v9, v0, v9
457 ; CHECK-NEXT: vmor.mm v0, v9, v8
459 %v = select <8 x i1> %cc, <8 x i1> %a, <8 x i1> %b
463 define <16 x i1> @vselect_v16i1(<16 x i1> %a, <16 x i1> %b, <16 x i1> %cc) {
464 ; CHECK-LABEL: vselect_v16i1:
466 ; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma
467 ; CHECK-NEXT: vmandn.mm v8, v8, v9
468 ; CHECK-NEXT: vmand.mm v9, v0, v9
469 ; CHECK-NEXT: vmor.mm v0, v9, v8
471 %v = select <16 x i1> %cc, <16 x i1> %a, <16 x i1> %b
475 define <32 x i1> @vselect_v32i1(<32 x i1> %a, <32 x i1> %b, <32 x i1> %cc) {
476 ; CHECK-LABEL: vselect_v32i1:
478 ; CHECK-NEXT: li a0, 32
479 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
480 ; CHECK-NEXT: vmandn.mm v8, v8, v9
481 ; CHECK-NEXT: vmand.mm v9, v0, v9
482 ; CHECK-NEXT: vmor.mm v0, v9, v8
484 %v = select <32 x i1> %cc, <32 x i1> %a, <32 x i1> %b
488 define <64 x i1> @vselect_v64i1(<64 x i1> %a, <64 x i1> %b, <64 x i1> %cc) {
489 ; CHECK-LABEL: vselect_v64i1:
491 ; CHECK-NEXT: li a0, 64
492 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
493 ; CHECK-NEXT: vmandn.mm v8, v8, v9
494 ; CHECK-NEXT: vmand.mm v9, v0, v9
495 ; CHECK-NEXT: vmor.mm v0, v9, v8
497 %v = select <64 x i1> %cc, <64 x i1> %a, <64 x i1> %b
500 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: