1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV32
3 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64
5 define <vscale x 1 x i8> @vxor_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb) {
6 ; CHECK-LABEL: vxor_vv_nxv1i8:
8 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
9 ; CHECK-NEXT: vxor.vv v8, v8, v9
11 %vc = xor <vscale x 1 x i8> %va, %vb
12 ret <vscale x 1 x i8> %vc
15 define <vscale x 1 x i8> @vxor_vx_nxv1i8(<vscale x 1 x i8> %va, i8 signext %b) {
16 ; CHECK-LABEL: vxor_vx_nxv1i8:
18 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
19 ; CHECK-NEXT: vxor.vx v8, v8, a0
21 %head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
22 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
23 %vc = xor <vscale x 1 x i8> %va, %splat
24 ret <vscale x 1 x i8> %vc
27 define <vscale x 1 x i8> @vxor_vi_nxv1i8_0(<vscale x 1 x i8> %va) {
28 ; CHECK-LABEL: vxor_vi_nxv1i8_0:
30 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
31 ; CHECK-NEXT: vnot.v v8, v8
33 %head = insertelement <vscale x 1 x i8> poison, i8 -1, i32 0
34 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
35 %vc = xor <vscale x 1 x i8> %va, %splat
36 ret <vscale x 1 x i8> %vc
39 define <vscale x 1 x i8> @vxor_vi_nxv1i8_1(<vscale x 1 x i8> %va) {
40 ; CHECK-LABEL: vxor_vi_nxv1i8_1:
42 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
43 ; CHECK-NEXT: vxor.vi v8, v8, 8
45 %head = insertelement <vscale x 1 x i8> poison, i8 8, i32 0
46 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
47 %vc = xor <vscale x 1 x i8> %va, %splat
48 ret <vscale x 1 x i8> %vc
51 define <vscale x 1 x i8> @vxor_vi_nxv1i8_2(<vscale x 1 x i8> %va) {
52 ; CHECK-LABEL: vxor_vi_nxv1i8_2:
54 ; CHECK-NEXT: li a0, 16
55 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
56 ; CHECK-NEXT: vxor.vx v8, v8, a0
58 %head = insertelement <vscale x 1 x i8> poison, i8 16, i32 0
59 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
60 %vc = xor <vscale x 1 x i8> %va, %splat
61 ret <vscale x 1 x i8> %vc
64 define <vscale x 2 x i8> @vxor_vv_nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb) {
65 ; CHECK-LABEL: vxor_vv_nxv2i8:
67 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
68 ; CHECK-NEXT: vxor.vv v8, v8, v9
70 %vc = xor <vscale x 2 x i8> %va, %vb
71 ret <vscale x 2 x i8> %vc
74 define <vscale x 2 x i8> @vxor_vx_nxv2i8(<vscale x 2 x i8> %va, i8 signext %b) {
75 ; CHECK-LABEL: vxor_vx_nxv2i8:
77 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
78 ; CHECK-NEXT: vxor.vx v8, v8, a0
80 %head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
81 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
82 %vc = xor <vscale x 2 x i8> %va, %splat
83 ret <vscale x 2 x i8> %vc
86 define <vscale x 2 x i8> @vxor_vi_nxv2i8_0(<vscale x 2 x i8> %va) {
87 ; CHECK-LABEL: vxor_vi_nxv2i8_0:
89 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
90 ; CHECK-NEXT: vnot.v v8, v8
92 %head = insertelement <vscale x 2 x i8> poison, i8 -1, i32 0
93 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
94 %vc = xor <vscale x 2 x i8> %va, %splat
95 ret <vscale x 2 x i8> %vc
98 define <vscale x 2 x i8> @vxor_vi_nxv2i8_1(<vscale x 2 x i8> %va) {
99 ; CHECK-LABEL: vxor_vi_nxv2i8_1:
101 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
102 ; CHECK-NEXT: vxor.vi v8, v8, 8
104 %head = insertelement <vscale x 2 x i8> poison, i8 8, i32 0
105 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
106 %vc = xor <vscale x 2 x i8> %va, %splat
107 ret <vscale x 2 x i8> %vc
110 define <vscale x 2 x i8> @vxor_vi_nxv2i8_2(<vscale x 2 x i8> %va) {
111 ; CHECK-LABEL: vxor_vi_nxv2i8_2:
113 ; CHECK-NEXT: li a0, 16
114 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
115 ; CHECK-NEXT: vxor.vx v8, v8, a0
117 %head = insertelement <vscale x 2 x i8> poison, i8 16, i32 0
118 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
119 %vc = xor <vscale x 2 x i8> %va, %splat
120 ret <vscale x 2 x i8> %vc
123 define <vscale x 4 x i8> @vxor_vv_nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb) {
124 ; CHECK-LABEL: vxor_vv_nxv4i8:
126 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
127 ; CHECK-NEXT: vxor.vv v8, v8, v9
129 %vc = xor <vscale x 4 x i8> %va, %vb
130 ret <vscale x 4 x i8> %vc
133 define <vscale x 4 x i8> @vxor_vx_nxv4i8(<vscale x 4 x i8> %va, i8 signext %b) {
134 ; CHECK-LABEL: vxor_vx_nxv4i8:
136 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
137 ; CHECK-NEXT: vxor.vx v8, v8, a0
139 %head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
140 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
141 %vc = xor <vscale x 4 x i8> %va, %splat
142 ret <vscale x 4 x i8> %vc
145 define <vscale x 4 x i8> @vxor_vi_nxv4i8_0(<vscale x 4 x i8> %va) {
146 ; CHECK-LABEL: vxor_vi_nxv4i8_0:
148 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
149 ; CHECK-NEXT: vnot.v v8, v8
151 %head = insertelement <vscale x 4 x i8> poison, i8 -1, i32 0
152 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
153 %vc = xor <vscale x 4 x i8> %va, %splat
154 ret <vscale x 4 x i8> %vc
157 define <vscale x 4 x i8> @vxor_vi_nxv4i8_1(<vscale x 4 x i8> %va) {
158 ; CHECK-LABEL: vxor_vi_nxv4i8_1:
160 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
161 ; CHECK-NEXT: vxor.vi v8, v8, 8
163 %head = insertelement <vscale x 4 x i8> poison, i8 8, i32 0
164 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
165 %vc = xor <vscale x 4 x i8> %va, %splat
166 ret <vscale x 4 x i8> %vc
169 define <vscale x 4 x i8> @vxor_vi_nxv4i8_2(<vscale x 4 x i8> %va) {
170 ; CHECK-LABEL: vxor_vi_nxv4i8_2:
172 ; CHECK-NEXT: li a0, 16
173 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
174 ; CHECK-NEXT: vxor.vx v8, v8, a0
176 %head = insertelement <vscale x 4 x i8> poison, i8 16, i32 0
177 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
178 %vc = xor <vscale x 4 x i8> %va, %splat
179 ret <vscale x 4 x i8> %vc
182 define <vscale x 8 x i8> @vxor_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
183 ; CHECK-LABEL: vxor_vv_nxv8i8:
185 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
186 ; CHECK-NEXT: vxor.vv v8, v8, v9
188 %vc = xor <vscale x 8 x i8> %va, %vb
189 ret <vscale x 8 x i8> %vc
192 define <vscale x 8 x i8> @vxor_vx_nxv8i8(<vscale x 8 x i8> %va, i8 signext %b) {
193 ; CHECK-LABEL: vxor_vx_nxv8i8:
195 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
196 ; CHECK-NEXT: vxor.vx v8, v8, a0
198 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
199 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
200 %vc = xor <vscale x 8 x i8> %va, %splat
201 ret <vscale x 8 x i8> %vc
204 define <vscale x 8 x i8> @vxor_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
205 ; CHECK-LABEL: vxor_vi_nxv8i8_0:
207 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
208 ; CHECK-NEXT: vnot.v v8, v8
210 %head = insertelement <vscale x 8 x i8> poison, i8 -1, i32 0
211 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
212 %vc = xor <vscale x 8 x i8> %va, %splat
213 ret <vscale x 8 x i8> %vc
216 define <vscale x 8 x i8> @vxor_vi_nxv8i8_1(<vscale x 8 x i8> %va) {
217 ; CHECK-LABEL: vxor_vi_nxv8i8_1:
219 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
220 ; CHECK-NEXT: vxor.vi v8, v8, 8
222 %head = insertelement <vscale x 8 x i8> poison, i8 8, i32 0
223 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
224 %vc = xor <vscale x 8 x i8> %va, %splat
225 ret <vscale x 8 x i8> %vc
228 define <vscale x 8 x i8> @vxor_vi_nxv8i8_2(<vscale x 8 x i8> %va) {
229 ; CHECK-LABEL: vxor_vi_nxv8i8_2:
231 ; CHECK-NEXT: li a0, 16
232 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
233 ; CHECK-NEXT: vxor.vx v8, v8, a0
235 %head = insertelement <vscale x 8 x i8> poison, i8 16, i32 0
236 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
237 %vc = xor <vscale x 8 x i8> %va, %splat
238 ret <vscale x 8 x i8> %vc
241 define <vscale x 16 x i8> @vxor_vv_nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb) {
242 ; CHECK-LABEL: vxor_vv_nxv16i8:
244 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
245 ; CHECK-NEXT: vxor.vv v8, v8, v10
247 %vc = xor <vscale x 16 x i8> %va, %vb
248 ret <vscale x 16 x i8> %vc
251 define <vscale x 16 x i8> @vxor_vx_nxv16i8(<vscale x 16 x i8> %va, i8 signext %b) {
252 ; CHECK-LABEL: vxor_vx_nxv16i8:
254 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
255 ; CHECK-NEXT: vxor.vx v8, v8, a0
257 %head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
258 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
259 %vc = xor <vscale x 16 x i8> %va, %splat
260 ret <vscale x 16 x i8> %vc
263 define <vscale x 16 x i8> @vxor_vi_nxv16i8_0(<vscale x 16 x i8> %va) {
264 ; CHECK-LABEL: vxor_vi_nxv16i8_0:
266 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
267 ; CHECK-NEXT: vnot.v v8, v8
269 %head = insertelement <vscale x 16 x i8> poison, i8 -1, i32 0
270 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
271 %vc = xor <vscale x 16 x i8> %va, %splat
272 ret <vscale x 16 x i8> %vc
275 define <vscale x 16 x i8> @vxor_vi_nxv16i8_1(<vscale x 16 x i8> %va) {
276 ; CHECK-LABEL: vxor_vi_nxv16i8_1:
278 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
279 ; CHECK-NEXT: vxor.vi v8, v8, 8
281 %head = insertelement <vscale x 16 x i8> poison, i8 8, i32 0
282 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
283 %vc = xor <vscale x 16 x i8> %va, %splat
284 ret <vscale x 16 x i8> %vc
287 define <vscale x 16 x i8> @vxor_vi_nxv16i8_2(<vscale x 16 x i8> %va) {
288 ; CHECK-LABEL: vxor_vi_nxv16i8_2:
290 ; CHECK-NEXT: li a0, 16
291 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
292 ; CHECK-NEXT: vxor.vx v8, v8, a0
294 %head = insertelement <vscale x 16 x i8> poison, i8 16, i32 0
295 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
296 %vc = xor <vscale x 16 x i8> %va, %splat
297 ret <vscale x 16 x i8> %vc
300 define <vscale x 32 x i8> @vxor_vv_nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb) {
301 ; CHECK-LABEL: vxor_vv_nxv32i8:
303 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
304 ; CHECK-NEXT: vxor.vv v8, v8, v12
306 %vc = xor <vscale x 32 x i8> %va, %vb
307 ret <vscale x 32 x i8> %vc
310 define <vscale x 32 x i8> @vxor_vx_nxv32i8(<vscale x 32 x i8> %va, i8 signext %b) {
311 ; CHECK-LABEL: vxor_vx_nxv32i8:
313 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
314 ; CHECK-NEXT: vxor.vx v8, v8, a0
316 %head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
317 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
318 %vc = xor <vscale x 32 x i8> %va, %splat
319 ret <vscale x 32 x i8> %vc
322 define <vscale x 32 x i8> @vxor_vi_nxv32i8_0(<vscale x 32 x i8> %va) {
323 ; CHECK-LABEL: vxor_vi_nxv32i8_0:
325 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
326 ; CHECK-NEXT: vnot.v v8, v8
328 %head = insertelement <vscale x 32 x i8> poison, i8 -1, i32 0
329 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
330 %vc = xor <vscale x 32 x i8> %va, %splat
331 ret <vscale x 32 x i8> %vc
334 define <vscale x 32 x i8> @vxor_vi_nxv32i8_1(<vscale x 32 x i8> %va) {
335 ; CHECK-LABEL: vxor_vi_nxv32i8_1:
337 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
338 ; CHECK-NEXT: vxor.vi v8, v8, 8
340 %head = insertelement <vscale x 32 x i8> poison, i8 8, i32 0
341 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
342 %vc = xor <vscale x 32 x i8> %va, %splat
343 ret <vscale x 32 x i8> %vc
346 define <vscale x 32 x i8> @vxor_vi_nxv32i8_2(<vscale x 32 x i8> %va) {
347 ; CHECK-LABEL: vxor_vi_nxv32i8_2:
349 ; CHECK-NEXT: li a0, 16
350 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
351 ; CHECK-NEXT: vxor.vx v8, v8, a0
353 %head = insertelement <vscale x 32 x i8> poison, i8 16, i32 0
354 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
355 %vc = xor <vscale x 32 x i8> %va, %splat
356 ret <vscale x 32 x i8> %vc
359 define <vscale x 64 x i8> @vxor_vv_nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb) {
360 ; CHECK-LABEL: vxor_vv_nxv64i8:
362 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
363 ; CHECK-NEXT: vxor.vv v8, v8, v16
365 %vc = xor <vscale x 64 x i8> %va, %vb
366 ret <vscale x 64 x i8> %vc
369 define <vscale x 64 x i8> @vxor_vx_nxv64i8(<vscale x 64 x i8> %va, i8 signext %b) {
370 ; CHECK-LABEL: vxor_vx_nxv64i8:
372 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
373 ; CHECK-NEXT: vxor.vx v8, v8, a0
375 %head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
376 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
377 %vc = xor <vscale x 64 x i8> %va, %splat
378 ret <vscale x 64 x i8> %vc
381 define <vscale x 64 x i8> @vxor_vi_nxv64i8_0(<vscale x 64 x i8> %va) {
382 ; CHECK-LABEL: vxor_vi_nxv64i8_0:
384 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
385 ; CHECK-NEXT: vnot.v v8, v8
387 %head = insertelement <vscale x 64 x i8> poison, i8 -1, i32 0
388 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
389 %vc = xor <vscale x 64 x i8> %va, %splat
390 ret <vscale x 64 x i8> %vc
393 define <vscale x 64 x i8> @vxor_vi_nxv64i8_1(<vscale x 64 x i8> %va) {
394 ; CHECK-LABEL: vxor_vi_nxv64i8_1:
396 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
397 ; CHECK-NEXT: vxor.vi v8, v8, 8
399 %head = insertelement <vscale x 64 x i8> poison, i8 8, i32 0
400 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
401 %vc = xor <vscale x 64 x i8> %va, %splat
402 ret <vscale x 64 x i8> %vc
405 define <vscale x 64 x i8> @vxor_vi_nxv64i8_2(<vscale x 64 x i8> %va) {
406 ; CHECK-LABEL: vxor_vi_nxv64i8_2:
408 ; CHECK-NEXT: li a0, 16
409 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
410 ; CHECK-NEXT: vxor.vx v8, v8, a0
412 %head = insertelement <vscale x 64 x i8> poison, i8 16, i32 0
413 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
414 %vc = xor <vscale x 64 x i8> %va, %splat
415 ret <vscale x 64 x i8> %vc
418 define <vscale x 1 x i16> @vxor_vv_nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb) {
419 ; CHECK-LABEL: vxor_vv_nxv1i16:
421 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
422 ; CHECK-NEXT: vxor.vv v8, v8, v9
424 %vc = xor <vscale x 1 x i16> %va, %vb
425 ret <vscale x 1 x i16> %vc
428 define <vscale x 1 x i16> @vxor_vx_nxv1i16(<vscale x 1 x i16> %va, i16 signext %b) {
429 ; CHECK-LABEL: vxor_vx_nxv1i16:
431 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
432 ; CHECK-NEXT: vxor.vx v8, v8, a0
434 %head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
435 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
436 %vc = xor <vscale x 1 x i16> %va, %splat
437 ret <vscale x 1 x i16> %vc
440 define <vscale x 1 x i16> @vxor_vi_nxv1i16_0(<vscale x 1 x i16> %va) {
441 ; CHECK-LABEL: vxor_vi_nxv1i16_0:
443 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
444 ; CHECK-NEXT: vnot.v v8, v8
446 %head = insertelement <vscale x 1 x i16> poison, i16 -1, i32 0
447 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
448 %vc = xor <vscale x 1 x i16> %va, %splat
449 ret <vscale x 1 x i16> %vc
452 define <vscale x 1 x i16> @vxor_vi_nxv1i16_1(<vscale x 1 x i16> %va) {
453 ; CHECK-LABEL: vxor_vi_nxv1i16_1:
455 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
456 ; CHECK-NEXT: vxor.vi v8, v8, 8
458 %head = insertelement <vscale x 1 x i16> poison, i16 8, i32 0
459 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
460 %vc = xor <vscale x 1 x i16> %va, %splat
461 ret <vscale x 1 x i16> %vc
464 define <vscale x 1 x i16> @vxor_vi_nxv1i16_2(<vscale x 1 x i16> %va) {
465 ; CHECK-LABEL: vxor_vi_nxv1i16_2:
467 ; CHECK-NEXT: li a0, 16
468 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
469 ; CHECK-NEXT: vxor.vx v8, v8, a0
471 %head = insertelement <vscale x 1 x i16> poison, i16 16, i32 0
472 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
473 %vc = xor <vscale x 1 x i16> %va, %splat
474 ret <vscale x 1 x i16> %vc
477 define <vscale x 2 x i16> @vxor_vv_nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb) {
478 ; CHECK-LABEL: vxor_vv_nxv2i16:
480 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
481 ; CHECK-NEXT: vxor.vv v8, v8, v9
483 %vc = xor <vscale x 2 x i16> %va, %vb
484 ret <vscale x 2 x i16> %vc
487 define <vscale x 2 x i16> @vxor_vx_nxv2i16(<vscale x 2 x i16> %va, i16 signext %b) {
488 ; CHECK-LABEL: vxor_vx_nxv2i16:
490 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
491 ; CHECK-NEXT: vxor.vx v8, v8, a0
493 %head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
494 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
495 %vc = xor <vscale x 2 x i16> %va, %splat
496 ret <vscale x 2 x i16> %vc
499 define <vscale x 2 x i16> @vxor_vi_nxv2i16_0(<vscale x 2 x i16> %va) {
500 ; CHECK-LABEL: vxor_vi_nxv2i16_0:
502 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
503 ; CHECK-NEXT: vnot.v v8, v8
505 %head = insertelement <vscale x 2 x i16> poison, i16 -1, i32 0
506 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
507 %vc = xor <vscale x 2 x i16> %va, %splat
508 ret <vscale x 2 x i16> %vc
511 define <vscale x 2 x i16> @vxor_vi_nxv2i16_1(<vscale x 2 x i16> %va) {
512 ; CHECK-LABEL: vxor_vi_nxv2i16_1:
514 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
515 ; CHECK-NEXT: vxor.vi v8, v8, 8
517 %head = insertelement <vscale x 2 x i16> poison, i16 8, i32 0
518 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
519 %vc = xor <vscale x 2 x i16> %va, %splat
520 ret <vscale x 2 x i16> %vc
523 define <vscale x 2 x i16> @vxor_vi_nxv2i16_2(<vscale x 2 x i16> %va) {
524 ; CHECK-LABEL: vxor_vi_nxv2i16_2:
526 ; CHECK-NEXT: li a0, 16
527 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
528 ; CHECK-NEXT: vxor.vx v8, v8, a0
530 %head = insertelement <vscale x 2 x i16> poison, i16 16, i32 0
531 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
532 %vc = xor <vscale x 2 x i16> %va, %splat
533 ret <vscale x 2 x i16> %vc
536 define <vscale x 4 x i16> @vxor_vv_nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb) {
537 ; CHECK-LABEL: vxor_vv_nxv4i16:
539 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
540 ; CHECK-NEXT: vxor.vv v8, v8, v9
542 %vc = xor <vscale x 4 x i16> %va, %vb
543 ret <vscale x 4 x i16> %vc
546 define <vscale x 4 x i16> @vxor_vx_nxv4i16(<vscale x 4 x i16> %va, i16 signext %b) {
547 ; CHECK-LABEL: vxor_vx_nxv4i16:
549 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
550 ; CHECK-NEXT: vxor.vx v8, v8, a0
552 %head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
553 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
554 %vc = xor <vscale x 4 x i16> %va, %splat
555 ret <vscale x 4 x i16> %vc
558 define <vscale x 4 x i16> @vxor_vi_nxv4i16_0(<vscale x 4 x i16> %va) {
559 ; CHECK-LABEL: vxor_vi_nxv4i16_0:
561 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
562 ; CHECK-NEXT: vnot.v v8, v8
564 %head = insertelement <vscale x 4 x i16> poison, i16 -1, i32 0
565 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
566 %vc = xor <vscale x 4 x i16> %va, %splat
567 ret <vscale x 4 x i16> %vc
570 define <vscale x 4 x i16> @vxor_vi_nxv4i16_1(<vscale x 4 x i16> %va) {
571 ; CHECK-LABEL: vxor_vi_nxv4i16_1:
573 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
574 ; CHECK-NEXT: vxor.vi v8, v8, 8
576 %head = insertelement <vscale x 4 x i16> poison, i16 8, i32 0
577 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
578 %vc = xor <vscale x 4 x i16> %va, %splat
579 ret <vscale x 4 x i16> %vc
582 define <vscale x 4 x i16> @vxor_vi_nxv4i16_2(<vscale x 4 x i16> %va) {
583 ; CHECK-LABEL: vxor_vi_nxv4i16_2:
585 ; CHECK-NEXT: li a0, 16
586 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
587 ; CHECK-NEXT: vxor.vx v8, v8, a0
589 %head = insertelement <vscale x 4 x i16> poison, i16 16, i32 0
590 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
591 %vc = xor <vscale x 4 x i16> %va, %splat
592 ret <vscale x 4 x i16> %vc
595 define <vscale x 8 x i16> @vxor_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
596 ; CHECK-LABEL: vxor_vv_nxv8i16:
598 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
599 ; CHECK-NEXT: vxor.vv v8, v8, v10
601 %vc = xor <vscale x 8 x i16> %va, %vb
602 ret <vscale x 8 x i16> %vc
605 define <vscale x 8 x i16> @vxor_vx_nxv8i16(<vscale x 8 x i16> %va, i16 signext %b) {
606 ; CHECK-LABEL: vxor_vx_nxv8i16:
608 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
609 ; CHECK-NEXT: vxor.vx v8, v8, a0
611 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
612 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
613 %vc = xor <vscale x 8 x i16> %va, %splat
614 ret <vscale x 8 x i16> %vc
617 define <vscale x 8 x i16> @vxor_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
618 ; CHECK-LABEL: vxor_vi_nxv8i16_0:
620 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
621 ; CHECK-NEXT: vnot.v v8, v8
623 %head = insertelement <vscale x 8 x i16> poison, i16 -1, i32 0
624 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
625 %vc = xor <vscale x 8 x i16> %va, %splat
626 ret <vscale x 8 x i16> %vc
629 define <vscale x 8 x i16> @vxor_vi_nxv8i16_1(<vscale x 8 x i16> %va) {
630 ; CHECK-LABEL: vxor_vi_nxv8i16_1:
632 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
633 ; CHECK-NEXT: vxor.vi v8, v8, 8
635 %head = insertelement <vscale x 8 x i16> poison, i16 8, i32 0
636 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
637 %vc = xor <vscale x 8 x i16> %va, %splat
638 ret <vscale x 8 x i16> %vc
641 define <vscale x 8 x i16> @vxor_vi_nxv8i16_2(<vscale x 8 x i16> %va) {
642 ; CHECK-LABEL: vxor_vi_nxv8i16_2:
644 ; CHECK-NEXT: li a0, 16
645 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
646 ; CHECK-NEXT: vxor.vx v8, v8, a0
648 %head = insertelement <vscale x 8 x i16> poison, i16 16, i32 0
649 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
650 %vc = xor <vscale x 8 x i16> %va, %splat
651 ret <vscale x 8 x i16> %vc
654 define <vscale x 16 x i16> @vxor_vv_nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb) {
655 ; CHECK-LABEL: vxor_vv_nxv16i16:
657 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
658 ; CHECK-NEXT: vxor.vv v8, v8, v12
660 %vc = xor <vscale x 16 x i16> %va, %vb
661 ret <vscale x 16 x i16> %vc
664 define <vscale x 16 x i16> @vxor_vx_nxv16i16(<vscale x 16 x i16> %va, i16 signext %b) {
665 ; CHECK-LABEL: vxor_vx_nxv16i16:
667 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
668 ; CHECK-NEXT: vxor.vx v8, v8, a0
670 %head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
671 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
672 %vc = xor <vscale x 16 x i16> %va, %splat
673 ret <vscale x 16 x i16> %vc
676 define <vscale x 16 x i16> @vxor_vi_nxv16i16_0(<vscale x 16 x i16> %va) {
677 ; CHECK-LABEL: vxor_vi_nxv16i16_0:
679 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
680 ; CHECK-NEXT: vnot.v v8, v8
682 %head = insertelement <vscale x 16 x i16> poison, i16 -1, i32 0
683 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
684 %vc = xor <vscale x 16 x i16> %va, %splat
685 ret <vscale x 16 x i16> %vc
688 define <vscale x 16 x i16> @vxor_vi_nxv16i16_1(<vscale x 16 x i16> %va) {
689 ; CHECK-LABEL: vxor_vi_nxv16i16_1:
691 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
692 ; CHECK-NEXT: vxor.vi v8, v8, 8
694 %head = insertelement <vscale x 16 x i16> poison, i16 8, i32 0
695 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
696 %vc = xor <vscale x 16 x i16> %va, %splat
697 ret <vscale x 16 x i16> %vc
700 define <vscale x 16 x i16> @vxor_vi_nxv16i16_2(<vscale x 16 x i16> %va) {
701 ; CHECK-LABEL: vxor_vi_nxv16i16_2:
703 ; CHECK-NEXT: li a0, 16
704 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
705 ; CHECK-NEXT: vxor.vx v8, v8, a0
707 %head = insertelement <vscale x 16 x i16> poison, i16 16, i32 0
708 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
709 %vc = xor <vscale x 16 x i16> %va, %splat
710 ret <vscale x 16 x i16> %vc
713 define <vscale x 32 x i16> @vxor_vv_nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb) {
714 ; CHECK-LABEL: vxor_vv_nxv32i16:
716 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
717 ; CHECK-NEXT: vxor.vv v8, v8, v16
719 %vc = xor <vscale x 32 x i16> %va, %vb
720 ret <vscale x 32 x i16> %vc
723 define <vscale x 32 x i16> @vxor_vx_nxv32i16(<vscale x 32 x i16> %va, i16 signext %b) {
724 ; CHECK-LABEL: vxor_vx_nxv32i16:
726 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
727 ; CHECK-NEXT: vxor.vx v8, v8, a0
729 %head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
730 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
731 %vc = xor <vscale x 32 x i16> %va, %splat
732 ret <vscale x 32 x i16> %vc
735 define <vscale x 32 x i16> @vxor_vi_nxv32i16_0(<vscale x 32 x i16> %va) {
736 ; CHECK-LABEL: vxor_vi_nxv32i16_0:
738 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
739 ; CHECK-NEXT: vnot.v v8, v8
741 %head = insertelement <vscale x 32 x i16> poison, i16 -1, i32 0
742 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
743 %vc = xor <vscale x 32 x i16> %va, %splat
744 ret <vscale x 32 x i16> %vc
747 define <vscale x 32 x i16> @vxor_vi_nxv32i16_1(<vscale x 32 x i16> %va) {
748 ; CHECK-LABEL: vxor_vi_nxv32i16_1:
750 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
751 ; CHECK-NEXT: vxor.vi v8, v8, 8
753 %head = insertelement <vscale x 32 x i16> poison, i16 8, i32 0
754 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
755 %vc = xor <vscale x 32 x i16> %va, %splat
756 ret <vscale x 32 x i16> %vc
759 define <vscale x 32 x i16> @vxor_vi_nxv32i16_2(<vscale x 32 x i16> %va) {
760 ; CHECK-LABEL: vxor_vi_nxv32i16_2:
762 ; CHECK-NEXT: li a0, 16
763 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
764 ; CHECK-NEXT: vxor.vx v8, v8, a0
766 %head = insertelement <vscale x 32 x i16> poison, i16 16, i32 0
767 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
768 %vc = xor <vscale x 32 x i16> %va, %splat
769 ret <vscale x 32 x i16> %vc
772 define <vscale x 1 x i32> @vxor_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb) {
773 ; CHECK-LABEL: vxor_vv_nxv1i32:
775 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
776 ; CHECK-NEXT: vxor.vv v8, v8, v9
778 %vc = xor <vscale x 1 x i32> %va, %vb
779 ret <vscale x 1 x i32> %vc
782 define <vscale x 1 x i32> @vxor_vx_nxv1i32(<vscale x 1 x i32> %va, i32 signext %b) {
783 ; CHECK-LABEL: vxor_vx_nxv1i32:
785 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
786 ; CHECK-NEXT: vxor.vx v8, v8, a0
788 %head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
789 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
790 %vc = xor <vscale x 1 x i32> %va, %splat
791 ret <vscale x 1 x i32> %vc
794 define <vscale x 1 x i32> @vxor_vi_nxv1i32_0(<vscale x 1 x i32> %va) {
795 ; CHECK-LABEL: vxor_vi_nxv1i32_0:
797 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
798 ; CHECK-NEXT: vnot.v v8, v8
800 %head = insertelement <vscale x 1 x i32> poison, i32 -1, i32 0
801 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
802 %vc = xor <vscale x 1 x i32> %va, %splat
803 ret <vscale x 1 x i32> %vc
806 define <vscale x 1 x i32> @vxor_vi_nxv1i32_1(<vscale x 1 x i32> %va) {
807 ; CHECK-LABEL: vxor_vi_nxv1i32_1:
809 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
810 ; CHECK-NEXT: vxor.vi v8, v8, 8
812 %head = insertelement <vscale x 1 x i32> poison, i32 8, i32 0
813 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
814 %vc = xor <vscale x 1 x i32> %va, %splat
815 ret <vscale x 1 x i32> %vc
818 define <vscale x 1 x i32> @vxor_vi_nxv1i32_2(<vscale x 1 x i32> %va) {
819 ; CHECK-LABEL: vxor_vi_nxv1i32_2:
821 ; CHECK-NEXT: li a0, 16
822 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
823 ; CHECK-NEXT: vxor.vx v8, v8, a0
825 %head = insertelement <vscale x 1 x i32> poison, i32 16, i32 0
826 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
827 %vc = xor <vscale x 1 x i32> %va, %splat
828 ret <vscale x 1 x i32> %vc
831 define <vscale x 2 x i32> @vxor_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb) {
832 ; CHECK-LABEL: vxor_vv_nxv2i32:
834 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
835 ; CHECK-NEXT: vxor.vv v8, v8, v9
837 %vc = xor <vscale x 2 x i32> %va, %vb
838 ret <vscale x 2 x i32> %vc
841 define <vscale x 2 x i32> @vxor_vx_nxv2i32(<vscale x 2 x i32> %va, i32 signext %b) {
842 ; CHECK-LABEL: vxor_vx_nxv2i32:
844 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
845 ; CHECK-NEXT: vxor.vx v8, v8, a0
847 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
848 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
849 %vc = xor <vscale x 2 x i32> %va, %splat
850 ret <vscale x 2 x i32> %vc
853 define <vscale x 2 x i32> @vxor_vi_nxv2i32_0(<vscale x 2 x i32> %va) {
854 ; CHECK-LABEL: vxor_vi_nxv2i32_0:
856 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
857 ; CHECK-NEXT: vnot.v v8, v8
859 %head = insertelement <vscale x 2 x i32> poison, i32 -1, i32 0
860 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
861 %vc = xor <vscale x 2 x i32> %va, %splat
862 ret <vscale x 2 x i32> %vc
865 define <vscale x 2 x i32> @vxor_vi_nxv2i32_1(<vscale x 2 x i32> %va) {
866 ; CHECK-LABEL: vxor_vi_nxv2i32_1:
868 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
869 ; CHECK-NEXT: vxor.vi v8, v8, 8
871 %head = insertelement <vscale x 2 x i32> poison, i32 8, i32 0
872 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
873 %vc = xor <vscale x 2 x i32> %va, %splat
874 ret <vscale x 2 x i32> %vc
877 define <vscale x 2 x i32> @vxor_vi_nxv2i32_2(<vscale x 2 x i32> %va) {
878 ; CHECK-LABEL: vxor_vi_nxv2i32_2:
880 ; CHECK-NEXT: li a0, 16
881 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
882 ; CHECK-NEXT: vxor.vx v8, v8, a0
884 %head = insertelement <vscale x 2 x i32> poison, i32 16, i32 0
885 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
886 %vc = xor <vscale x 2 x i32> %va, %splat
887 ret <vscale x 2 x i32> %vc
890 define <vscale x 4 x i32> @vxor_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb) {
891 ; CHECK-LABEL: vxor_vv_nxv4i32:
893 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
894 ; CHECK-NEXT: vxor.vv v8, v8, v10
896 %vc = xor <vscale x 4 x i32> %va, %vb
897 ret <vscale x 4 x i32> %vc
900 define <vscale x 4 x i32> @vxor_vx_nxv4i32(<vscale x 4 x i32> %va, i32 signext %b) {
901 ; CHECK-LABEL: vxor_vx_nxv4i32:
903 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
904 ; CHECK-NEXT: vxor.vx v8, v8, a0
906 %head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
907 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
908 %vc = xor <vscale x 4 x i32> %va, %splat
909 ret <vscale x 4 x i32> %vc
912 define <vscale x 4 x i32> @vxor_vi_nxv4i32_0(<vscale x 4 x i32> %va) {
913 ; CHECK-LABEL: vxor_vi_nxv4i32_0:
915 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
916 ; CHECK-NEXT: vnot.v v8, v8
918 %head = insertelement <vscale x 4 x i32> poison, i32 -1, i32 0
919 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
920 %vc = xor <vscale x 4 x i32> %va, %splat
921 ret <vscale x 4 x i32> %vc
924 define <vscale x 4 x i32> @vxor_vi_nxv4i32_1(<vscale x 4 x i32> %va) {
925 ; CHECK-LABEL: vxor_vi_nxv4i32_1:
927 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
928 ; CHECK-NEXT: vxor.vi v8, v8, 8
930 %head = insertelement <vscale x 4 x i32> poison, i32 8, i32 0
931 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
932 %vc = xor <vscale x 4 x i32> %va, %splat
933 ret <vscale x 4 x i32> %vc
936 define <vscale x 4 x i32> @vxor_vi_nxv4i32_2(<vscale x 4 x i32> %va) {
937 ; CHECK-LABEL: vxor_vi_nxv4i32_2:
939 ; CHECK-NEXT: li a0, 16
940 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
941 ; CHECK-NEXT: vxor.vx v8, v8, a0
943 %head = insertelement <vscale x 4 x i32> poison, i32 16, i32 0
944 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
945 %vc = xor <vscale x 4 x i32> %va, %splat
946 ret <vscale x 4 x i32> %vc
949 define <vscale x 8 x i32> @vxor_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
950 ; CHECK-LABEL: vxor_vv_nxv8i32:
952 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
953 ; CHECK-NEXT: vxor.vv v8, v8, v12
955 %vc = xor <vscale x 8 x i32> %va, %vb
956 ret <vscale x 8 x i32> %vc
959 define <vscale x 8 x i32> @vxor_vx_nxv8i32(<vscale x 8 x i32> %va, i32 signext %b) {
960 ; CHECK-LABEL: vxor_vx_nxv8i32:
962 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
963 ; CHECK-NEXT: vxor.vx v8, v8, a0
965 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
966 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
967 %vc = xor <vscale x 8 x i32> %va, %splat
968 ret <vscale x 8 x i32> %vc
971 define <vscale x 8 x i32> @vxor_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
972 ; CHECK-LABEL: vxor_vi_nxv8i32_0:
974 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
975 ; CHECK-NEXT: vnot.v v8, v8
977 %head = insertelement <vscale x 8 x i32> poison, i32 -1, i32 0
978 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
979 %vc = xor <vscale x 8 x i32> %va, %splat
980 ret <vscale x 8 x i32> %vc
983 define <vscale x 8 x i32> @vxor_vi_nxv8i32_1(<vscale x 8 x i32> %va) {
984 ; CHECK-LABEL: vxor_vi_nxv8i32_1:
986 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
987 ; CHECK-NEXT: vxor.vi v8, v8, 8
989 %head = insertelement <vscale x 8 x i32> poison, i32 8, i32 0
990 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
991 %vc = xor <vscale x 8 x i32> %va, %splat
992 ret <vscale x 8 x i32> %vc
995 define <vscale x 8 x i32> @vxor_vi_nxv8i32_2(<vscale x 8 x i32> %va) {
996 ; CHECK-LABEL: vxor_vi_nxv8i32_2:
998 ; CHECK-NEXT: li a0, 16
999 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1000 ; CHECK-NEXT: vxor.vx v8, v8, a0
1002 %head = insertelement <vscale x 8 x i32> poison, i32 16, i32 0
1003 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1004 %vc = xor <vscale x 8 x i32> %va, %splat
1005 ret <vscale x 8 x i32> %vc
1008 define <vscale x 16 x i32> @vxor_vv_nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb) {
1009 ; CHECK-LABEL: vxor_vv_nxv16i32:
1011 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1012 ; CHECK-NEXT: vxor.vv v8, v8, v16
1014 %vc = xor <vscale x 16 x i32> %va, %vb
1015 ret <vscale x 16 x i32> %vc
1018 define <vscale x 16 x i32> @vxor_vx_nxv16i32(<vscale x 16 x i32> %va, i32 signext %b) {
1019 ; CHECK-LABEL: vxor_vx_nxv16i32:
1021 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
1022 ; CHECK-NEXT: vxor.vx v8, v8, a0
1024 %head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
1025 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1026 %vc = xor <vscale x 16 x i32> %va, %splat
1027 ret <vscale x 16 x i32> %vc
1030 define <vscale x 16 x i32> @vxor_vi_nxv16i32_0(<vscale x 16 x i32> %va) {
1031 ; CHECK-LABEL: vxor_vi_nxv16i32_0:
1033 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1034 ; CHECK-NEXT: vnot.v v8, v8
1036 %head = insertelement <vscale x 16 x i32> poison, i32 -1, i32 0
1037 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1038 %vc = xor <vscale x 16 x i32> %va, %splat
1039 ret <vscale x 16 x i32> %vc
1042 define <vscale x 16 x i32> @vxor_vi_nxv16i32_1(<vscale x 16 x i32> %va) {
1043 ; CHECK-LABEL: vxor_vi_nxv16i32_1:
1045 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1046 ; CHECK-NEXT: vxor.vi v8, v8, 8
1048 %head = insertelement <vscale x 16 x i32> poison, i32 8, i32 0
1049 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1050 %vc = xor <vscale x 16 x i32> %va, %splat
1051 ret <vscale x 16 x i32> %vc
1054 define <vscale x 16 x i32> @vxor_vi_nxv16i32_2(<vscale x 16 x i32> %va) {
1055 ; CHECK-LABEL: vxor_vi_nxv16i32_2:
1057 ; CHECK-NEXT: li a0, 16
1058 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
1059 ; CHECK-NEXT: vxor.vx v8, v8, a0
1061 %head = insertelement <vscale x 16 x i32> poison, i32 16, i32 0
1062 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
1063 %vc = xor <vscale x 16 x i32> %va, %splat
1064 ret <vscale x 16 x i32> %vc
1067 define <vscale x 1 x i64> @vxor_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb) {
1068 ; CHECK-LABEL: vxor_vv_nxv1i64:
1070 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1071 ; CHECK-NEXT: vxor.vv v8, v8, v9
1073 %vc = xor <vscale x 1 x i64> %va, %vb
1074 ret <vscale x 1 x i64> %vc
1077 define <vscale x 1 x i64> @vxor_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b) {
1078 ; RV32-LABEL: vxor_vx_nxv1i64:
1080 ; RV32-NEXT: addi sp, sp, -16
1081 ; RV32-NEXT: .cfi_def_cfa_offset 16
1082 ; RV32-NEXT: sw a1, 12(sp)
1083 ; RV32-NEXT: sw a0, 8(sp)
1084 ; RV32-NEXT: addi a0, sp, 8
1085 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1086 ; RV32-NEXT: vlse64.v v9, (a0), zero
1087 ; RV32-NEXT: vxor.vv v8, v8, v9
1088 ; RV32-NEXT: addi sp, sp, 16
1091 ; RV64-LABEL: vxor_vx_nxv1i64:
1093 ; RV64-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1094 ; RV64-NEXT: vxor.vx v8, v8, a0
1096 %head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
1097 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1098 %vc = xor <vscale x 1 x i64> %va, %splat
1099 ret <vscale x 1 x i64> %vc
1102 define <vscale x 1 x i64> @vxor_vi_nxv1i64_0(<vscale x 1 x i64> %va) {
1103 ; CHECK-LABEL: vxor_vi_nxv1i64_0:
1105 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1106 ; CHECK-NEXT: vnot.v v8, v8
1108 %head = insertelement <vscale x 1 x i64> poison, i64 -1, i32 0
1109 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1110 %vc = xor <vscale x 1 x i64> %va, %splat
1111 ret <vscale x 1 x i64> %vc
1114 define <vscale x 1 x i64> @vxor_vi_nxv1i64_1(<vscale x 1 x i64> %va) {
1115 ; CHECK-LABEL: vxor_vi_nxv1i64_1:
1117 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1118 ; CHECK-NEXT: vxor.vi v8, v8, 8
1120 %head = insertelement <vscale x 1 x i64> poison, i64 8, i32 0
1121 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1122 %vc = xor <vscale x 1 x i64> %va, %splat
1123 ret <vscale x 1 x i64> %vc
1126 define <vscale x 1 x i64> @vxor_vi_nxv1i64_2(<vscale x 1 x i64> %va) {
1127 ; CHECK-LABEL: vxor_vi_nxv1i64_2:
1129 ; CHECK-NEXT: li a0, 16
1130 ; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1131 ; CHECK-NEXT: vxor.vx v8, v8, a0
1133 %head = insertelement <vscale x 1 x i64> poison, i64 16, i32 0
1134 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1135 %vc = xor <vscale x 1 x i64> %va, %splat
1136 ret <vscale x 1 x i64> %vc
1139 define <vscale x 2 x i64> @vxor_vv_nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb) {
1140 ; CHECK-LABEL: vxor_vv_nxv2i64:
1142 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1143 ; CHECK-NEXT: vxor.vv v8, v8, v10
1145 %vc = xor <vscale x 2 x i64> %va, %vb
1146 ret <vscale x 2 x i64> %vc
1149 define <vscale x 2 x i64> @vxor_vx_nxv2i64(<vscale x 2 x i64> %va, i64 %b) {
1150 ; RV32-LABEL: vxor_vx_nxv2i64:
1152 ; RV32-NEXT: addi sp, sp, -16
1153 ; RV32-NEXT: .cfi_def_cfa_offset 16
1154 ; RV32-NEXT: sw a1, 12(sp)
1155 ; RV32-NEXT: sw a0, 8(sp)
1156 ; RV32-NEXT: addi a0, sp, 8
1157 ; RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1158 ; RV32-NEXT: vlse64.v v10, (a0), zero
1159 ; RV32-NEXT: vxor.vv v8, v8, v10
1160 ; RV32-NEXT: addi sp, sp, 16
1163 ; RV64-LABEL: vxor_vx_nxv2i64:
1165 ; RV64-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1166 ; RV64-NEXT: vxor.vx v8, v8, a0
1168 %head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
1169 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1170 %vc = xor <vscale x 2 x i64> %va, %splat
1171 ret <vscale x 2 x i64> %vc
1174 define <vscale x 2 x i64> @vxor_vi_nxv2i64_0(<vscale x 2 x i64> %va) {
1175 ; CHECK-LABEL: vxor_vi_nxv2i64_0:
1177 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1178 ; CHECK-NEXT: vnot.v v8, v8
1180 %head = insertelement <vscale x 2 x i64> poison, i64 -1, i32 0
1181 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1182 %vc = xor <vscale x 2 x i64> %va, %splat
1183 ret <vscale x 2 x i64> %vc
1186 define <vscale x 2 x i64> @vxor_vi_nxv2i64_1(<vscale x 2 x i64> %va) {
1187 ; CHECK-LABEL: vxor_vi_nxv2i64_1:
1189 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1190 ; CHECK-NEXT: vxor.vi v8, v8, 8
1192 %head = insertelement <vscale x 2 x i64> poison, i64 8, i32 0
1193 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1194 %vc = xor <vscale x 2 x i64> %va, %splat
1195 ret <vscale x 2 x i64> %vc
1198 define <vscale x 2 x i64> @vxor_vi_nxv2i64_2(<vscale x 2 x i64> %va) {
1199 ; CHECK-LABEL: vxor_vi_nxv2i64_2:
1201 ; CHECK-NEXT: li a0, 16
1202 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1203 ; CHECK-NEXT: vxor.vx v8, v8, a0
1205 %head = insertelement <vscale x 2 x i64> poison, i64 16, i32 0
1206 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1207 %vc = xor <vscale x 2 x i64> %va, %splat
1208 ret <vscale x 2 x i64> %vc
1211 define <vscale x 4 x i64> @vxor_vv_nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb) {
1212 ; CHECK-LABEL: vxor_vv_nxv4i64:
1214 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1215 ; CHECK-NEXT: vxor.vv v8, v8, v12
1217 %vc = xor <vscale x 4 x i64> %va, %vb
1218 ret <vscale x 4 x i64> %vc
1221 define <vscale x 4 x i64> @vxor_vx_nxv4i64(<vscale x 4 x i64> %va, i64 %b) {
1222 ; RV32-LABEL: vxor_vx_nxv4i64:
1224 ; RV32-NEXT: addi sp, sp, -16
1225 ; RV32-NEXT: .cfi_def_cfa_offset 16
1226 ; RV32-NEXT: sw a1, 12(sp)
1227 ; RV32-NEXT: sw a0, 8(sp)
1228 ; RV32-NEXT: addi a0, sp, 8
1229 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1230 ; RV32-NEXT: vlse64.v v12, (a0), zero
1231 ; RV32-NEXT: vxor.vv v8, v8, v12
1232 ; RV32-NEXT: addi sp, sp, 16
1235 ; RV64-LABEL: vxor_vx_nxv4i64:
1237 ; RV64-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1238 ; RV64-NEXT: vxor.vx v8, v8, a0
1240 %head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
1241 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1242 %vc = xor <vscale x 4 x i64> %va, %splat
1243 ret <vscale x 4 x i64> %vc
1246 define <vscale x 4 x i64> @vxor_vi_nxv4i64_0(<vscale x 4 x i64> %va) {
1247 ; CHECK-LABEL: vxor_vi_nxv4i64_0:
1249 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1250 ; CHECK-NEXT: vnot.v v8, v8
1252 %head = insertelement <vscale x 4 x i64> poison, i64 -1, i32 0
1253 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1254 %vc = xor <vscale x 4 x i64> %va, %splat
1255 ret <vscale x 4 x i64> %vc
1258 define <vscale x 4 x i64> @vxor_vi_nxv4i64_1(<vscale x 4 x i64> %va) {
1259 ; CHECK-LABEL: vxor_vi_nxv4i64_1:
1261 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1262 ; CHECK-NEXT: vxor.vi v8, v8, 8
1264 %head = insertelement <vscale x 4 x i64> poison, i64 8, i32 0
1265 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1266 %vc = xor <vscale x 4 x i64> %va, %splat
1267 ret <vscale x 4 x i64> %vc
1270 define <vscale x 4 x i64> @vxor_vi_nxv4i64_2(<vscale x 4 x i64> %va) {
1271 ; CHECK-LABEL: vxor_vi_nxv4i64_2:
1273 ; CHECK-NEXT: li a0, 16
1274 ; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1275 ; CHECK-NEXT: vxor.vx v8, v8, a0
1277 %head = insertelement <vscale x 4 x i64> poison, i64 16, i32 0
1278 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1279 %vc = xor <vscale x 4 x i64> %va, %splat
1280 ret <vscale x 4 x i64> %vc
1283 define <vscale x 8 x i64> @vxor_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
1284 ; CHECK-LABEL: vxor_vv_nxv8i64:
1286 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1287 ; CHECK-NEXT: vxor.vv v8, v8, v16
1289 %vc = xor <vscale x 8 x i64> %va, %vb
1290 ret <vscale x 8 x i64> %vc
1293 define <vscale x 8 x i64> @vxor_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
1294 ; RV32-LABEL: vxor_vx_nxv8i64:
1296 ; RV32-NEXT: addi sp, sp, -16
1297 ; RV32-NEXT: .cfi_def_cfa_offset 16
1298 ; RV32-NEXT: sw a1, 12(sp)
1299 ; RV32-NEXT: sw a0, 8(sp)
1300 ; RV32-NEXT: addi a0, sp, 8
1301 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1302 ; RV32-NEXT: vlse64.v v16, (a0), zero
1303 ; RV32-NEXT: vxor.vv v8, v8, v16
1304 ; RV32-NEXT: addi sp, sp, 16
1307 ; RV64-LABEL: vxor_vx_nxv8i64:
1309 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1310 ; RV64-NEXT: vxor.vx v8, v8, a0
1312 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1313 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1314 %vc = xor <vscale x 8 x i64> %va, %splat
1315 ret <vscale x 8 x i64> %vc
1318 define <vscale x 8 x i64> @vxor_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
1319 ; CHECK-LABEL: vxor_vi_nxv8i64_0:
1321 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1322 ; CHECK-NEXT: vnot.v v8, v8
1324 %head = insertelement <vscale x 8 x i64> poison, i64 -1, i32 0
1325 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1326 %vc = xor <vscale x 8 x i64> %va, %splat
1327 ret <vscale x 8 x i64> %vc
1330 define <vscale x 8 x i64> @vxor_vi_nxv8i64_1(<vscale x 8 x i64> %va) {
1331 ; CHECK-LABEL: vxor_vi_nxv8i64_1:
1333 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1334 ; CHECK-NEXT: vxor.vi v8, v8, 8
1336 %head = insertelement <vscale x 8 x i64> poison, i64 8, i32 0
1337 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1338 %vc = xor <vscale x 8 x i64> %va, %splat
1339 ret <vscale x 8 x i64> %vc
1342 define <vscale x 8 x i64> @vxor_vi_nxv8i64_2(<vscale x 8 x i64> %va) {
1343 ; CHECK-LABEL: vxor_vi_nxv8i64_2:
1345 ; CHECK-NEXT: li a0, 16
1346 ; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1347 ; CHECK-NEXT: vxor.vx v8, v8, a0
1349 %head = insertelement <vscale x 8 x i64> poison, i64 16, i32 0
1350 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1351 %vc = xor <vscale x 8 x i64> %va, %splat
1352 ret <vscale x 8 x i64> %vc
1355 define <vscale x 8 x i64> @vxor_xx_nxv8i64(i64 %a, i64 %b) nounwind {
1356 ; RV32-LABEL: vxor_xx_nxv8i64:
1358 ; RV32-NEXT: addi sp, sp, -16
1359 ; RV32-NEXT: sw a1, 12(sp)
1360 ; RV32-NEXT: sw a0, 8(sp)
1361 ; RV32-NEXT: addi a0, sp, 8
1362 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1363 ; RV32-NEXT: vlse64.v v8, (a0), zero
1364 ; RV32-NEXT: sw a3, 4(sp)
1365 ; RV32-NEXT: sw a2, 0(sp)
1366 ; RV32-NEXT: mv a0, sp
1367 ; RV32-NEXT: vlse64.v v16, (a0), zero
1368 ; RV32-NEXT: vxor.vv v8, v8, v16
1369 ; RV32-NEXT: addi sp, sp, 16
1372 ; RV64-LABEL: vxor_xx_nxv8i64:
1374 ; RV64-NEXT: xor a0, a0, a1
1375 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1376 ; RV64-NEXT: vmv.v.x v8, a0
1378 %head1 = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
1379 %splat1 = shufflevector <vscale x 8 x i64> %head1, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1380 %head2 = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1381 %splat2 = shufflevector <vscale x 8 x i64> %head2, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1382 %v = xor <vscale x 8 x i64> %splat1, %splat2
1383 ret <vscale x 8 x i64> %v
1386 define <vscale x 8 x i32> @vxor_vv_mask_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %mask) {
1387 ; CHECK-LABEL: vxor_vv_mask_nxv8i32:
1389 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, mu
1390 ; CHECK-NEXT: vxor.vv v8, v8, v12, v0.t
1392 %vs = select <vscale x 8 x i1> %mask, <vscale x 8 x i32> %vb, <vscale x 8 x i32> zeroinitializer
1393 %vc = xor <vscale x 8 x i32> %va, %vs
1394 ret <vscale x 8 x i32> %vc
1397 define <vscale x 8 x i32> @vxor_vx_mask_nxv8i32(<vscale x 8 x i32> %va, i32 signext %b, <vscale x 8 x i1> %mask) {
1398 ; CHECK-LABEL: vxor_vx_mask_nxv8i32:
1400 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, mu
1401 ; CHECK-NEXT: vxor.vx v8, v8, a0, v0.t
1403 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1404 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1405 %vs = select <vscale x 8 x i1> %mask, <vscale x 8 x i32> %splat, <vscale x 8 x i32> zeroinitializer
1406 %vc = xor <vscale x 8 x i32> %va, %vs
1407 ret <vscale x 8 x i32> %vc
1410 define <vscale x 8 x i32> @vxor_vi_mask_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %mask) {
1411 ; CHECK-LABEL: vxor_vi_mask_nxv8i32:
1413 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, mu
1414 ; CHECK-NEXT: vxor.vi v8, v8, 7, v0.t
1416 %head = insertelement <vscale x 8 x i32> poison, i32 7, i32 0
1417 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1418 %vs = select <vscale x 8 x i1> %mask, <vscale x 8 x i32> %splat, <vscale x 8 x i32> zeroinitializer
1419 %vc = xor <vscale x 8 x i32> %va, %vs
1420 ret <vscale x 8 x i32> %vc