1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,CHECK-RV32
3 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,CHECK-RV64
4 ; RUN: llc -mtriple=riscv32 -mattr=+v,+zvkb -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-ZVKB,CHECK-ZVKB32
5 ; RUN: llc -mtriple=riscv64 -mattr=+v,+zvkb -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-ZVKB,CHECK-ZVKB64
7 define <vscale x 1 x i8> @vandn_vv_nxv1i8(<vscale x 1 x i8> %x, <vscale x 1 x i8> %y) {
8 ; CHECK-LABEL: vandn_vv_nxv1i8:
10 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
11 ; CHECK-NEXT: vnot.v v8, v8
12 ; CHECK-NEXT: vand.vv v8, v8, v9
15 ; CHECK-ZVKB-LABEL: vandn_vv_nxv1i8:
16 ; CHECK-ZVKB: # %bb.0:
17 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
18 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
19 ; CHECK-ZVKB-NEXT: ret
20 %head = insertelement <vscale x 1 x i8> poison, i8 -1, i32 0
21 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
22 %a = xor <vscale x 1 x i8> %x, %splat
23 %b = and <vscale x 1 x i8> %a, %y
24 ret <vscale x 1 x i8> %b
27 define <vscale x 1 x i8> @vandn_vv_swapped_nxv1i8(<vscale x 1 x i8> %x, <vscale x 1 x i8> %y) {
28 ; CHECK-LABEL: vandn_vv_swapped_nxv1i8:
30 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
31 ; CHECK-NEXT: vnot.v v8, v8
32 ; CHECK-NEXT: vand.vv v8, v9, v8
35 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv1i8:
36 ; CHECK-ZVKB: # %bb.0:
37 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
38 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
39 ; CHECK-ZVKB-NEXT: ret
40 %head = insertelement <vscale x 1 x i8> poison, i8 -1, i32 0
41 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
42 %a = xor <vscale x 1 x i8> %x, %splat
43 %b = and <vscale x 1 x i8> %y, %a
44 ret <vscale x 1 x i8> %b
47 define <vscale x 1 x i8> @vandn_vx_nxv1i8(i8 %x, <vscale x 1 x i8> %y) {
48 ; CHECK-LABEL: vandn_vx_nxv1i8:
50 ; CHECK-NEXT: not a0, a0
51 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
52 ; CHECK-NEXT: vand.vx v8, v8, a0
55 ; CHECK-ZVKB-LABEL: vandn_vx_nxv1i8:
56 ; CHECK-ZVKB: # %bb.0:
57 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
58 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
59 ; CHECK-ZVKB-NEXT: ret
61 %head = insertelement <vscale x 1 x i8> poison, i8 %a, i32 0
62 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
63 %b = and <vscale x 1 x i8> %splat, %y
64 ret <vscale x 1 x i8> %b
67 define <vscale x 1 x i8> @vandn_vx_swapped_nxv1i8(i8 %x, <vscale x 1 x i8> %y) {
68 ; CHECK-LABEL: vandn_vx_swapped_nxv1i8:
70 ; CHECK-NEXT: not a0, a0
71 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
72 ; CHECK-NEXT: vand.vx v8, v8, a0
75 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv1i8:
76 ; CHECK-ZVKB: # %bb.0:
77 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
78 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
79 ; CHECK-ZVKB-NEXT: ret
81 %head = insertelement <vscale x 1 x i8> poison, i8 %a, i32 0
82 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
83 %b = and <vscale x 1 x i8> %splat, %y
84 ret <vscale x 1 x i8> %b
87 define <vscale x 2 x i8> @vandn_vv_nxv2i8(<vscale x 2 x i8> %x, <vscale x 2 x i8> %y) {
88 ; CHECK-LABEL: vandn_vv_nxv2i8:
90 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
91 ; CHECK-NEXT: vnot.v v8, v8
92 ; CHECK-NEXT: vand.vv v8, v8, v9
95 ; CHECK-ZVKB-LABEL: vandn_vv_nxv2i8:
96 ; CHECK-ZVKB: # %bb.0:
97 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
98 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
99 ; CHECK-ZVKB-NEXT: ret
100 %head = insertelement <vscale x 2 x i8> poison, i8 -1, i32 0
101 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
102 %a = xor <vscale x 2 x i8> %x, %splat
103 %b = and <vscale x 2 x i8> %a, %y
104 ret <vscale x 2 x i8> %b
107 define <vscale x 2 x i8> @vandn_vv_swapped_nxv2i8(<vscale x 2 x i8> %x, <vscale x 2 x i8> %y) {
108 ; CHECK-LABEL: vandn_vv_swapped_nxv2i8:
110 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
111 ; CHECK-NEXT: vnot.v v8, v8
112 ; CHECK-NEXT: vand.vv v8, v9, v8
115 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv2i8:
116 ; CHECK-ZVKB: # %bb.0:
117 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
118 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
119 ; CHECK-ZVKB-NEXT: ret
120 %head = insertelement <vscale x 2 x i8> poison, i8 -1, i32 0
121 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
122 %a = xor <vscale x 2 x i8> %x, %splat
123 %b = and <vscale x 2 x i8> %y, %a
124 ret <vscale x 2 x i8> %b
127 define <vscale x 2 x i8> @vandn_vx_nxv2i8(i8 %x, <vscale x 2 x i8> %y) {
128 ; CHECK-LABEL: vandn_vx_nxv2i8:
130 ; CHECK-NEXT: not a0, a0
131 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
132 ; CHECK-NEXT: vand.vx v8, v8, a0
135 ; CHECK-ZVKB-LABEL: vandn_vx_nxv2i8:
136 ; CHECK-ZVKB: # %bb.0:
137 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
138 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
139 ; CHECK-ZVKB-NEXT: ret
141 %head = insertelement <vscale x 2 x i8> poison, i8 %a, i32 0
142 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
143 %b = and <vscale x 2 x i8> %splat, %y
144 ret <vscale x 2 x i8> %b
147 define <vscale x 2 x i8> @vandn_vx_swapped_nxv2i8(i8 %x, <vscale x 2 x i8> %y) {
148 ; CHECK-LABEL: vandn_vx_swapped_nxv2i8:
150 ; CHECK-NEXT: not a0, a0
151 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
152 ; CHECK-NEXT: vand.vx v8, v8, a0
155 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv2i8:
156 ; CHECK-ZVKB: # %bb.0:
157 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
158 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
159 ; CHECK-ZVKB-NEXT: ret
161 %head = insertelement <vscale x 2 x i8> poison, i8 %a, i32 0
162 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
163 %b = and <vscale x 2 x i8> %splat, %y
164 ret <vscale x 2 x i8> %b
167 define <vscale x 4 x i8> @vandn_vv_nxv4i8(<vscale x 4 x i8> %x, <vscale x 4 x i8> %y) {
168 ; CHECK-LABEL: vandn_vv_nxv4i8:
170 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
171 ; CHECK-NEXT: vnot.v v8, v8
172 ; CHECK-NEXT: vand.vv v8, v8, v9
175 ; CHECK-ZVKB-LABEL: vandn_vv_nxv4i8:
176 ; CHECK-ZVKB: # %bb.0:
177 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
178 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
179 ; CHECK-ZVKB-NEXT: ret
180 %head = insertelement <vscale x 4 x i8> poison, i8 -1, i32 0
181 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
182 %a = xor <vscale x 4 x i8> %x, %splat
183 %b = and <vscale x 4 x i8> %a, %y
184 ret <vscale x 4 x i8> %b
187 define <vscale x 4 x i8> @vandn_vv_swapped_nxv4i8(<vscale x 4 x i8> %x, <vscale x 4 x i8> %y) {
188 ; CHECK-LABEL: vandn_vv_swapped_nxv4i8:
190 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
191 ; CHECK-NEXT: vnot.v v8, v8
192 ; CHECK-NEXT: vand.vv v8, v9, v8
195 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv4i8:
196 ; CHECK-ZVKB: # %bb.0:
197 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
198 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
199 ; CHECK-ZVKB-NEXT: ret
200 %head = insertelement <vscale x 4 x i8> poison, i8 -1, i32 0
201 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
202 %a = xor <vscale x 4 x i8> %x, %splat
203 %b = and <vscale x 4 x i8> %y, %a
204 ret <vscale x 4 x i8> %b
207 define <vscale x 4 x i8> @vandn_vx_nxv4i8(i8 %x, <vscale x 4 x i8> %y) {
208 ; CHECK-LABEL: vandn_vx_nxv4i8:
210 ; CHECK-NEXT: not a0, a0
211 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
212 ; CHECK-NEXT: vand.vx v8, v8, a0
215 ; CHECK-ZVKB-LABEL: vandn_vx_nxv4i8:
216 ; CHECK-ZVKB: # %bb.0:
217 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
218 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
219 ; CHECK-ZVKB-NEXT: ret
221 %head = insertelement <vscale x 4 x i8> poison, i8 %a, i32 0
222 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
223 %b = and <vscale x 4 x i8> %splat, %y
224 ret <vscale x 4 x i8> %b
227 define <vscale x 4 x i8> @vandn_vx_swapped_nxv4i8(i8 %x, <vscale x 4 x i8> %y) {
228 ; CHECK-LABEL: vandn_vx_swapped_nxv4i8:
230 ; CHECK-NEXT: not a0, a0
231 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
232 ; CHECK-NEXT: vand.vx v8, v8, a0
235 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv4i8:
236 ; CHECK-ZVKB: # %bb.0:
237 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
238 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
239 ; CHECK-ZVKB-NEXT: ret
241 %head = insertelement <vscale x 4 x i8> poison, i8 %a, i32 0
242 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
243 %b = and <vscale x 4 x i8> %splat, %y
244 ret <vscale x 4 x i8> %b
247 define <vscale x 8 x i8> @vandn_vv_nxv8i8(<vscale x 8 x i8> %x, <vscale x 8 x i8> %y) {
248 ; CHECK-LABEL: vandn_vv_nxv8i8:
250 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
251 ; CHECK-NEXT: vnot.v v8, v8
252 ; CHECK-NEXT: vand.vv v8, v8, v9
255 ; CHECK-ZVKB-LABEL: vandn_vv_nxv8i8:
256 ; CHECK-ZVKB: # %bb.0:
257 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m1, ta, ma
258 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
259 ; CHECK-ZVKB-NEXT: ret
260 %head = insertelement <vscale x 8 x i8> poison, i8 -1, i32 0
261 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
262 %a = xor <vscale x 8 x i8> %x, %splat
263 %b = and <vscale x 8 x i8> %a, %y
264 ret <vscale x 8 x i8> %b
267 define <vscale x 8 x i8> @vandn_vv_swapped_nxv8i8(<vscale x 8 x i8> %x, <vscale x 8 x i8> %y) {
268 ; CHECK-LABEL: vandn_vv_swapped_nxv8i8:
270 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
271 ; CHECK-NEXT: vnot.v v8, v8
272 ; CHECK-NEXT: vand.vv v8, v9, v8
275 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv8i8:
276 ; CHECK-ZVKB: # %bb.0:
277 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m1, ta, ma
278 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
279 ; CHECK-ZVKB-NEXT: ret
280 %head = insertelement <vscale x 8 x i8> poison, i8 -1, i32 0
281 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
282 %a = xor <vscale x 8 x i8> %x, %splat
283 %b = and <vscale x 8 x i8> %y, %a
284 ret <vscale x 8 x i8> %b
287 define <vscale x 8 x i8> @vandn_vx_nxv8i8(i8 %x, <vscale x 8 x i8> %y) {
288 ; CHECK-LABEL: vandn_vx_nxv8i8:
290 ; CHECK-NEXT: not a0, a0
291 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
292 ; CHECK-NEXT: vand.vx v8, v8, a0
295 ; CHECK-ZVKB-LABEL: vandn_vx_nxv8i8:
296 ; CHECK-ZVKB: # %bb.0:
297 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m1, ta, ma
298 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
299 ; CHECK-ZVKB-NEXT: ret
301 %head = insertelement <vscale x 8 x i8> poison, i8 %a, i32 0
302 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
303 %b = and <vscale x 8 x i8> %splat, %y
304 ret <vscale x 8 x i8> %b
307 define <vscale x 8 x i8> @vandn_vx_swapped_nxv8i8(i8 %x, <vscale x 8 x i8> %y) {
308 ; CHECK-LABEL: vandn_vx_swapped_nxv8i8:
310 ; CHECK-NEXT: not a0, a0
311 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
312 ; CHECK-NEXT: vand.vx v8, v8, a0
315 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv8i8:
316 ; CHECK-ZVKB: # %bb.0:
317 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m1, ta, ma
318 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
319 ; CHECK-ZVKB-NEXT: ret
321 %head = insertelement <vscale x 8 x i8> poison, i8 %a, i32 0
322 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
323 %b = and <vscale x 8 x i8> %splat, %y
324 ret <vscale x 8 x i8> %b
327 define <vscale x 16 x i8> @vandn_vv_nxv16i8(<vscale x 16 x i8> %x, <vscale x 16 x i8> %y) {
328 ; CHECK-LABEL: vandn_vv_nxv16i8:
330 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
331 ; CHECK-NEXT: vnot.v v8, v8
332 ; CHECK-NEXT: vand.vv v8, v8, v10
335 ; CHECK-ZVKB-LABEL: vandn_vv_nxv16i8:
336 ; CHECK-ZVKB: # %bb.0:
337 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m2, ta, ma
338 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
339 ; CHECK-ZVKB-NEXT: ret
340 %head = insertelement <vscale x 16 x i8> poison, i8 -1, i32 0
341 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
342 %a = xor <vscale x 16 x i8> %x, %splat
343 %b = and <vscale x 16 x i8> %a, %y
344 ret <vscale x 16 x i8> %b
347 define <vscale x 16 x i8> @vandn_vv_swapped_nxv16i8(<vscale x 16 x i8> %x, <vscale x 16 x i8> %y) {
348 ; CHECK-LABEL: vandn_vv_swapped_nxv16i8:
350 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
351 ; CHECK-NEXT: vnot.v v8, v8
352 ; CHECK-NEXT: vand.vv v8, v10, v8
355 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv16i8:
356 ; CHECK-ZVKB: # %bb.0:
357 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m2, ta, ma
358 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
359 ; CHECK-ZVKB-NEXT: ret
360 %head = insertelement <vscale x 16 x i8> poison, i8 -1, i32 0
361 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
362 %a = xor <vscale x 16 x i8> %x, %splat
363 %b = and <vscale x 16 x i8> %y, %a
364 ret <vscale x 16 x i8> %b
367 define <vscale x 16 x i8> @vandn_vx_nxv16i8(i8 %x, <vscale x 16 x i8> %y) {
368 ; CHECK-LABEL: vandn_vx_nxv16i8:
370 ; CHECK-NEXT: not a0, a0
371 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
372 ; CHECK-NEXT: vand.vx v8, v8, a0
375 ; CHECK-ZVKB-LABEL: vandn_vx_nxv16i8:
376 ; CHECK-ZVKB: # %bb.0:
377 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m2, ta, ma
378 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
379 ; CHECK-ZVKB-NEXT: ret
381 %head = insertelement <vscale x 16 x i8> poison, i8 %a, i32 0
382 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
383 %b = and <vscale x 16 x i8> %splat, %y
384 ret <vscale x 16 x i8> %b
387 define <vscale x 16 x i8> @vandn_vx_swapped_nxv16i8(i8 %x, <vscale x 16 x i8> %y) {
388 ; CHECK-LABEL: vandn_vx_swapped_nxv16i8:
390 ; CHECK-NEXT: not a0, a0
391 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
392 ; CHECK-NEXT: vand.vx v8, v8, a0
395 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv16i8:
396 ; CHECK-ZVKB: # %bb.0:
397 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m2, ta, ma
398 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
399 ; CHECK-ZVKB-NEXT: ret
401 %head = insertelement <vscale x 16 x i8> poison, i8 %a, i32 0
402 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
403 %b = and <vscale x 16 x i8> %splat, %y
404 ret <vscale x 16 x i8> %b
407 define <vscale x 32 x i8> @vandn_vv_nxv32i8(<vscale x 32 x i8> %x, <vscale x 32 x i8> %y) {
408 ; CHECK-LABEL: vandn_vv_nxv32i8:
410 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
411 ; CHECK-NEXT: vnot.v v8, v8
412 ; CHECK-NEXT: vand.vv v8, v8, v12
415 ; CHECK-ZVKB-LABEL: vandn_vv_nxv32i8:
416 ; CHECK-ZVKB: # %bb.0:
417 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m4, ta, ma
418 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
419 ; CHECK-ZVKB-NEXT: ret
420 %head = insertelement <vscale x 32 x i8> poison, i8 -1, i32 0
421 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
422 %a = xor <vscale x 32 x i8> %x, %splat
423 %b = and <vscale x 32 x i8> %a, %y
424 ret <vscale x 32 x i8> %b
427 define <vscale x 32 x i8> @vandn_vv_swapped_nxv32i8(<vscale x 32 x i8> %x, <vscale x 32 x i8> %y) {
428 ; CHECK-LABEL: vandn_vv_swapped_nxv32i8:
430 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
431 ; CHECK-NEXT: vnot.v v8, v8
432 ; CHECK-NEXT: vand.vv v8, v12, v8
435 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv32i8:
436 ; CHECK-ZVKB: # %bb.0:
437 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m4, ta, ma
438 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
439 ; CHECK-ZVKB-NEXT: ret
440 %head = insertelement <vscale x 32 x i8> poison, i8 -1, i32 0
441 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
442 %a = xor <vscale x 32 x i8> %x, %splat
443 %b = and <vscale x 32 x i8> %y, %a
444 ret <vscale x 32 x i8> %b
447 define <vscale x 32 x i8> @vandn_vx_nxv32i8(i8 %x, <vscale x 32 x i8> %y) {
448 ; CHECK-LABEL: vandn_vx_nxv32i8:
450 ; CHECK-NEXT: not a0, a0
451 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
452 ; CHECK-NEXT: vand.vx v8, v8, a0
455 ; CHECK-ZVKB-LABEL: vandn_vx_nxv32i8:
456 ; CHECK-ZVKB: # %bb.0:
457 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m4, ta, ma
458 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
459 ; CHECK-ZVKB-NEXT: ret
461 %head = insertelement <vscale x 32 x i8> poison, i8 %a, i32 0
462 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
463 %b = and <vscale x 32 x i8> %splat, %y
464 ret <vscale x 32 x i8> %b
467 define <vscale x 32 x i8> @vandn_vx_swapped_nxv32i8(i8 %x, <vscale x 32 x i8> %y) {
468 ; CHECK-LABEL: vandn_vx_swapped_nxv32i8:
470 ; CHECK-NEXT: not a0, a0
471 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
472 ; CHECK-NEXT: vand.vx v8, v8, a0
475 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv32i8:
476 ; CHECK-ZVKB: # %bb.0:
477 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m4, ta, ma
478 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
479 ; CHECK-ZVKB-NEXT: ret
481 %head = insertelement <vscale x 32 x i8> poison, i8 %a, i32 0
482 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
483 %b = and <vscale x 32 x i8> %splat, %y
484 ret <vscale x 32 x i8> %b
487 define <vscale x 64 x i8> @vandn_vv_nxv64i8(<vscale x 64 x i8> %x, <vscale x 64 x i8> %y) {
488 ; CHECK-LABEL: vandn_vv_nxv64i8:
490 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
491 ; CHECK-NEXT: vnot.v v8, v8
492 ; CHECK-NEXT: vand.vv v8, v8, v16
495 ; CHECK-ZVKB-LABEL: vandn_vv_nxv64i8:
496 ; CHECK-ZVKB: # %bb.0:
497 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m8, ta, ma
498 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
499 ; CHECK-ZVKB-NEXT: ret
500 %head = insertelement <vscale x 64 x i8> poison, i8 -1, i32 0
501 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
502 %a = xor <vscale x 64 x i8> %x, %splat
503 %b = and <vscale x 64 x i8> %a, %y
504 ret <vscale x 64 x i8> %b
507 define <vscale x 64 x i8> @vandn_vv_swapped_nxv64i8(<vscale x 64 x i8> %x, <vscale x 64 x i8> %y) {
508 ; CHECK-LABEL: vandn_vv_swapped_nxv64i8:
510 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
511 ; CHECK-NEXT: vnot.v v8, v8
512 ; CHECK-NEXT: vand.vv v8, v16, v8
515 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv64i8:
516 ; CHECK-ZVKB: # %bb.0:
517 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, m8, ta, ma
518 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
519 ; CHECK-ZVKB-NEXT: ret
520 %head = insertelement <vscale x 64 x i8> poison, i8 -1, i32 0
521 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
522 %a = xor <vscale x 64 x i8> %x, %splat
523 %b = and <vscale x 64 x i8> %y, %a
524 ret <vscale x 64 x i8> %b
527 define <vscale x 64 x i8> @vandn_vx_nxv64i8(i8 %x, <vscale x 64 x i8> %y) {
528 ; CHECK-LABEL: vandn_vx_nxv64i8:
530 ; CHECK-NEXT: not a0, a0
531 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
532 ; CHECK-NEXT: vand.vx v8, v8, a0
535 ; CHECK-ZVKB-LABEL: vandn_vx_nxv64i8:
536 ; CHECK-ZVKB: # %bb.0:
537 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m8, ta, ma
538 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
539 ; CHECK-ZVKB-NEXT: ret
541 %head = insertelement <vscale x 64 x i8> poison, i8 %a, i32 0
542 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
543 %b = and <vscale x 64 x i8> %splat, %y
544 ret <vscale x 64 x i8> %b
547 define <vscale x 64 x i8> @vandn_vx_swapped_nxv64i8(i8 %x, <vscale x 64 x i8> %y) {
548 ; CHECK-LABEL: vandn_vx_swapped_nxv64i8:
550 ; CHECK-NEXT: not a0, a0
551 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
552 ; CHECK-NEXT: vand.vx v8, v8, a0
555 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv64i8:
556 ; CHECK-ZVKB: # %bb.0:
557 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e8, m8, ta, ma
558 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
559 ; CHECK-ZVKB-NEXT: ret
561 %head = insertelement <vscale x 64 x i8> poison, i8 %a, i32 0
562 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
563 %b = and <vscale x 64 x i8> %splat, %y
564 ret <vscale x 64 x i8> %b
567 define <vscale x 1 x i16> @vandn_vv_nxv1i16(<vscale x 1 x i16> %x, <vscale x 1 x i16> %y) {
568 ; CHECK-LABEL: vandn_vv_nxv1i16:
570 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
571 ; CHECK-NEXT: vnot.v v8, v8
572 ; CHECK-NEXT: vand.vv v8, v8, v9
575 ; CHECK-ZVKB-LABEL: vandn_vv_nxv1i16:
576 ; CHECK-ZVKB: # %bb.0:
577 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
578 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
579 ; CHECK-ZVKB-NEXT: ret
580 %head = insertelement <vscale x 1 x i16> poison, i16 -1, i32 0
581 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
582 %a = xor <vscale x 1 x i16> %x, %splat
583 %b = and <vscale x 1 x i16> %a, %y
584 ret <vscale x 1 x i16> %b
587 define <vscale x 1 x i16> @vandn_vv_swapped_nxv1i16(<vscale x 1 x i16> %x, <vscale x 1 x i16> %y) {
588 ; CHECK-LABEL: vandn_vv_swapped_nxv1i16:
590 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
591 ; CHECK-NEXT: vnot.v v8, v8
592 ; CHECK-NEXT: vand.vv v8, v9, v8
595 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv1i16:
596 ; CHECK-ZVKB: # %bb.0:
597 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
598 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
599 ; CHECK-ZVKB-NEXT: ret
600 %head = insertelement <vscale x 1 x i16> poison, i16 -1, i32 0
601 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
602 %a = xor <vscale x 1 x i16> %x, %splat
603 %b = and <vscale x 1 x i16> %y, %a
604 ret <vscale x 1 x i16> %b
607 define <vscale x 1 x i16> @vandn_vx_nxv1i16(i16 %x, <vscale x 1 x i16> %y) {
608 ; CHECK-LABEL: vandn_vx_nxv1i16:
610 ; CHECK-NEXT: not a0, a0
611 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
612 ; CHECK-NEXT: vand.vx v8, v8, a0
615 ; CHECK-ZVKB-LABEL: vandn_vx_nxv1i16:
616 ; CHECK-ZVKB: # %bb.0:
617 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
618 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
619 ; CHECK-ZVKB-NEXT: ret
621 %head = insertelement <vscale x 1 x i16> poison, i16 %a, i32 0
622 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
623 %b = and <vscale x 1 x i16> %splat, %y
624 ret <vscale x 1 x i16> %b
627 define <vscale x 1 x i16> @vandn_vx_swapped_nxv1i16(i16 %x, <vscale x 1 x i16> %y) {
628 ; CHECK-LABEL: vandn_vx_swapped_nxv1i16:
630 ; CHECK-NEXT: not a0, a0
631 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
632 ; CHECK-NEXT: vand.vx v8, v8, a0
635 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv1i16:
636 ; CHECK-ZVKB: # %bb.0:
637 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
638 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
639 ; CHECK-ZVKB-NEXT: ret
641 %head = insertelement <vscale x 1 x i16> poison, i16 %a, i32 0
642 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
643 %b = and <vscale x 1 x i16> %splat, %y
644 ret <vscale x 1 x i16> %b
647 define <vscale x 2 x i16> @vandn_vv_nxv2i16(<vscale x 2 x i16> %x, <vscale x 2 x i16> %y) {
648 ; CHECK-LABEL: vandn_vv_nxv2i16:
650 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
651 ; CHECK-NEXT: vnot.v v8, v8
652 ; CHECK-NEXT: vand.vv v8, v8, v9
655 ; CHECK-ZVKB-LABEL: vandn_vv_nxv2i16:
656 ; CHECK-ZVKB: # %bb.0:
657 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
658 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
659 ; CHECK-ZVKB-NEXT: ret
660 %head = insertelement <vscale x 2 x i16> poison, i16 -1, i32 0
661 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
662 %a = xor <vscale x 2 x i16> %x, %splat
663 %b = and <vscale x 2 x i16> %a, %y
664 ret <vscale x 2 x i16> %b
667 define <vscale x 2 x i16> @vandn_vv_swapped_nxv2i16(<vscale x 2 x i16> %x, <vscale x 2 x i16> %y) {
668 ; CHECK-LABEL: vandn_vv_swapped_nxv2i16:
670 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
671 ; CHECK-NEXT: vnot.v v8, v8
672 ; CHECK-NEXT: vand.vv v8, v9, v8
675 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv2i16:
676 ; CHECK-ZVKB: # %bb.0:
677 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
678 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
679 ; CHECK-ZVKB-NEXT: ret
680 %head = insertelement <vscale x 2 x i16> poison, i16 -1, i32 0
681 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
682 %a = xor <vscale x 2 x i16> %x, %splat
683 %b = and <vscale x 2 x i16> %y, %a
684 ret <vscale x 2 x i16> %b
687 define <vscale x 2 x i16> @vandn_vx_nxv2i16(i16 %x, <vscale x 2 x i16> %y) {
688 ; CHECK-LABEL: vandn_vx_nxv2i16:
690 ; CHECK-NEXT: not a0, a0
691 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
692 ; CHECK-NEXT: vand.vx v8, v8, a0
695 ; CHECK-ZVKB-LABEL: vandn_vx_nxv2i16:
696 ; CHECK-ZVKB: # %bb.0:
697 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
698 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
699 ; CHECK-ZVKB-NEXT: ret
701 %head = insertelement <vscale x 2 x i16> poison, i16 %a, i32 0
702 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
703 %b = and <vscale x 2 x i16> %splat, %y
704 ret <vscale x 2 x i16> %b
707 define <vscale x 2 x i16> @vandn_vx_swapped_nxv2i16(i16 %x, <vscale x 2 x i16> %y) {
708 ; CHECK-LABEL: vandn_vx_swapped_nxv2i16:
710 ; CHECK-NEXT: not a0, a0
711 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
712 ; CHECK-NEXT: vand.vx v8, v8, a0
715 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv2i16:
716 ; CHECK-ZVKB: # %bb.0:
717 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
718 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
719 ; CHECK-ZVKB-NEXT: ret
721 %head = insertelement <vscale x 2 x i16> poison, i16 %a, i32 0
722 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
723 %b = and <vscale x 2 x i16> %splat, %y
724 ret <vscale x 2 x i16> %b
727 define <vscale x 4 x i16> @vandn_vv_nxv4i16(<vscale x 4 x i16> %x, <vscale x 4 x i16> %y) {
728 ; CHECK-LABEL: vandn_vv_nxv4i16:
730 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
731 ; CHECK-NEXT: vnot.v v8, v8
732 ; CHECK-NEXT: vand.vv v8, v8, v9
735 ; CHECK-ZVKB-LABEL: vandn_vv_nxv4i16:
736 ; CHECK-ZVKB: # %bb.0:
737 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m1, ta, ma
738 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
739 ; CHECK-ZVKB-NEXT: ret
740 %head = insertelement <vscale x 4 x i16> poison, i16 -1, i32 0
741 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
742 %a = xor <vscale x 4 x i16> %x, %splat
743 %b = and <vscale x 4 x i16> %a, %y
744 ret <vscale x 4 x i16> %b
747 define <vscale x 4 x i16> @vandn_vv_swapped_nxv4i16(<vscale x 4 x i16> %x, <vscale x 4 x i16> %y) {
748 ; CHECK-LABEL: vandn_vv_swapped_nxv4i16:
750 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
751 ; CHECK-NEXT: vnot.v v8, v8
752 ; CHECK-NEXT: vand.vv v8, v9, v8
755 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv4i16:
756 ; CHECK-ZVKB: # %bb.0:
757 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m1, ta, ma
758 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
759 ; CHECK-ZVKB-NEXT: ret
760 %head = insertelement <vscale x 4 x i16> poison, i16 -1, i32 0
761 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
762 %a = xor <vscale x 4 x i16> %x, %splat
763 %b = and <vscale x 4 x i16> %y, %a
764 ret <vscale x 4 x i16> %b
767 define <vscale x 4 x i16> @vandn_vx_nxv4i16(i16 %x, <vscale x 4 x i16> %y) {
768 ; CHECK-LABEL: vandn_vx_nxv4i16:
770 ; CHECK-NEXT: not a0, a0
771 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
772 ; CHECK-NEXT: vand.vx v8, v8, a0
775 ; CHECK-ZVKB-LABEL: vandn_vx_nxv4i16:
776 ; CHECK-ZVKB: # %bb.0:
777 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m1, ta, ma
778 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
779 ; CHECK-ZVKB-NEXT: ret
781 %head = insertelement <vscale x 4 x i16> poison, i16 %a, i32 0
782 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
783 %b = and <vscale x 4 x i16> %splat, %y
784 ret <vscale x 4 x i16> %b
787 define <vscale x 4 x i16> @vandn_vx_swapped_nxv4i16(i16 %x, <vscale x 4 x i16> %y) {
788 ; CHECK-LABEL: vandn_vx_swapped_nxv4i16:
790 ; CHECK-NEXT: not a0, a0
791 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
792 ; CHECK-NEXT: vand.vx v8, v8, a0
795 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv4i16:
796 ; CHECK-ZVKB: # %bb.0:
797 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m1, ta, ma
798 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
799 ; CHECK-ZVKB-NEXT: ret
801 %head = insertelement <vscale x 4 x i16> poison, i16 %a, i32 0
802 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
803 %b = and <vscale x 4 x i16> %splat, %y
804 ret <vscale x 4 x i16> %b
807 define <vscale x 8 x i16> @vandn_vv_nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y) {
808 ; CHECK-LABEL: vandn_vv_nxv8i16:
810 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
811 ; CHECK-NEXT: vnot.v v8, v8
812 ; CHECK-NEXT: vand.vv v8, v8, v10
815 ; CHECK-ZVKB-LABEL: vandn_vv_nxv8i16:
816 ; CHECK-ZVKB: # %bb.0:
817 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m2, ta, ma
818 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
819 ; CHECK-ZVKB-NEXT: ret
820 %head = insertelement <vscale x 8 x i16> poison, i16 -1, i32 0
821 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
822 %a = xor <vscale x 8 x i16> %x, %splat
823 %b = and <vscale x 8 x i16> %a, %y
824 ret <vscale x 8 x i16> %b
827 define <vscale x 8 x i16> @vandn_vv_swapped_nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y) {
828 ; CHECK-LABEL: vandn_vv_swapped_nxv8i16:
830 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
831 ; CHECK-NEXT: vnot.v v8, v8
832 ; CHECK-NEXT: vand.vv v8, v10, v8
835 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv8i16:
836 ; CHECK-ZVKB: # %bb.0:
837 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m2, ta, ma
838 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
839 ; CHECK-ZVKB-NEXT: ret
840 %head = insertelement <vscale x 8 x i16> poison, i16 -1, i32 0
841 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
842 %a = xor <vscale x 8 x i16> %x, %splat
843 %b = and <vscale x 8 x i16> %y, %a
844 ret <vscale x 8 x i16> %b
847 define <vscale x 8 x i16> @vandn_vx_nxv8i16(i16 %x, <vscale x 8 x i16> %y) {
848 ; CHECK-LABEL: vandn_vx_nxv8i16:
850 ; CHECK-NEXT: not a0, a0
851 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
852 ; CHECK-NEXT: vand.vx v8, v8, a0
855 ; CHECK-ZVKB-LABEL: vandn_vx_nxv8i16:
856 ; CHECK-ZVKB: # %bb.0:
857 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m2, ta, ma
858 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
859 ; CHECK-ZVKB-NEXT: ret
861 %head = insertelement <vscale x 8 x i16> poison, i16 %a, i32 0
862 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
863 %b = and <vscale x 8 x i16> %splat, %y
864 ret <vscale x 8 x i16> %b
867 define <vscale x 8 x i16> @vandn_vx_swapped_nxv8i16(i16 %x, <vscale x 8 x i16> %y) {
868 ; CHECK-LABEL: vandn_vx_swapped_nxv8i16:
870 ; CHECK-NEXT: not a0, a0
871 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
872 ; CHECK-NEXT: vand.vx v8, v8, a0
875 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv8i16:
876 ; CHECK-ZVKB: # %bb.0:
877 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m2, ta, ma
878 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
879 ; CHECK-ZVKB-NEXT: ret
881 %head = insertelement <vscale x 8 x i16> poison, i16 %a, i32 0
882 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
883 %b = and <vscale x 8 x i16> %splat, %y
884 ret <vscale x 8 x i16> %b
887 define <vscale x 16 x i16> @vandn_vv_nxv16i16(<vscale x 16 x i16> %x, <vscale x 16 x i16> %y) {
888 ; CHECK-LABEL: vandn_vv_nxv16i16:
890 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
891 ; CHECK-NEXT: vnot.v v8, v8
892 ; CHECK-NEXT: vand.vv v8, v8, v12
895 ; CHECK-ZVKB-LABEL: vandn_vv_nxv16i16:
896 ; CHECK-ZVKB: # %bb.0:
897 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m4, ta, ma
898 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
899 ; CHECK-ZVKB-NEXT: ret
900 %head = insertelement <vscale x 16 x i16> poison, i16 -1, i32 0
901 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
902 %a = xor <vscale x 16 x i16> %x, %splat
903 %b = and <vscale x 16 x i16> %a, %y
904 ret <vscale x 16 x i16> %b
907 define <vscale x 16 x i16> @vandn_vv_swapped_nxv16i16(<vscale x 16 x i16> %x, <vscale x 16 x i16> %y) {
908 ; CHECK-LABEL: vandn_vv_swapped_nxv16i16:
910 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
911 ; CHECK-NEXT: vnot.v v8, v8
912 ; CHECK-NEXT: vand.vv v8, v12, v8
915 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv16i16:
916 ; CHECK-ZVKB: # %bb.0:
917 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m4, ta, ma
918 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
919 ; CHECK-ZVKB-NEXT: ret
920 %head = insertelement <vscale x 16 x i16> poison, i16 -1, i32 0
921 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
922 %a = xor <vscale x 16 x i16> %x, %splat
923 %b = and <vscale x 16 x i16> %y, %a
924 ret <vscale x 16 x i16> %b
927 define <vscale x 16 x i16> @vandn_vx_nxv16i16(i16 %x, <vscale x 16 x i16> %y) {
928 ; CHECK-LABEL: vandn_vx_nxv16i16:
930 ; CHECK-NEXT: not a0, a0
931 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
932 ; CHECK-NEXT: vand.vx v8, v8, a0
935 ; CHECK-ZVKB-LABEL: vandn_vx_nxv16i16:
936 ; CHECK-ZVKB: # %bb.0:
937 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m4, ta, ma
938 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
939 ; CHECK-ZVKB-NEXT: ret
941 %head = insertelement <vscale x 16 x i16> poison, i16 %a, i32 0
942 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
943 %b = and <vscale x 16 x i16> %splat, %y
944 ret <vscale x 16 x i16> %b
947 define <vscale x 16 x i16> @vandn_vx_swapped_nxv16i16(i16 %x, <vscale x 16 x i16> %y) {
948 ; CHECK-LABEL: vandn_vx_swapped_nxv16i16:
950 ; CHECK-NEXT: not a0, a0
951 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
952 ; CHECK-NEXT: vand.vx v8, v8, a0
955 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv16i16:
956 ; CHECK-ZVKB: # %bb.0:
957 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m4, ta, ma
958 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
959 ; CHECK-ZVKB-NEXT: ret
961 %head = insertelement <vscale x 16 x i16> poison, i16 %a, i32 0
962 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
963 %b = and <vscale x 16 x i16> %splat, %y
964 ret <vscale x 16 x i16> %b
967 define <vscale x 32 x i16> @vandn_vv_nxv32i16(<vscale x 32 x i16> %x, <vscale x 32 x i16> %y) {
968 ; CHECK-LABEL: vandn_vv_nxv32i16:
970 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
971 ; CHECK-NEXT: vnot.v v8, v8
972 ; CHECK-NEXT: vand.vv v8, v8, v16
975 ; CHECK-ZVKB-LABEL: vandn_vv_nxv32i16:
976 ; CHECK-ZVKB: # %bb.0:
977 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m8, ta, ma
978 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
979 ; CHECK-ZVKB-NEXT: ret
980 %head = insertelement <vscale x 32 x i16> poison, i16 -1, i32 0
981 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
982 %a = xor <vscale x 32 x i16> %x, %splat
983 %b = and <vscale x 32 x i16> %a, %y
984 ret <vscale x 32 x i16> %b
987 define <vscale x 32 x i16> @vandn_vv_swapped_nxv32i16(<vscale x 32 x i16> %x, <vscale x 32 x i16> %y) {
988 ; CHECK-LABEL: vandn_vv_swapped_nxv32i16:
990 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
991 ; CHECK-NEXT: vnot.v v8, v8
992 ; CHECK-NEXT: vand.vv v8, v16, v8
995 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv32i16:
996 ; CHECK-ZVKB: # %bb.0:
997 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e16, m8, ta, ma
998 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
999 ; CHECK-ZVKB-NEXT: ret
1000 %head = insertelement <vscale x 32 x i16> poison, i16 -1, i32 0
1001 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
1002 %a = xor <vscale x 32 x i16> %x, %splat
1003 %b = and <vscale x 32 x i16> %y, %a
1004 ret <vscale x 32 x i16> %b
1007 define <vscale x 32 x i16> @vandn_vx_nxv32i16(i16 %x, <vscale x 32 x i16> %y) {
1008 ; CHECK-LABEL: vandn_vx_nxv32i16:
1010 ; CHECK-NEXT: not a0, a0
1011 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
1012 ; CHECK-NEXT: vand.vx v8, v8, a0
1015 ; CHECK-ZVKB-LABEL: vandn_vx_nxv32i16:
1016 ; CHECK-ZVKB: # %bb.0:
1017 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m8, ta, ma
1018 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1019 ; CHECK-ZVKB-NEXT: ret
1021 %head = insertelement <vscale x 32 x i16> poison, i16 %a, i32 0
1022 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
1023 %b = and <vscale x 32 x i16> %splat, %y
1024 ret <vscale x 32 x i16> %b
1027 define <vscale x 32 x i16> @vandn_vx_swapped_nxv32i16(i16 %x, <vscale x 32 x i16> %y) {
1028 ; CHECK-LABEL: vandn_vx_swapped_nxv32i16:
1030 ; CHECK-NEXT: not a0, a0
1031 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
1032 ; CHECK-NEXT: vand.vx v8, v8, a0
1035 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv32i16:
1036 ; CHECK-ZVKB: # %bb.0:
1037 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e16, m8, ta, ma
1038 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1039 ; CHECK-ZVKB-NEXT: ret
1041 %head = insertelement <vscale x 32 x i16> poison, i16 %a, i32 0
1042 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
1043 %b = and <vscale x 32 x i16> %splat, %y
1044 ret <vscale x 32 x i16> %b
1047 define <vscale x 1 x i32> @vandn_vv_nxv1i32(<vscale x 1 x i32> %x, <vscale x 1 x i32> %y) {
1048 ; CHECK-LABEL: vandn_vv_nxv1i32:
1050 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1051 ; CHECK-NEXT: vnot.v v8, v8
1052 ; CHECK-NEXT: vand.vv v8, v8, v9
1055 ; CHECK-ZVKB-LABEL: vandn_vv_nxv1i32:
1056 ; CHECK-ZVKB: # %bb.0:
1057 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1058 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
1059 ; CHECK-ZVKB-NEXT: ret
1060 %head = insertelement <vscale x 1 x i32> poison, i32 -1, i32 0
1061 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1062 %a = xor <vscale x 1 x i32> %x, %splat
1063 %b = and <vscale x 1 x i32> %a, %y
1064 ret <vscale x 1 x i32> %b
1067 define <vscale x 1 x i32> @vandn_vv_swapped_nxv1i32(<vscale x 1 x i32> %x, <vscale x 1 x i32> %y) {
1068 ; CHECK-LABEL: vandn_vv_swapped_nxv1i32:
1070 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1071 ; CHECK-NEXT: vnot.v v8, v8
1072 ; CHECK-NEXT: vand.vv v8, v9, v8
1075 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv1i32:
1076 ; CHECK-ZVKB: # %bb.0:
1077 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1078 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
1079 ; CHECK-ZVKB-NEXT: ret
1080 %head = insertelement <vscale x 1 x i32> poison, i32 -1, i32 0
1081 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1082 %a = xor <vscale x 1 x i32> %x, %splat
1083 %b = and <vscale x 1 x i32> %y, %a
1084 ret <vscale x 1 x i32> %b
1087 define <vscale x 1 x i32> @vandn_vx_nxv1i32(i32 %x, <vscale x 1 x i32> %y) {
1088 ; CHECK-LABEL: vandn_vx_nxv1i32:
1090 ; CHECK-NEXT: not a0, a0
1091 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
1092 ; CHECK-NEXT: vand.vx v8, v8, a0
1095 ; CHECK-ZVKB-LABEL: vandn_vx_nxv1i32:
1096 ; CHECK-ZVKB: # %bb.0:
1097 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
1098 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1099 ; CHECK-ZVKB-NEXT: ret
1101 %head = insertelement <vscale x 1 x i32> poison, i32 %a, i32 0
1102 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1103 %b = and <vscale x 1 x i32> %splat, %y
1104 ret <vscale x 1 x i32> %b
1107 define <vscale x 1 x i32> @vandn_vx_swapped_nxv1i32(i32 %x, <vscale x 1 x i32> %y) {
1108 ; CHECK-LABEL: vandn_vx_swapped_nxv1i32:
1110 ; CHECK-NEXT: not a0, a0
1111 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
1112 ; CHECK-NEXT: vand.vx v8, v8, a0
1115 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv1i32:
1116 ; CHECK-ZVKB: # %bb.0:
1117 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
1118 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1119 ; CHECK-ZVKB-NEXT: ret
1121 %head = insertelement <vscale x 1 x i32> poison, i32 %a, i32 0
1122 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1123 %b = and <vscale x 1 x i32> %splat, %y
1124 ret <vscale x 1 x i32> %b
1127 define <vscale x 2 x i32> @vandn_vv_nxv2i32(<vscale x 2 x i32> %x, <vscale x 2 x i32> %y) {
1128 ; CHECK-LABEL: vandn_vv_nxv2i32:
1130 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1131 ; CHECK-NEXT: vnot.v v8, v8
1132 ; CHECK-NEXT: vand.vv v8, v8, v9
1135 ; CHECK-ZVKB-LABEL: vandn_vv_nxv2i32:
1136 ; CHECK-ZVKB: # %bb.0:
1137 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1138 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
1139 ; CHECK-ZVKB-NEXT: ret
1140 %head = insertelement <vscale x 2 x i32> poison, i32 -1, i32 0
1141 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
1142 %a = xor <vscale x 2 x i32> %x, %splat
1143 %b = and <vscale x 2 x i32> %a, %y
1144 ret <vscale x 2 x i32> %b
1147 define <vscale x 2 x i32> @vandn_vv_swapped_nxv2i32(<vscale x 2 x i32> %x, <vscale x 2 x i32> %y) {
1148 ; CHECK-LABEL: vandn_vv_swapped_nxv2i32:
1150 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1151 ; CHECK-NEXT: vnot.v v8, v8
1152 ; CHECK-NEXT: vand.vv v8, v9, v8
1155 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv2i32:
1156 ; CHECK-ZVKB: # %bb.0:
1157 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1158 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
1159 ; CHECK-ZVKB-NEXT: ret
1160 %head = insertelement <vscale x 2 x i32> poison, i32 -1, i32 0
1161 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
1162 %a = xor <vscale x 2 x i32> %x, %splat
1163 %b = and <vscale x 2 x i32> %y, %a
1164 ret <vscale x 2 x i32> %b
1167 define <vscale x 2 x i32> @vandn_vx_nxv2i32(i32 %x, <vscale x 2 x i32> %y) {
1168 ; CHECK-LABEL: vandn_vx_nxv2i32:
1170 ; CHECK-NEXT: not a0, a0
1171 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
1172 ; CHECK-NEXT: vand.vx v8, v8, a0
1175 ; CHECK-ZVKB-LABEL: vandn_vx_nxv2i32:
1176 ; CHECK-ZVKB: # %bb.0:
1177 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m1, ta, ma
1178 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1179 ; CHECK-ZVKB-NEXT: ret
1181 %head = insertelement <vscale x 2 x i32> poison, i32 %a, i32 0
1182 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
1183 %b = and <vscale x 2 x i32> %splat, %y
1184 ret <vscale x 2 x i32> %b
1187 define <vscale x 2 x i32> @vandn_vx_swapped_nxv2i32(i32 %x, <vscale x 2 x i32> %y) {
1188 ; CHECK-LABEL: vandn_vx_swapped_nxv2i32:
1190 ; CHECK-NEXT: not a0, a0
1191 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
1192 ; CHECK-NEXT: vand.vx v8, v8, a0
1195 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv2i32:
1196 ; CHECK-ZVKB: # %bb.0:
1197 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m1, ta, ma
1198 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1199 ; CHECK-ZVKB-NEXT: ret
1201 %head = insertelement <vscale x 2 x i32> poison, i32 %a, i32 0
1202 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
1203 %b = and <vscale x 2 x i32> %splat, %y
1204 ret <vscale x 2 x i32> %b
1207 define <vscale x 4 x i32> @vandn_vv_nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) {
1208 ; CHECK-LABEL: vandn_vv_nxv4i32:
1210 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1211 ; CHECK-NEXT: vnot.v v8, v8
1212 ; CHECK-NEXT: vand.vv v8, v8, v10
1215 ; CHECK-ZVKB-LABEL: vandn_vv_nxv4i32:
1216 ; CHECK-ZVKB: # %bb.0:
1217 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1218 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
1219 ; CHECK-ZVKB-NEXT: ret
1220 %head = insertelement <vscale x 4 x i32> poison, i32 -1, i32 0
1221 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
1222 %a = xor <vscale x 4 x i32> %x, %splat
1223 %b = and <vscale x 4 x i32> %a, %y
1224 ret <vscale x 4 x i32> %b
1227 define <vscale x 4 x i32> @vandn_vv_swapped_nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) {
1228 ; CHECK-LABEL: vandn_vv_swapped_nxv4i32:
1230 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1231 ; CHECK-NEXT: vnot.v v8, v8
1232 ; CHECK-NEXT: vand.vv v8, v10, v8
1235 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv4i32:
1236 ; CHECK-ZVKB: # %bb.0:
1237 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1238 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
1239 ; CHECK-ZVKB-NEXT: ret
1240 %head = insertelement <vscale x 4 x i32> poison, i32 -1, i32 0
1241 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
1242 %a = xor <vscale x 4 x i32> %x, %splat
1243 %b = and <vscale x 4 x i32> %y, %a
1244 ret <vscale x 4 x i32> %b
1247 define <vscale x 4 x i32> @vandn_vx_nxv4i32(i32 %x, <vscale x 4 x i32> %y) {
1248 ; CHECK-LABEL: vandn_vx_nxv4i32:
1250 ; CHECK-NEXT: not a0, a0
1251 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1252 ; CHECK-NEXT: vand.vx v8, v8, a0
1255 ; CHECK-ZVKB-LABEL: vandn_vx_nxv4i32:
1256 ; CHECK-ZVKB: # %bb.0:
1257 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1258 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1259 ; CHECK-ZVKB-NEXT: ret
1261 %head = insertelement <vscale x 4 x i32> poison, i32 %a, i32 0
1262 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
1263 %b = and <vscale x 4 x i32> %splat, %y
1264 ret <vscale x 4 x i32> %b
1267 define <vscale x 4 x i32> @vandn_vx_swapped_nxv4i32(i32 %x, <vscale x 4 x i32> %y) {
1268 ; CHECK-LABEL: vandn_vx_swapped_nxv4i32:
1270 ; CHECK-NEXT: not a0, a0
1271 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1272 ; CHECK-NEXT: vand.vx v8, v8, a0
1275 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv4i32:
1276 ; CHECK-ZVKB: # %bb.0:
1277 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1278 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1279 ; CHECK-ZVKB-NEXT: ret
1281 %head = insertelement <vscale x 4 x i32> poison, i32 %a, i32 0
1282 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
1283 %b = and <vscale x 4 x i32> %splat, %y
1284 ret <vscale x 4 x i32> %b
1287 define <vscale x 8 x i32> @vandn_vv_nxv8i32(<vscale x 8 x i32> %x, <vscale x 8 x i32> %y) {
1288 ; CHECK-LABEL: vandn_vv_nxv8i32:
1290 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1291 ; CHECK-NEXT: vnot.v v8, v8
1292 ; CHECK-NEXT: vand.vv v8, v8, v12
1295 ; CHECK-ZVKB-LABEL: vandn_vv_nxv8i32:
1296 ; CHECK-ZVKB: # %bb.0:
1297 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1298 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
1299 ; CHECK-ZVKB-NEXT: ret
1300 %head = insertelement <vscale x 8 x i32> poison, i32 -1, i32 0
1301 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1302 %a = xor <vscale x 8 x i32> %x, %splat
1303 %b = and <vscale x 8 x i32> %a, %y
1304 ret <vscale x 8 x i32> %b
1307 define <vscale x 8 x i32> @vandn_vv_swapped_nxv8i32(<vscale x 8 x i32> %x, <vscale x 8 x i32> %y) {
1308 ; CHECK-LABEL: vandn_vv_swapped_nxv8i32:
1310 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1311 ; CHECK-NEXT: vnot.v v8, v8
1312 ; CHECK-NEXT: vand.vv v8, v12, v8
1315 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv8i32:
1316 ; CHECK-ZVKB: # %bb.0:
1317 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1318 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
1319 ; CHECK-ZVKB-NEXT: ret
1320 %head = insertelement <vscale x 8 x i32> poison, i32 -1, i32 0
1321 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1322 %a = xor <vscale x 8 x i32> %x, %splat
1323 %b = and <vscale x 8 x i32> %y, %a
1324 ret <vscale x 8 x i32> %b
1327 define <vscale x 8 x i32> @vandn_vx_nxv8i32(i32 %x, <vscale x 8 x i32> %y) {
1328 ; CHECK-LABEL: vandn_vx_nxv8i32:
1330 ; CHECK-NEXT: not a0, a0
1331 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1332 ; CHECK-NEXT: vand.vx v8, v8, a0
1335 ; CHECK-ZVKB-LABEL: vandn_vx_nxv8i32:
1336 ; CHECK-ZVKB: # %bb.0:
1337 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1338 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1339 ; CHECK-ZVKB-NEXT: ret
1341 %head = insertelement <vscale x 8 x i32> poison, i32 %a, i32 0
1342 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1343 %b = and <vscale x 8 x i32> %splat, %y
1344 ret <vscale x 8 x i32> %b
1347 define <vscale x 8 x i32> @vandn_vx_swapped_nxv8i32(i32 %x, <vscale x 8 x i32> %y) {
1348 ; CHECK-LABEL: vandn_vx_swapped_nxv8i32:
1350 ; CHECK-NEXT: not a0, a0
1351 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1352 ; CHECK-NEXT: vand.vx v8, v8, a0
1355 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv8i32:
1356 ; CHECK-ZVKB: # %bb.0:
1357 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1358 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1359 ; CHECK-ZVKB-NEXT: ret
1361 %head = insertelement <vscale x 8 x i32> poison, i32 %a, i32 0
1362 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1363 %b = and <vscale x 8 x i32> %splat, %y
1364 ret <vscale x 8 x i32> %b
1367 define <vscale x 16 x i32> @vandn_vv_nxv16i32(<vscale x 16 x i32> %x, <vscale x 16 x i32> %y) {
1368 ; CHECK-LABEL: vandn_vv_nxv16i32:
1370 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1371 ; CHECK-NEXT: vnot.v v8, v8
1372 ; CHECK-NEXT: vand.vv v8, v8, v16
1375 ; CHECK-ZVKB-LABEL: vandn_vv_nxv16i32:
1376 ; CHECK-ZVKB: # %bb.0:
1377 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1378 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
1379 ; CHECK-ZVKB-NEXT: ret
1380 %head = insertelement <vscale x 16 x i32> poison, i32 -1, i32 0
1381 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1382 %a = xor <vscale x 16 x i32> %x, %splat
1383 %b = and <vscale x 16 x i32> %a, %y
1384 ret <vscale x 16 x i32> %b
1387 define <vscale x 16 x i32> @vandn_vv_swapped_nxv16i32(<vscale x 16 x i32> %x, <vscale x 16 x i32> %y) {
1388 ; CHECK-LABEL: vandn_vv_swapped_nxv16i32:
1390 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1391 ; CHECK-NEXT: vnot.v v8, v8
1392 ; CHECK-NEXT: vand.vv v8, v16, v8
1395 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv16i32:
1396 ; CHECK-ZVKB: # %bb.0:
1397 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1398 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
1399 ; CHECK-ZVKB-NEXT: ret
1400 %head = insertelement <vscale x 16 x i32> poison, i32 -1, i32 0
1401 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1402 %a = xor <vscale x 16 x i32> %x, %splat
1403 %b = and <vscale x 16 x i32> %y, %a
1404 ret <vscale x 16 x i32> %b
1407 define <vscale x 16 x i32> @vandn_vx_nxv16i32(i32 %x, <vscale x 16 x i32> %y) {
1408 ; CHECK-LABEL: vandn_vx_nxv16i32:
1410 ; CHECK-NEXT: not a0, a0
1411 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
1412 ; CHECK-NEXT: vand.vx v8, v8, a0
1415 ; CHECK-ZVKB-LABEL: vandn_vx_nxv16i32:
1416 ; CHECK-ZVKB: # %bb.0:
1417 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m8, ta, ma
1418 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1419 ; CHECK-ZVKB-NEXT: ret
1421 %head = insertelement <vscale x 16 x i32> poison, i32 %a, i32 0
1422 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1423 %b = and <vscale x 16 x i32> %splat, %y
1424 ret <vscale x 16 x i32> %b
1427 define <vscale x 16 x i32> @vandn_vx_swapped_nxv16i32(i32 %x, <vscale x 16 x i32> %y) {
1428 ; CHECK-LABEL: vandn_vx_swapped_nxv16i32:
1430 ; CHECK-NEXT: not a0, a0
1431 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
1432 ; CHECK-NEXT: vand.vx v8, v8, a0
1435 ; CHECK-ZVKB-LABEL: vandn_vx_swapped_nxv16i32:
1436 ; CHECK-ZVKB: # %bb.0:
1437 ; CHECK-ZVKB-NEXT: vsetvli a1, zero, e32, m8, ta, ma
1438 ; CHECK-ZVKB-NEXT: vandn.vx v8, v8, a0
1439 ; CHECK-ZVKB-NEXT: ret
1441 %head = insertelement <vscale x 16 x i32> poison, i32 %a, i32 0
1442 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1443 %b = and <vscale x 16 x i32> %splat, %y
1444 ret <vscale x 16 x i32> %b
1447 define <vscale x 1 x i64> @vandn_vv_nxv1i64(<vscale x 1 x i64> %x, <vscale x 1 x i64> %y) {
1448 ; CHECK-LABEL: vandn_vv_nxv1i64:
1450 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1451 ; CHECK-NEXT: vnot.v v8, v8
1452 ; CHECK-NEXT: vand.vv v8, v8, v9
1455 ; CHECK-ZVKB-LABEL: vandn_vv_nxv1i64:
1456 ; CHECK-ZVKB: # %bb.0:
1457 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1458 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
1459 ; CHECK-ZVKB-NEXT: ret
1460 %head = insertelement <vscale x 1 x i64> poison, i64 -1, i32 0
1461 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1462 %a = xor <vscale x 1 x i64> %x, %splat
1463 %b = and <vscale x 1 x i64> %a, %y
1464 ret <vscale x 1 x i64> %b
1467 define <vscale x 1 x i64> @vandn_vv_swapped_nxv1i64(<vscale x 1 x i64> %x, <vscale x 1 x i64> %y) {
1468 ; CHECK-LABEL: vandn_vv_swapped_nxv1i64:
1470 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1471 ; CHECK-NEXT: vnot.v v8, v8
1472 ; CHECK-NEXT: vand.vv v8, v9, v8
1475 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv1i64:
1476 ; CHECK-ZVKB: # %bb.0:
1477 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1478 ; CHECK-ZVKB-NEXT: vandn.vv v8, v9, v8
1479 ; CHECK-ZVKB-NEXT: ret
1480 %head = insertelement <vscale x 1 x i64> poison, i64 -1, i32 0
1481 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1482 %a = xor <vscale x 1 x i64> %x, %splat
1483 %b = and <vscale x 1 x i64> %y, %a
1484 ret <vscale x 1 x i64> %b
1487 define <vscale x 1 x i64> @vandn_vx_nxv1i64(i64 %x, <vscale x 1 x i64> %y) {
1488 ; CHECK-RV32-LABEL: vandn_vx_nxv1i64:
1489 ; CHECK-RV32: # %bb.0:
1490 ; CHECK-RV32-NEXT: addi sp, sp, -16
1491 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1492 ; CHECK-RV32-NEXT: not a0, a0
1493 ; CHECK-RV32-NEXT: not a1, a1
1494 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1495 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1496 ; CHECK-RV32-NEXT: addi a0, sp, 8
1497 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1498 ; CHECK-RV32-NEXT: vlse64.v v9, (a0), zero
1499 ; CHECK-RV32-NEXT: vand.vv v8, v9, v8
1500 ; CHECK-RV32-NEXT: addi sp, sp, 16
1501 ; CHECK-RV32-NEXT: ret
1503 ; CHECK-RV64-LABEL: vandn_vx_nxv1i64:
1504 ; CHECK-RV64: # %bb.0:
1505 ; CHECK-RV64-NEXT: not a0, a0
1506 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1507 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1508 ; CHECK-RV64-NEXT: ret
1510 ; CHECK-ZVKB32-LABEL: vandn_vx_nxv1i64:
1511 ; CHECK-ZVKB32: # %bb.0:
1512 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1513 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1514 ; CHECK-ZVKB32-NEXT: not a0, a0
1515 ; CHECK-ZVKB32-NEXT: not a1, a1
1516 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1517 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1518 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1519 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1520 ; CHECK-ZVKB32-NEXT: vlse64.v v9, (a0), zero
1521 ; CHECK-ZVKB32-NEXT: vand.vv v8, v9, v8
1522 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1523 ; CHECK-ZVKB32-NEXT: ret
1525 ; CHECK-ZVKB64-LABEL: vandn_vx_nxv1i64:
1526 ; CHECK-ZVKB64: # %bb.0:
1527 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1528 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1529 ; CHECK-ZVKB64-NEXT: ret
1531 %head = insertelement <vscale x 1 x i64> poison, i64 %a, i32 0
1532 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1533 %b = and <vscale x 1 x i64> %splat, %y
1534 ret <vscale x 1 x i64> %b
1537 define <vscale x 1 x i64> @vandn_vx_swapped_nxv1i64(i64 %x, <vscale x 1 x i64> %y) {
1538 ; CHECK-RV32-LABEL: vandn_vx_swapped_nxv1i64:
1539 ; CHECK-RV32: # %bb.0:
1540 ; CHECK-RV32-NEXT: addi sp, sp, -16
1541 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1542 ; CHECK-RV32-NEXT: not a0, a0
1543 ; CHECK-RV32-NEXT: not a1, a1
1544 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1545 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1546 ; CHECK-RV32-NEXT: addi a0, sp, 8
1547 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1548 ; CHECK-RV32-NEXT: vlse64.v v9, (a0), zero
1549 ; CHECK-RV32-NEXT: vand.vv v8, v9, v8
1550 ; CHECK-RV32-NEXT: addi sp, sp, 16
1551 ; CHECK-RV32-NEXT: ret
1553 ; CHECK-RV64-LABEL: vandn_vx_swapped_nxv1i64:
1554 ; CHECK-RV64: # %bb.0:
1555 ; CHECK-RV64-NEXT: not a0, a0
1556 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1557 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1558 ; CHECK-RV64-NEXT: ret
1560 ; CHECK-ZVKB32-LABEL: vandn_vx_swapped_nxv1i64:
1561 ; CHECK-ZVKB32: # %bb.0:
1562 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1563 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1564 ; CHECK-ZVKB32-NEXT: not a0, a0
1565 ; CHECK-ZVKB32-NEXT: not a1, a1
1566 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1567 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1568 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1569 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1570 ; CHECK-ZVKB32-NEXT: vlse64.v v9, (a0), zero
1571 ; CHECK-ZVKB32-NEXT: vand.vv v8, v9, v8
1572 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1573 ; CHECK-ZVKB32-NEXT: ret
1575 ; CHECK-ZVKB64-LABEL: vandn_vx_swapped_nxv1i64:
1576 ; CHECK-ZVKB64: # %bb.0:
1577 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1578 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1579 ; CHECK-ZVKB64-NEXT: ret
1581 %head = insertelement <vscale x 1 x i64> poison, i64 %a, i32 0
1582 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1583 %b = and <vscale x 1 x i64> %splat, %y
1584 ret <vscale x 1 x i64> %b
1587 define <vscale x 2 x i64> @vandn_vv_nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y) {
1588 ; CHECK-LABEL: vandn_vv_nxv2i64:
1590 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1591 ; CHECK-NEXT: vnot.v v8, v8
1592 ; CHECK-NEXT: vand.vv v8, v8, v10
1595 ; CHECK-ZVKB-LABEL: vandn_vv_nxv2i64:
1596 ; CHECK-ZVKB: # %bb.0:
1597 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1598 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
1599 ; CHECK-ZVKB-NEXT: ret
1600 %head = insertelement <vscale x 2 x i64> poison, i64 -1, i32 0
1601 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1602 %a = xor <vscale x 2 x i64> %x, %splat
1603 %b = and <vscale x 2 x i64> %a, %y
1604 ret <vscale x 2 x i64> %b
1607 define <vscale x 2 x i64> @vandn_vv_swapped_nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y) {
1608 ; CHECK-LABEL: vandn_vv_swapped_nxv2i64:
1610 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1611 ; CHECK-NEXT: vnot.v v8, v8
1612 ; CHECK-NEXT: vand.vv v8, v10, v8
1615 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv2i64:
1616 ; CHECK-ZVKB: # %bb.0:
1617 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1618 ; CHECK-ZVKB-NEXT: vandn.vv v8, v10, v8
1619 ; CHECK-ZVKB-NEXT: ret
1620 %head = insertelement <vscale x 2 x i64> poison, i64 -1, i32 0
1621 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1622 %a = xor <vscale x 2 x i64> %x, %splat
1623 %b = and <vscale x 2 x i64> %y, %a
1624 ret <vscale x 2 x i64> %b
1627 define <vscale x 2 x i64> @vandn_vx_nxv2i64(i64 %x, <vscale x 2 x i64> %y) {
1628 ; CHECK-RV32-LABEL: vandn_vx_nxv2i64:
1629 ; CHECK-RV32: # %bb.0:
1630 ; CHECK-RV32-NEXT: addi sp, sp, -16
1631 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1632 ; CHECK-RV32-NEXT: not a0, a0
1633 ; CHECK-RV32-NEXT: not a1, a1
1634 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1635 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1636 ; CHECK-RV32-NEXT: addi a0, sp, 8
1637 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1638 ; CHECK-RV32-NEXT: vlse64.v v10, (a0), zero
1639 ; CHECK-RV32-NEXT: vand.vv v8, v10, v8
1640 ; CHECK-RV32-NEXT: addi sp, sp, 16
1641 ; CHECK-RV32-NEXT: ret
1643 ; CHECK-RV64-LABEL: vandn_vx_nxv2i64:
1644 ; CHECK-RV64: # %bb.0:
1645 ; CHECK-RV64-NEXT: not a0, a0
1646 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1647 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1648 ; CHECK-RV64-NEXT: ret
1650 ; CHECK-ZVKB32-LABEL: vandn_vx_nxv2i64:
1651 ; CHECK-ZVKB32: # %bb.0:
1652 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1653 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1654 ; CHECK-ZVKB32-NEXT: not a0, a0
1655 ; CHECK-ZVKB32-NEXT: not a1, a1
1656 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1657 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1658 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1659 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1660 ; CHECK-ZVKB32-NEXT: vlse64.v v10, (a0), zero
1661 ; CHECK-ZVKB32-NEXT: vand.vv v8, v10, v8
1662 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1663 ; CHECK-ZVKB32-NEXT: ret
1665 ; CHECK-ZVKB64-LABEL: vandn_vx_nxv2i64:
1666 ; CHECK-ZVKB64: # %bb.0:
1667 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1668 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1669 ; CHECK-ZVKB64-NEXT: ret
1671 %head = insertelement <vscale x 2 x i64> poison, i64 %a, i32 0
1672 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1673 %b = and <vscale x 2 x i64> %splat, %y
1674 ret <vscale x 2 x i64> %b
1677 define <vscale x 2 x i64> @vandn_vx_swapped_nxv2i64(i64 %x, <vscale x 2 x i64> %y) {
1678 ; CHECK-RV32-LABEL: vandn_vx_swapped_nxv2i64:
1679 ; CHECK-RV32: # %bb.0:
1680 ; CHECK-RV32-NEXT: addi sp, sp, -16
1681 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1682 ; CHECK-RV32-NEXT: not a0, a0
1683 ; CHECK-RV32-NEXT: not a1, a1
1684 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1685 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1686 ; CHECK-RV32-NEXT: addi a0, sp, 8
1687 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1688 ; CHECK-RV32-NEXT: vlse64.v v10, (a0), zero
1689 ; CHECK-RV32-NEXT: vand.vv v8, v10, v8
1690 ; CHECK-RV32-NEXT: addi sp, sp, 16
1691 ; CHECK-RV32-NEXT: ret
1693 ; CHECK-RV64-LABEL: vandn_vx_swapped_nxv2i64:
1694 ; CHECK-RV64: # %bb.0:
1695 ; CHECK-RV64-NEXT: not a0, a0
1696 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1697 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1698 ; CHECK-RV64-NEXT: ret
1700 ; CHECK-ZVKB32-LABEL: vandn_vx_swapped_nxv2i64:
1701 ; CHECK-ZVKB32: # %bb.0:
1702 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1703 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1704 ; CHECK-ZVKB32-NEXT: not a0, a0
1705 ; CHECK-ZVKB32-NEXT: not a1, a1
1706 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1707 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1708 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1709 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1710 ; CHECK-ZVKB32-NEXT: vlse64.v v10, (a0), zero
1711 ; CHECK-ZVKB32-NEXT: vand.vv v8, v10, v8
1712 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1713 ; CHECK-ZVKB32-NEXT: ret
1715 ; CHECK-ZVKB64-LABEL: vandn_vx_swapped_nxv2i64:
1716 ; CHECK-ZVKB64: # %bb.0:
1717 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1718 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1719 ; CHECK-ZVKB64-NEXT: ret
1721 %head = insertelement <vscale x 2 x i64> poison, i64 %a, i32 0
1722 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1723 %b = and <vscale x 2 x i64> %splat, %y
1724 ret <vscale x 2 x i64> %b
1727 define <vscale x 4 x i64> @vandn_vv_nxv4i64(<vscale x 4 x i64> %x, <vscale x 4 x i64> %y) {
1728 ; CHECK-LABEL: vandn_vv_nxv4i64:
1730 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1731 ; CHECK-NEXT: vnot.v v8, v8
1732 ; CHECK-NEXT: vand.vv v8, v8, v12
1735 ; CHECK-ZVKB-LABEL: vandn_vv_nxv4i64:
1736 ; CHECK-ZVKB: # %bb.0:
1737 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1738 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
1739 ; CHECK-ZVKB-NEXT: ret
1740 %head = insertelement <vscale x 4 x i64> poison, i64 -1, i32 0
1741 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1742 %a = xor <vscale x 4 x i64> %x, %splat
1743 %b = and <vscale x 4 x i64> %a, %y
1744 ret <vscale x 4 x i64> %b
1747 define <vscale x 4 x i64> @vandn_vv_swapped_nxv4i64(<vscale x 4 x i64> %x, <vscale x 4 x i64> %y) {
1748 ; CHECK-LABEL: vandn_vv_swapped_nxv4i64:
1750 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1751 ; CHECK-NEXT: vnot.v v8, v8
1752 ; CHECK-NEXT: vand.vv v8, v12, v8
1755 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv4i64:
1756 ; CHECK-ZVKB: # %bb.0:
1757 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1758 ; CHECK-ZVKB-NEXT: vandn.vv v8, v12, v8
1759 ; CHECK-ZVKB-NEXT: ret
1760 %head = insertelement <vscale x 4 x i64> poison, i64 -1, i32 0
1761 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1762 %a = xor <vscale x 4 x i64> %x, %splat
1763 %b = and <vscale x 4 x i64> %y, %a
1764 ret <vscale x 4 x i64> %b
1767 define <vscale x 4 x i64> @vandn_vx_nxv4i64(i64 %x, <vscale x 4 x i64> %y) {
1768 ; CHECK-RV32-LABEL: vandn_vx_nxv4i64:
1769 ; CHECK-RV32: # %bb.0:
1770 ; CHECK-RV32-NEXT: addi sp, sp, -16
1771 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1772 ; CHECK-RV32-NEXT: not a0, a0
1773 ; CHECK-RV32-NEXT: not a1, a1
1774 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1775 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1776 ; CHECK-RV32-NEXT: addi a0, sp, 8
1777 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1778 ; CHECK-RV32-NEXT: vlse64.v v12, (a0), zero
1779 ; CHECK-RV32-NEXT: vand.vv v8, v12, v8
1780 ; CHECK-RV32-NEXT: addi sp, sp, 16
1781 ; CHECK-RV32-NEXT: ret
1783 ; CHECK-RV64-LABEL: vandn_vx_nxv4i64:
1784 ; CHECK-RV64: # %bb.0:
1785 ; CHECK-RV64-NEXT: not a0, a0
1786 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1787 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1788 ; CHECK-RV64-NEXT: ret
1790 ; CHECK-ZVKB32-LABEL: vandn_vx_nxv4i64:
1791 ; CHECK-ZVKB32: # %bb.0:
1792 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1793 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1794 ; CHECK-ZVKB32-NEXT: not a0, a0
1795 ; CHECK-ZVKB32-NEXT: not a1, a1
1796 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1797 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1798 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1799 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1800 ; CHECK-ZVKB32-NEXT: vlse64.v v12, (a0), zero
1801 ; CHECK-ZVKB32-NEXT: vand.vv v8, v12, v8
1802 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1803 ; CHECK-ZVKB32-NEXT: ret
1805 ; CHECK-ZVKB64-LABEL: vandn_vx_nxv4i64:
1806 ; CHECK-ZVKB64: # %bb.0:
1807 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1808 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1809 ; CHECK-ZVKB64-NEXT: ret
1811 %head = insertelement <vscale x 4 x i64> poison, i64 %a, i32 0
1812 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1813 %b = and <vscale x 4 x i64> %splat, %y
1814 ret <vscale x 4 x i64> %b
1817 define <vscale x 4 x i64> @vandn_vx_swapped_nxv4i64(i64 %x, <vscale x 4 x i64> %y) {
1818 ; CHECK-RV32-LABEL: vandn_vx_swapped_nxv4i64:
1819 ; CHECK-RV32: # %bb.0:
1820 ; CHECK-RV32-NEXT: addi sp, sp, -16
1821 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1822 ; CHECK-RV32-NEXT: not a0, a0
1823 ; CHECK-RV32-NEXT: not a1, a1
1824 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1825 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1826 ; CHECK-RV32-NEXT: addi a0, sp, 8
1827 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1828 ; CHECK-RV32-NEXT: vlse64.v v12, (a0), zero
1829 ; CHECK-RV32-NEXT: vand.vv v8, v12, v8
1830 ; CHECK-RV32-NEXT: addi sp, sp, 16
1831 ; CHECK-RV32-NEXT: ret
1833 ; CHECK-RV64-LABEL: vandn_vx_swapped_nxv4i64:
1834 ; CHECK-RV64: # %bb.0:
1835 ; CHECK-RV64-NEXT: not a0, a0
1836 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1837 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1838 ; CHECK-RV64-NEXT: ret
1840 ; CHECK-ZVKB32-LABEL: vandn_vx_swapped_nxv4i64:
1841 ; CHECK-ZVKB32: # %bb.0:
1842 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1843 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1844 ; CHECK-ZVKB32-NEXT: not a0, a0
1845 ; CHECK-ZVKB32-NEXT: not a1, a1
1846 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1847 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1848 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1849 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1850 ; CHECK-ZVKB32-NEXT: vlse64.v v12, (a0), zero
1851 ; CHECK-ZVKB32-NEXT: vand.vv v8, v12, v8
1852 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1853 ; CHECK-ZVKB32-NEXT: ret
1855 ; CHECK-ZVKB64-LABEL: vandn_vx_swapped_nxv4i64:
1856 ; CHECK-ZVKB64: # %bb.0:
1857 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1858 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1859 ; CHECK-ZVKB64-NEXT: ret
1861 %head = insertelement <vscale x 4 x i64> poison, i64 %a, i32 0
1862 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1863 %b = and <vscale x 4 x i64> %splat, %y
1864 ret <vscale x 4 x i64> %b
1867 define <vscale x 8 x i64> @vandn_vv_nxv8i64(<vscale x 8 x i64> %x, <vscale x 8 x i64> %y) {
1868 ; CHECK-LABEL: vandn_vv_nxv8i64:
1870 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1871 ; CHECK-NEXT: vnot.v v8, v8
1872 ; CHECK-NEXT: vand.vv v8, v8, v16
1875 ; CHECK-ZVKB-LABEL: vandn_vv_nxv8i64:
1876 ; CHECK-ZVKB: # %bb.0:
1877 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1878 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
1879 ; CHECK-ZVKB-NEXT: ret
1880 %head = insertelement <vscale x 8 x i64> poison, i64 -1, i32 0
1881 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1882 %a = xor <vscale x 8 x i64> %x, %splat
1883 %b = and <vscale x 8 x i64> %a, %y
1884 ret <vscale x 8 x i64> %b
1887 define <vscale x 8 x i64> @vandn_vv_swapped_nxv8i64(<vscale x 8 x i64> %x, <vscale x 8 x i64> %y) {
1888 ; CHECK-LABEL: vandn_vv_swapped_nxv8i64:
1890 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1891 ; CHECK-NEXT: vnot.v v8, v8
1892 ; CHECK-NEXT: vand.vv v8, v16, v8
1895 ; CHECK-ZVKB-LABEL: vandn_vv_swapped_nxv8i64:
1896 ; CHECK-ZVKB: # %bb.0:
1897 ; CHECK-ZVKB-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1898 ; CHECK-ZVKB-NEXT: vandn.vv v8, v16, v8
1899 ; CHECK-ZVKB-NEXT: ret
1900 %head = insertelement <vscale x 8 x i64> poison, i64 -1, i32 0
1901 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1902 %a = xor <vscale x 8 x i64> %x, %splat
1903 %b = and <vscale x 8 x i64> %y, %a
1904 ret <vscale x 8 x i64> %b
1907 define <vscale x 8 x i64> @vandn_vx_nxv8i64(i64 %x, <vscale x 8 x i64> %y) {
1908 ; CHECK-RV32-LABEL: vandn_vx_nxv8i64:
1909 ; CHECK-RV32: # %bb.0:
1910 ; CHECK-RV32-NEXT: addi sp, sp, -16
1911 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1912 ; CHECK-RV32-NEXT: not a0, a0
1913 ; CHECK-RV32-NEXT: not a1, a1
1914 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1915 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1916 ; CHECK-RV32-NEXT: addi a0, sp, 8
1917 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1918 ; CHECK-RV32-NEXT: vlse64.v v16, (a0), zero
1919 ; CHECK-RV32-NEXT: vand.vv v8, v16, v8
1920 ; CHECK-RV32-NEXT: addi sp, sp, 16
1921 ; CHECK-RV32-NEXT: ret
1923 ; CHECK-RV64-LABEL: vandn_vx_nxv8i64:
1924 ; CHECK-RV64: # %bb.0:
1925 ; CHECK-RV64-NEXT: not a0, a0
1926 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1927 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1928 ; CHECK-RV64-NEXT: ret
1930 ; CHECK-ZVKB32-LABEL: vandn_vx_nxv8i64:
1931 ; CHECK-ZVKB32: # %bb.0:
1932 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1933 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1934 ; CHECK-ZVKB32-NEXT: not a0, a0
1935 ; CHECK-ZVKB32-NEXT: not a1, a1
1936 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1937 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1938 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1939 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1940 ; CHECK-ZVKB32-NEXT: vlse64.v v16, (a0), zero
1941 ; CHECK-ZVKB32-NEXT: vand.vv v8, v16, v8
1942 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1943 ; CHECK-ZVKB32-NEXT: ret
1945 ; CHECK-ZVKB64-LABEL: vandn_vx_nxv8i64:
1946 ; CHECK-ZVKB64: # %bb.0:
1947 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1948 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1949 ; CHECK-ZVKB64-NEXT: ret
1951 %head = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
1952 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1953 %b = and <vscale x 8 x i64> %splat, %y
1954 ret <vscale x 8 x i64> %b
1957 define <vscale x 8 x i64> @vandn_vx_swapped_nxv8i64(i64 %x, <vscale x 8 x i64> %y) {
1958 ; CHECK-RV32-LABEL: vandn_vx_swapped_nxv8i64:
1959 ; CHECK-RV32: # %bb.0:
1960 ; CHECK-RV32-NEXT: addi sp, sp, -16
1961 ; CHECK-RV32-NEXT: .cfi_def_cfa_offset 16
1962 ; CHECK-RV32-NEXT: not a0, a0
1963 ; CHECK-RV32-NEXT: not a1, a1
1964 ; CHECK-RV32-NEXT: sw a1, 12(sp)
1965 ; CHECK-RV32-NEXT: sw a0, 8(sp)
1966 ; CHECK-RV32-NEXT: addi a0, sp, 8
1967 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1968 ; CHECK-RV32-NEXT: vlse64.v v16, (a0), zero
1969 ; CHECK-RV32-NEXT: vand.vv v8, v16, v8
1970 ; CHECK-RV32-NEXT: addi sp, sp, 16
1971 ; CHECK-RV32-NEXT: ret
1973 ; CHECK-RV64-LABEL: vandn_vx_swapped_nxv8i64:
1974 ; CHECK-RV64: # %bb.0:
1975 ; CHECK-RV64-NEXT: not a0, a0
1976 ; CHECK-RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1977 ; CHECK-RV64-NEXT: vand.vx v8, v8, a0
1978 ; CHECK-RV64-NEXT: ret
1980 ; CHECK-ZVKB32-LABEL: vandn_vx_swapped_nxv8i64:
1981 ; CHECK-ZVKB32: # %bb.0:
1982 ; CHECK-ZVKB32-NEXT: addi sp, sp, -16
1983 ; CHECK-ZVKB32-NEXT: .cfi_def_cfa_offset 16
1984 ; CHECK-ZVKB32-NEXT: not a0, a0
1985 ; CHECK-ZVKB32-NEXT: not a1, a1
1986 ; CHECK-ZVKB32-NEXT: sw a1, 12(sp)
1987 ; CHECK-ZVKB32-NEXT: sw a0, 8(sp)
1988 ; CHECK-ZVKB32-NEXT: addi a0, sp, 8
1989 ; CHECK-ZVKB32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1990 ; CHECK-ZVKB32-NEXT: vlse64.v v16, (a0), zero
1991 ; CHECK-ZVKB32-NEXT: vand.vv v8, v16, v8
1992 ; CHECK-ZVKB32-NEXT: addi sp, sp, 16
1993 ; CHECK-ZVKB32-NEXT: ret
1995 ; CHECK-ZVKB64-LABEL: vandn_vx_swapped_nxv8i64:
1996 ; CHECK-ZVKB64: # %bb.0:
1997 ; CHECK-ZVKB64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1998 ; CHECK-ZVKB64-NEXT: vandn.vx v8, v8, a0
1999 ; CHECK-ZVKB64-NEXT: ret
2001 %head = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
2002 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2003 %b = and <vscale x 8 x i64> %splat, %y
2004 ret <vscale x 8 x i64> %b