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
3 ; RUN: llc -mattr=+sme -force-streaming-compatible-sve < %s | FileCheck %s
5 target triple = "aarch64-unknown-linux-gnu"
11 define <8 x i8> @and_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
12 ; CHECK-LABEL: and_v8i8:
14 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
15 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
16 ; CHECK-NEXT: and z0.d, z0.d, z1.d
17 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
19 %res = and <8 x i8> %op1, %op2
23 define <16 x i8> @and_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
24 ; CHECK-LABEL: and_v16i8:
26 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
27 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
28 ; CHECK-NEXT: and z0.d, z0.d, z1.d
29 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
31 %res = and <16 x i8> %op1, %op2
35 define void @and_v32i8(ptr %a, ptr %b) {
36 ; CHECK-LABEL: and_v32i8:
38 ; CHECK-NEXT: ldp q0, q3, [x1]
39 ; CHECK-NEXT: ldp q1, q2, [x0]
40 ; CHECK-NEXT: and z0.d, z1.d, z0.d
41 ; CHECK-NEXT: and z1.d, z2.d, z3.d
42 ; CHECK-NEXT: stp q0, q1, [x0]
44 %op1 = load <32 x i8>, ptr %a
45 %op2 = load <32 x i8>, ptr %b
46 %res = and <32 x i8> %op1, %op2
47 store <32 x i8> %res, ptr %a
51 define <4 x i16> @and_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
52 ; CHECK-LABEL: and_v4i16:
54 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
55 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
56 ; CHECK-NEXT: and z0.d, z0.d, z1.d
57 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
59 %res = and <4 x i16> %op1, %op2
63 define <8 x i16> @and_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
64 ; CHECK-LABEL: and_v8i16:
66 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
67 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
68 ; CHECK-NEXT: and z0.d, z0.d, z1.d
69 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
71 %res = and <8 x i16> %op1, %op2
75 define void @and_v16i16(ptr %a, ptr %b) {
76 ; CHECK-LABEL: and_v16i16:
78 ; CHECK-NEXT: ldp q0, q3, [x1]
79 ; CHECK-NEXT: ldp q1, q2, [x0]
80 ; CHECK-NEXT: and z0.d, z1.d, z0.d
81 ; CHECK-NEXT: and z1.d, z2.d, z3.d
82 ; CHECK-NEXT: stp q0, q1, [x0]
84 %op1 = load <16 x i16>, ptr %a
85 %op2 = load <16 x i16>, ptr %b
86 %res = and <16 x i16> %op1, %op2
87 store <16 x i16> %res, ptr %a
91 define <2 x i32> @and_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
92 ; CHECK-LABEL: and_v2i32:
94 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
95 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
96 ; CHECK-NEXT: and z0.d, z0.d, z1.d
97 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
99 %res = and <2 x i32> %op1, %op2
103 define <4 x i32> @and_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
104 ; CHECK-LABEL: and_v4i32:
106 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
107 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
108 ; CHECK-NEXT: and z0.d, z0.d, z1.d
109 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
111 %res = and <4 x i32> %op1, %op2
115 define void @and_v8i32(ptr %a, ptr %b) {
116 ; CHECK-LABEL: and_v8i32:
118 ; CHECK-NEXT: ldp q0, q3, [x1]
119 ; CHECK-NEXT: ldp q1, q2, [x0]
120 ; CHECK-NEXT: and z0.d, z1.d, z0.d
121 ; CHECK-NEXT: and z1.d, z2.d, z3.d
122 ; CHECK-NEXT: stp q0, q1, [x0]
124 %op1 = load <8 x i32>, ptr %a
125 %op2 = load <8 x i32>, ptr %b
126 %res = and <8 x i32> %op1, %op2
127 store <8 x i32> %res, ptr %a
131 define <1 x i64> @and_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
132 ; CHECK-LABEL: and_v1i64:
134 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
135 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
136 ; CHECK-NEXT: and z0.d, z0.d, z1.d
137 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
139 %res = and <1 x i64> %op1, %op2
143 define <2 x i64> @and_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
144 ; CHECK-LABEL: and_v2i64:
146 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
147 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
148 ; CHECK-NEXT: and z0.d, z0.d, z1.d
149 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
151 %res = and <2 x i64> %op1, %op2
155 define void @and_v4i64(ptr %a, ptr %b) {
156 ; CHECK-LABEL: and_v4i64:
158 ; CHECK-NEXT: ldp q0, q3, [x1]
159 ; CHECK-NEXT: ldp q1, q2, [x0]
160 ; CHECK-NEXT: and z0.d, z1.d, z0.d
161 ; CHECK-NEXT: and z1.d, z2.d, z3.d
162 ; CHECK-NEXT: stp q0, q1, [x0]
164 %op1 = load <4 x i64>, ptr %a
165 %op2 = load <4 x i64>, ptr %b
166 %res = and <4 x i64> %op1, %op2
167 store <4 x i64> %res, ptr %a
175 define <8 x i8> @or_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
176 ; CHECK-LABEL: or_v8i8:
178 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
179 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
180 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
181 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
183 %res = or <8 x i8> %op1, %op2
187 define <16 x i8> @or_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
188 ; CHECK-LABEL: or_v16i8:
190 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
191 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
192 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
193 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
195 %res = or <16 x i8> %op1, %op2
199 define void @or_v32i8(ptr %a, ptr %b) {
200 ; CHECK-LABEL: or_v32i8:
202 ; CHECK-NEXT: ldp q0, q3, [x1]
203 ; CHECK-NEXT: ldp q1, q2, [x0]
204 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
205 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
206 ; CHECK-NEXT: stp q0, q1, [x0]
208 %op1 = load <32 x i8>, ptr %a
209 %op2 = load <32 x i8>, ptr %b
210 %res = or <32 x i8> %op1, %op2
211 store <32 x i8> %res, ptr %a
215 define <4 x i16> @or_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
216 ; CHECK-LABEL: or_v4i16:
218 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
219 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
220 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
221 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
223 %res = or <4 x i16> %op1, %op2
227 define <8 x i16> @or_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
228 ; CHECK-LABEL: or_v8i16:
230 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
231 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
232 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
233 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
235 %res = or <8 x i16> %op1, %op2
239 define void @or_v16i16(ptr %a, ptr %b) {
240 ; CHECK-LABEL: or_v16i16:
242 ; CHECK-NEXT: ldp q0, q3, [x1]
243 ; CHECK-NEXT: ldp q1, q2, [x0]
244 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
245 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
246 ; CHECK-NEXT: stp q0, q1, [x0]
248 %op1 = load <16 x i16>, ptr %a
249 %op2 = load <16 x i16>, ptr %b
250 %res = or <16 x i16> %op1, %op2
251 store <16 x i16> %res, ptr %a
255 define <2 x i32> @or_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
256 ; CHECK-LABEL: or_v2i32:
258 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
259 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
260 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
261 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
263 %res = or <2 x i32> %op1, %op2
267 define <4 x i32> @or_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
268 ; CHECK-LABEL: or_v4i32:
270 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
271 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
272 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
273 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
275 %res = or <4 x i32> %op1, %op2
279 define void @or_v8i32(ptr %a, ptr %b) {
280 ; CHECK-LABEL: or_v8i32:
282 ; CHECK-NEXT: ldp q0, q3, [x1]
283 ; CHECK-NEXT: ldp q1, q2, [x0]
284 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
285 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
286 ; CHECK-NEXT: stp q0, q1, [x0]
288 %op1 = load <8 x i32>, ptr %a
289 %op2 = load <8 x i32>, ptr %b
290 %res = or <8 x i32> %op1, %op2
291 store <8 x i32> %res, ptr %a
295 define <1 x i64> @or_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
296 ; CHECK-LABEL: or_v1i64:
298 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
299 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
300 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
301 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
303 %res = or <1 x i64> %op1, %op2
307 define <2 x i64> @or_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
308 ; CHECK-LABEL: or_v2i64:
310 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
311 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
312 ; CHECK-NEXT: orr z0.d, z0.d, z1.d
313 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
315 %res = or <2 x i64> %op1, %op2
319 define void @or_v4i64(ptr %a, ptr %b) {
320 ; CHECK-LABEL: or_v4i64:
322 ; CHECK-NEXT: ldp q0, q3, [x1]
323 ; CHECK-NEXT: ldp q1, q2, [x0]
324 ; CHECK-NEXT: orr z0.d, z1.d, z0.d
325 ; CHECK-NEXT: orr z1.d, z2.d, z3.d
326 ; CHECK-NEXT: stp q0, q1, [x0]
328 %op1 = load <4 x i64>, ptr %a
329 %op2 = load <4 x i64>, ptr %b
330 %res = or <4 x i64> %op1, %op2
331 store <4 x i64> %res, ptr %a
339 define <8 x i8> @xor_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
340 ; CHECK-LABEL: xor_v8i8:
342 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
343 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
344 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
345 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
347 %res = xor <8 x i8> %op1, %op2
351 define <16 x i8> @xor_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
352 ; CHECK-LABEL: xor_v16i8:
354 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
355 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
356 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
357 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
359 %res = xor <16 x i8> %op1, %op2
363 define void @xor_v32i8(ptr %a, ptr %b) {
364 ; CHECK-LABEL: xor_v32i8:
366 ; CHECK-NEXT: ldp q0, q3, [x1]
367 ; CHECK-NEXT: ldp q1, q2, [x0]
368 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
369 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
370 ; CHECK-NEXT: stp q0, q1, [x0]
372 %op1 = load <32 x i8>, ptr %a
373 %op2 = load <32 x i8>, ptr %b
374 %res = xor <32 x i8> %op1, %op2
375 store <32 x i8> %res, ptr %a
379 define <4 x i16> @xor_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
380 ; CHECK-LABEL: xor_v4i16:
382 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
383 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
384 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
385 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
387 %res = xor <4 x i16> %op1, %op2
391 define <8 x i16> @xor_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
392 ; CHECK-LABEL: xor_v8i16:
394 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
395 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
396 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
397 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
399 %res = xor <8 x i16> %op1, %op2
403 define void @xor_v16i16(ptr %a, ptr %b) {
404 ; CHECK-LABEL: xor_v16i16:
406 ; CHECK-NEXT: ldp q0, q3, [x1]
407 ; CHECK-NEXT: ldp q1, q2, [x0]
408 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
409 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
410 ; CHECK-NEXT: stp q0, q1, [x0]
412 %op1 = load <16 x i16>, ptr %a
413 %op2 = load <16 x i16>, ptr %b
414 %res = xor <16 x i16> %op1, %op2
415 store <16 x i16> %res, ptr %a
419 define <2 x i32> @xor_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
420 ; CHECK-LABEL: xor_v2i32:
422 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
423 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
424 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
425 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
427 %res = xor <2 x i32> %op1, %op2
431 define <4 x i32> @xor_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
432 ; CHECK-LABEL: xor_v4i32:
434 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
435 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
436 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
437 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
439 %res = xor <4 x i32> %op1, %op2
443 define void @xor_v8i32(ptr %a, ptr %b) {
444 ; CHECK-LABEL: xor_v8i32:
446 ; CHECK-NEXT: ldp q0, q3, [x1]
447 ; CHECK-NEXT: ldp q1, q2, [x0]
448 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
449 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
450 ; CHECK-NEXT: stp q0, q1, [x0]
452 %op1 = load <8 x i32>, ptr %a
453 %op2 = load <8 x i32>, ptr %b
454 %res = xor <8 x i32> %op1, %op2
455 store <8 x i32> %res, ptr %a
459 define <1 x i64> @xor_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
460 ; CHECK-LABEL: xor_v1i64:
462 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
463 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
464 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
465 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
467 %res = xor <1 x i64> %op1, %op2
471 define <2 x i64> @xor_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
472 ; CHECK-LABEL: xor_v2i64:
474 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
475 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
476 ; CHECK-NEXT: eor z0.d, z0.d, z1.d
477 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
479 %res = xor <2 x i64> %op1, %op2
483 define void @xor_v4i64(ptr %a, ptr %b) {
484 ; CHECK-LABEL: xor_v4i64:
486 ; CHECK-NEXT: ldp q0, q3, [x1]
487 ; CHECK-NEXT: ldp q1, q2, [x0]
488 ; CHECK-NEXT: eor z0.d, z1.d, z0.d
489 ; CHECK-NEXT: eor z1.d, z2.d, z3.d
490 ; CHECK-NEXT: stp q0, q1, [x0]
492 %op1 = load <4 x i64>, ptr %a
493 %op2 = load <4 x i64>, ptr %b
494 %res = xor <4 x i64> %op1, %op2
495 store <4 x i64> %res, ptr %a