1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s
4 target triple = "aarch64-unknown-linux-gnu"
10 define <8 x i8> @and_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
11 ; CHECK-LABEL: and_v8i8:
13 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
14 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
15 ; CHECK-NEXT: and z0.d, z0.d, z1.d
16 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
18 %res = and <8 x i8> %op1, %op2
22 define <16 x i8> @and_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
23 ; CHECK-LABEL: and_v16i8:
25 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
26 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
27 ; CHECK-NEXT: and z0.d, z0.d, z1.d
28 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
30 %res = and <16 x i8> %op1, %op2
34 define void @and_v32i8(ptr %a, ptr %b) {
35 ; CHECK-LABEL: and_v32i8:
37 ; CHECK-NEXT: ldp q0, q3, [x1]
38 ; CHECK-NEXT: ldp q1, q2, [x0]
39 ; CHECK-NEXT: and z0.d, z1.d, z0.d
40 ; CHECK-NEXT: and z1.d, z2.d, z3.d
41 ; CHECK-NEXT: stp q0, q1, [x0]
43 %op1 = load <32 x i8>, ptr %a
44 %op2 = load <32 x i8>, ptr %b
45 %res = and <32 x i8> %op1, %op2
46 store <32 x i8> %res, ptr %a
50 define <4 x i16> @and_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
51 ; CHECK-LABEL: and_v4i16:
53 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
54 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
55 ; CHECK-NEXT: and z0.d, z0.d, z1.d
56 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
58 %res = and <4 x i16> %op1, %op2
62 define <8 x i16> @and_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
63 ; CHECK-LABEL: and_v8i16:
65 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
66 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
67 ; CHECK-NEXT: and z0.d, z0.d, z1.d
68 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
70 %res = and <8 x i16> %op1, %op2
74 define void @and_v16i16(ptr %a, ptr %b) {
75 ; CHECK-LABEL: and_v16i16:
77 ; CHECK-NEXT: ldp q0, q3, [x1]
78 ; CHECK-NEXT: ldp q1, q2, [x0]
79 ; CHECK-NEXT: and z0.d, z1.d, z0.d
80 ; CHECK-NEXT: and z1.d, z2.d, z3.d
81 ; CHECK-NEXT: stp q0, q1, [x0]
83 %op1 = load <16 x i16>, ptr %a
84 %op2 = load <16 x i16>, ptr %b
85 %res = and <16 x i16> %op1, %op2
86 store <16 x i16> %res, ptr %a
90 define <2 x i32> @and_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
91 ; CHECK-LABEL: and_v2i32:
93 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
94 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
95 ; CHECK-NEXT: and z0.d, z0.d, z1.d
96 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
98 %res = and <2 x i32> %op1, %op2
102 define <4 x i32> @and_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
103 ; CHECK-LABEL: and_v4i32:
105 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
106 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
107 ; CHECK-NEXT: and z0.d, z0.d, z1.d
108 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
110 %res = and <4 x i32> %op1, %op2
114 define void @and_v8i32(ptr %a, ptr %b) {
115 ; CHECK-LABEL: and_v8i32:
117 ; CHECK-NEXT: ldp q0, q3, [x1]
118 ; CHECK-NEXT: ldp q1, q2, [x0]
119 ; CHECK-NEXT: and z0.d, z1.d, z0.d
120 ; CHECK-NEXT: and z1.d, z2.d, z3.d
121 ; CHECK-NEXT: stp q0, q1, [x0]
123 %op1 = load <8 x i32>, ptr %a
124 %op2 = load <8 x i32>, ptr %b
125 %res = and <8 x i32> %op1, %op2
126 store <8 x i32> %res, ptr %a
130 define <1 x i64> @and_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
131 ; CHECK-LABEL: and_v1i64:
133 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
134 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
135 ; CHECK-NEXT: and z0.d, z0.d, z1.d
136 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
138 %res = and <1 x i64> %op1, %op2
142 define <2 x i64> @and_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
143 ; CHECK-LABEL: and_v2i64:
145 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
146 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
147 ; CHECK-NEXT: and z0.d, z0.d, z1.d
148 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
150 %res = and <2 x i64> %op1, %op2
154 define void @and_v4i64(ptr %a, ptr %b) {
155 ; CHECK-LABEL: and_v4i64:
157 ; CHECK-NEXT: ldp q0, q3, [x1]
158 ; CHECK-NEXT: ldp q1, q2, [x0]
159 ; CHECK-NEXT: and z0.d, z1.d, z0.d
160 ; CHECK-NEXT: and z1.d, z2.d, z3.d
161 ; CHECK-NEXT: stp q0, q1, [x0]
163 %op1 = load <4 x i64>, ptr %a
164 %op2 = load <4 x i64>, ptr %b
165 %res = and <4 x i64> %op1, %op2
166 store <4 x i64> %res, ptr %a
174 define <8 x i8> @or_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
175 ; CHECK-LABEL: or_v8i8:
177 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
178 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
179 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
180 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
182 %res = or <8 x i8> %op1, %op2
186 define <16 x i8> @or_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
187 ; CHECK-LABEL: or_v16i8:
189 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
190 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
191 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
192 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
194 %res = or <16 x i8> %op1, %op2
198 define void @or_v32i8(ptr %a, ptr %b) {
199 ; CHECK-LABEL: or_v32i8:
201 ; CHECK-NEXT: ldp q0, q3, [x1]
202 ; CHECK-NEXT: ldp q1, q2, [x0]
203 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
204 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
205 ; CHECK-NEXT: stp q0, q1, [x0]
207 %op1 = load <32 x i8>, ptr %a
208 %op2 = load <32 x i8>, ptr %b
209 %res = or <32 x i8> %op1, %op2
210 store <32 x i8> %res, ptr %a
214 define <4 x i16> @or_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
215 ; CHECK-LABEL: or_v4i16:
217 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
218 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
219 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
220 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
222 %res = or <4 x i16> %op1, %op2
226 define <8 x i16> @or_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
227 ; CHECK-LABEL: or_v8i16:
229 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
230 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
231 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
232 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
234 %res = or <8 x i16> %op1, %op2
238 define void @or_v16i16(ptr %a, ptr %b) {
239 ; CHECK-LABEL: or_v16i16:
241 ; CHECK-NEXT: ldp q0, q3, [x1]
242 ; CHECK-NEXT: ldp q1, q2, [x0]
243 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
244 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
245 ; CHECK-NEXT: stp q0, q1, [x0]
247 %op1 = load <16 x i16>, ptr %a
248 %op2 = load <16 x i16>, ptr %b
249 %res = or <16 x i16> %op1, %op2
250 store <16 x i16> %res, ptr %a
254 define <2 x i32> @or_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
255 ; CHECK-LABEL: or_v2i32:
257 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
258 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
259 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
260 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
262 %res = or <2 x i32> %op1, %op2
266 define <4 x i32> @or_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
267 ; CHECK-LABEL: or_v4i32:
269 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
270 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
271 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
272 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
274 %res = or <4 x i32> %op1, %op2
278 define void @or_v8i32(ptr %a, ptr %b) {
279 ; CHECK-LABEL: or_v8i32:
281 ; CHECK-NEXT: ldp q0, q3, [x1]
282 ; CHECK-NEXT: ldp q1, q2, [x0]
283 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
284 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
285 ; CHECK-NEXT: stp q0, q1, [x0]
287 %op1 = load <8 x i32>, ptr %a
288 %op2 = load <8 x i32>, ptr %b
289 %res = or <8 x i32> %op1, %op2
290 store <8 x i32> %res, ptr %a
294 define <1 x i64> @or_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
295 ; CHECK-LABEL: or_v1i64:
297 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
298 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
299 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
300 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
302 %res = or <1 x i64> %op1, %op2
306 define <2 x i64> @or_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
307 ; CHECK-LABEL: or_v2i64:
309 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
310 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
311 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
312 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
314 %res = or <2 x i64> %op1, %op2
318 define void @or_v4i64(ptr %a, ptr %b) {
319 ; CHECK-LABEL: or_v4i64:
321 ; CHECK-NEXT: ldp q0, q3, [x1]
322 ; CHECK-NEXT: ldp q1, q2, [x0]
323 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
324 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
325 ; CHECK-NEXT: stp q0, q1, [x0]
327 %op1 = load <4 x i64>, ptr %a
328 %op2 = load <4 x i64>, ptr %b
329 %res = or <4 x i64> %op1, %op2
330 store <4 x i64> %res, ptr %a
338 define <8 x i8> @xor_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
339 ; CHECK-LABEL: xor_v8i8:
341 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
342 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
343 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
344 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
346 %res = xor <8 x i8> %op1, %op2
350 define <16 x i8> @xor_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
351 ; CHECK-LABEL: xor_v16i8:
353 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
354 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
355 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
356 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
358 %res = xor <16 x i8> %op1, %op2
362 define void @xor_v32i8(ptr %a, ptr %b) {
363 ; CHECK-LABEL: xor_v32i8:
365 ; CHECK-NEXT: ldp q0, q3, [x1]
366 ; CHECK-NEXT: ldp q1, q2, [x0]
367 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
368 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
369 ; CHECK-NEXT: stp q0, q1, [x0]
371 %op1 = load <32 x i8>, ptr %a
372 %op2 = load <32 x i8>, ptr %b
373 %res = xor <32 x i8> %op1, %op2
374 store <32 x i8> %res, ptr %a
378 define <4 x i16> @xor_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
379 ; CHECK-LABEL: xor_v4i16:
381 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
382 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
383 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
384 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
386 %res = xor <4 x i16> %op1, %op2
390 define <8 x i16> @xor_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
391 ; CHECK-LABEL: xor_v8i16:
393 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
394 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
395 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
396 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
398 %res = xor <8 x i16> %op1, %op2
402 define void @xor_v16i16(ptr %a, ptr %b) {
403 ; CHECK-LABEL: xor_v16i16:
405 ; CHECK-NEXT: ldp q0, q3, [x1]
406 ; CHECK-NEXT: ldp q1, q2, [x0]
407 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
408 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
409 ; CHECK-NEXT: stp q0, q1, [x0]
411 %op1 = load <16 x i16>, ptr %a
412 %op2 = load <16 x i16>, ptr %b
413 %res = xor <16 x i16> %op1, %op2
414 store <16 x i16> %res, ptr %a
418 define <2 x i32> @xor_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
419 ; CHECK-LABEL: xor_v2i32:
421 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
422 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
423 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
424 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
426 %res = xor <2 x i32> %op1, %op2
430 define <4 x i32> @xor_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
431 ; CHECK-LABEL: xor_v4i32:
433 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
434 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
435 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
436 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
438 %res = xor <4 x i32> %op1, %op2
442 define void @xor_v8i32(ptr %a, ptr %b) {
443 ; CHECK-LABEL: xor_v8i32:
445 ; CHECK-NEXT: ldp q0, q3, [x1]
446 ; CHECK-NEXT: ldp q1, q2, [x0]
447 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
448 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
449 ; CHECK-NEXT: stp q0, q1, [x0]
451 %op1 = load <8 x i32>, ptr %a
452 %op2 = load <8 x i32>, ptr %b
453 %res = xor <8 x i32> %op1, %op2
454 store <8 x i32> %res, ptr %a
458 define <1 x i64> @xor_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
459 ; CHECK-LABEL: xor_v1i64:
461 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
462 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
463 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
464 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
466 %res = xor <1 x i64> %op1, %op2
470 define <2 x i64> @xor_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
471 ; CHECK-LABEL: xor_v2i64:
473 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
474 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
475 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
476 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
478 %res = xor <2 x i64> %op1, %op2
482 define void @xor_v4i64(ptr %a, ptr %b) {
483 ; CHECK-LABEL: xor_v4i64:
485 ; CHECK-NEXT: ldp q0, q3, [x1]
486 ; CHECK-NEXT: ldp q1, q2, [x0]
487 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
488 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
489 ; CHECK-NEXT: stp q0, q1, [x0]
491 %op1 = load <4 x i64>, ptr %a
492 %op2 = load <4 x i64>, ptr %b
493 %res = xor <4 x i64> %op1, %op2
494 store <4 x i64> %res, ptr %a