1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s
4 define <8 x i8> @and8xi8(<8 x i8> %a, <8 x i8> %b) {
5 ; CHECK-LABEL: and8xi8:
7 ; CHECK-NEXT: and v0.8b, v0.8b, v1.8b
9 %tmp1 = and <8 x i8> %a, %b;
13 define <16 x i8> @and16xi8(<16 x i8> %a, <16 x i8> %b) {
14 ; CHECK-LABEL: and16xi8:
16 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
18 %tmp1 = and <16 x i8> %a, %b;
23 define <8 x i8> @orr8xi8(<8 x i8> %a, <8 x i8> %b) {
24 ; CHECK-LABEL: orr8xi8:
26 ; CHECK-NEXT: orr v0.8b, v0.8b, v1.8b
28 %tmp1 = or <8 x i8> %a, %b;
32 define <16 x i8> @orr16xi8(<16 x i8> %a, <16 x i8> %b) {
33 ; CHECK-LABEL: orr16xi8:
35 ; CHECK-NEXT: orr v0.16b, v0.16b, v1.16b
37 %tmp1 = or <16 x i8> %a, %b;
42 define <8 x i8> @xor8xi8(<8 x i8> %a, <8 x i8> %b) {
43 ; CHECK-LABEL: xor8xi8:
45 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
47 %tmp1 = xor <8 x i8> %a, %b;
51 define <16 x i8> @xor16xi8(<16 x i8> %a, <16 x i8> %b) {
52 ; CHECK-LABEL: xor16xi8:
54 ; CHECK-NEXT: eor v0.16b, v0.16b, v1.16b
56 %tmp1 = xor <16 x i8> %a, %b;
60 define <8 x i8> @bsl8xi8_const(<8 x i8> %a, <8 x i8> %b) {
61 ; CHECK-LABEL: bsl8xi8_const:
63 ; CHECK-NEXT: movi d2, #0x00ffff0000ffff
64 ; CHECK-NEXT: bif v0.8b, v1.8b, v2.8b
66 %tmp1 = and <8 x i8> %a, < i8 -1, i8 -1, i8 0, i8 0, i8 -1, i8 -1, i8 0, i8 0 >
67 %tmp2 = and <8 x i8> %b, < i8 0, i8 0, i8 -1, i8 -1, i8 0, i8 0, i8 -1, i8 -1 >
68 %tmp3 = or <8 x i8> %tmp1, %tmp2
72 define <16 x i8> @bsl16xi8_const(<16 x i8> %a, <16 x i8> %b) {
73 ; CHECK-LABEL: bsl16xi8_const:
75 ; CHECK-NEXT: movi v2.2d, #0x000000ffffffff
76 ; CHECK-NEXT: bif v0.16b, v1.16b, v2.16b
78 %tmp1 = and <16 x i8> %a, < i8 -1, i8 -1, i8 -1, i8 -1, i8 0, i8 0, i8 0, i8 0, i8 -1, i8 -1, i8 -1, i8 -1, i8 0, i8 0, i8 0, i8 0 >
79 %tmp2 = and <16 x i8> %b, < i8 0, i8 0, i8 0, i8 0, i8 -1, i8 -1, i8 -1, i8 -1, i8 0, i8 0, i8 0, i8 0, i8 -1, i8 -1, i8 -1, i8 -1 >
80 %tmp3 = or <16 x i8> %tmp1, %tmp2
84 define <8 x i8> @orn8xi8(<8 x i8> %a, <8 x i8> %b) {
85 ; CHECK-LABEL: orn8xi8:
87 ; CHECK-NEXT: orn v0.8b, v0.8b, v1.8b
89 %tmp1 = xor <8 x i8> %b, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1 >
90 %tmp2 = or <8 x i8> %a, %tmp1
94 define <16 x i8> @orn16xi8(<16 x i8> %a, <16 x i8> %b) {
95 ; CHECK-LABEL: orn16xi8:
97 ; CHECK-NEXT: orn v0.16b, v0.16b, v1.16b
99 %tmp1 = xor <16 x i8> %b, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1 >
100 %tmp2 = or <16 x i8> %a, %tmp1
104 define <8 x i8> @bic8xi8(<8 x i8> %a, <8 x i8> %b) {
105 ; CHECK-LABEL: bic8xi8:
107 ; CHECK-NEXT: bic v0.8b, v0.8b, v1.8b
109 %tmp1 = xor <8 x i8> %b, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1 >
110 %tmp2 = and <8 x i8> %a, %tmp1
114 define <16 x i8> @bic16xi8(<16 x i8> %a, <16 x i8> %b) {
115 ; CHECK-LABEL: bic16xi8:
117 ; CHECK-NEXT: bic v0.16b, v0.16b, v1.16b
119 %tmp1 = xor <16 x i8> %b, < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1 >
120 %tmp2 = and <16 x i8> %a, %tmp1
124 define <2 x i32> @orrimm2s_lsl0(<2 x i32> %a) {
125 ; CHECK-LABEL: orrimm2s_lsl0:
127 ; CHECK-NEXT: orr v0.2s, #255
129 %tmp1 = or <2 x i32> %a, < i32 255, i32 255>
133 define <2 x i32> @orrimm2s_lsl8(<2 x i32> %a) {
134 ; CHECK-LABEL: orrimm2s_lsl8:
136 ; CHECK-NEXT: orr v0.2s, #255, lsl #8
138 %tmp1 = or <2 x i32> %a, < i32 65280, i32 65280>
142 define <2 x i32> @orrimm2s_lsl16(<2 x i32> %a) {
143 ; CHECK-LABEL: orrimm2s_lsl16:
145 ; CHECK-NEXT: orr v0.2s, #255, lsl #16
147 %tmp1 = or <2 x i32> %a, < i32 16711680, i32 16711680>
151 define <2 x i32> @orrimm2s_lsl24(<2 x i32> %a) {
152 ; CHECK-LABEL: orrimm2s_lsl24:
154 ; CHECK-NEXT: orr v0.2s, #255, lsl #24
156 %tmp1 = or <2 x i32> %a, < i32 4278190080, i32 4278190080>
160 define <4 x i32> @orrimm4s_lsl0(<4 x i32> %a) {
161 ; CHECK-LABEL: orrimm4s_lsl0:
163 ; CHECK-NEXT: orr v0.4s, #255
165 %tmp1 = or <4 x i32> %a, < i32 255, i32 255, i32 255, i32 255>
169 define <4 x i32> @orrimm4s_lsl8(<4 x i32> %a) {
170 ; CHECK-LABEL: orrimm4s_lsl8:
172 ; CHECK-NEXT: orr v0.4s, #255, lsl #8
174 %tmp1 = or <4 x i32> %a, < i32 65280, i32 65280, i32 65280, i32 65280>
178 define <4 x i32> @orrimm4s_lsl16(<4 x i32> %a) {
179 ; CHECK-LABEL: orrimm4s_lsl16:
181 ; CHECK-NEXT: orr v0.4s, #255, lsl #16
183 %tmp1 = or <4 x i32> %a, < i32 16711680, i32 16711680, i32 16711680, i32 16711680>
187 define <4 x i32> @orrimm4s_lsl24(<4 x i32> %a) {
188 ; CHECK-LABEL: orrimm4s_lsl24:
190 ; CHECK-NEXT: orr v0.4s, #255, lsl #24
192 %tmp1 = or <4 x i32> %a, < i32 4278190080, i32 4278190080, i32 4278190080, i32 4278190080>
196 define <4 x i16> @orrimm4h_lsl0(<4 x i16> %a) {
197 ; CHECK-LABEL: orrimm4h_lsl0:
199 ; CHECK-NEXT: orr v0.4h, #255
201 %tmp1 = or <4 x i16> %a, < i16 255, i16 255, i16 255, i16 255 >
205 define <4 x i16> @orrimm4h_lsl8(<4 x i16> %a) {
206 ; CHECK-LABEL: orrimm4h_lsl8:
208 ; CHECK-NEXT: orr v0.4h, #255, lsl #8
210 %tmp1 = or <4 x i16> %a, < i16 65280, i16 65280, i16 65280, i16 65280 >
214 define <8 x i16> @orrimm8h_lsl0(<8 x i16> %a) {
215 ; CHECK-LABEL: orrimm8h_lsl0:
217 ; CHECK-NEXT: orr v0.8h, #255
219 %tmp1 = or <8 x i16> %a, < i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255 >
223 define <8 x i16> @orrimm8h_lsl8(<8 x i16> %a) {
224 ; CHECK-LABEL: orrimm8h_lsl8:
226 ; CHECK-NEXT: orr v0.8h, #255, lsl #8
228 %tmp1 = or <8 x i16> %a, < i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280 >
232 define <2 x i32> @bicimm2s_lsl0(<2 x i32> %a) {
233 ; CHECK-LABEL: bicimm2s_lsl0:
235 ; CHECK-NEXT: bic v0.2s, #16
237 %tmp1 = and <2 x i32> %a, < i32 4294967279, i32 4294967279 >
241 define <2 x i32> @bicimm2s_lsl8(<2 x i32> %a) {
242 ; CHECK-LABEL: bicimm2s_lsl8:
244 ; CHECK-NEXT: bic v0.2s, #16, lsl #8
246 %tmp1 = and <2 x i32> %a, < i32 4294963199, i32 4294963199 >
250 define <2 x i32> @bicimm2s_lsl16(<2 x i32> %a) {
251 ; CHECK-LABEL: bicimm2s_lsl16:
253 ; CHECK-NEXT: bic v0.2s, #16, lsl #16
255 %tmp1 = and <2 x i32> %a, < i32 4293918719, i32 4293918719 >
259 define <2 x i32> @bicimm2s_lsl124(<2 x i32> %a) {
260 ; CHECK-LABEL: bicimm2s_lsl124:
262 ; CHECK-NEXT: bic v0.2s, #16, lsl #24
264 %tmp1 = and <2 x i32> %a, < i32 4026531839, i32 4026531839>
268 define <4 x i32> @bicimm4s_lsl0(<4 x i32> %a) {
269 ; CHECK-LABEL: bicimm4s_lsl0:
271 ; CHECK-NEXT: bic v0.4s, #16
273 %tmp1 = and <4 x i32> %a, < i32 4294967279, i32 4294967279, i32 4294967279, i32 4294967279 >
277 define <4 x i32> @bicimm4s_lsl8(<4 x i32> %a) {
278 ; CHECK-LABEL: bicimm4s_lsl8:
280 ; CHECK-NEXT: bic v0.4s, #16, lsl #8
282 %tmp1 = and <4 x i32> %a, < i32 4294963199, i32 4294963199, i32 4294963199, i32 4294963199 >
286 define <4 x i32> @bicimm4s_lsl16(<4 x i32> %a) {
287 ; CHECK-LABEL: bicimm4s_lsl16:
289 ; CHECK-NEXT: bic v0.4s, #16, lsl #16
291 %tmp1 = and <4 x i32> %a, < i32 4293918719, i32 4293918719, i32 4293918719, i32 4293918719 >
295 define <4 x i32> @bicimm4s_lsl124(<4 x i32> %a) {
296 ; CHECK-LABEL: bicimm4s_lsl124:
298 ; CHECK-NEXT: bic v0.4s, #16, lsl #24
300 %tmp1 = and <4 x i32> %a, < i32 4026531839, i32 4026531839, i32 4026531839, i32 4026531839>
304 define <4 x i16> @bicimm4h_lsl0_a(<4 x i16> %a) {
305 ; CHECK-LABEL: bicimm4h_lsl0_a:
307 ; CHECK-NEXT: bic v0.4h, #16
309 %tmp1 = and <4 x i16> %a, < i16 4294967279, i16 4294967279, i16 4294967279, i16 4294967279 >
313 define <4 x i16> @bicimm4h_lsl0_b(<4 x i16> %a) {
314 ; CHECK-LABEL: bicimm4h_lsl0_b:
316 ; CHECK-NEXT: bic v0.4h, #255
318 %tmp1 = and <4 x i16> %a, < i16 65280, i16 65280, i16 65280, i16 65280 >
322 define <4 x i16> @bicimm4h_lsl8_a(<4 x i16> %a) {
323 ; CHECK-LABEL: bicimm4h_lsl8_a:
325 ; CHECK-NEXT: bic v0.4h, #16, lsl #8
327 %tmp1 = and <4 x i16> %a, < i16 4294963199, i16 4294963199, i16 4294963199, i16 4294963199>
331 define <4 x i16> @bicimm4h_lsl8_b(<4 x i16> %a) {
332 ; CHECK-LABEL: bicimm4h_lsl8_b:
334 ; CHECK-NEXT: bic v0.4h, #255, lsl #8
336 %tmp1 = and <4 x i16> %a, < i16 255, i16 255, i16 255, i16 255>
340 define <8 x i16> @bicimm8h_lsl0_a(<8 x i16> %a) {
341 ; CHECK-LABEL: bicimm8h_lsl0_a:
343 ; CHECK-NEXT: bic v0.8h, #16
345 %tmp1 = and <8 x i16> %a, < i16 4294967279, i16 4294967279, i16 4294967279, i16 4294967279,
346 i16 4294967279, i16 4294967279, i16 4294967279, i16 4294967279 >
350 define <8 x i16> @bicimm8h_lsl0_b(<8 x i16> %a) {
351 ; CHECK-LABEL: bicimm8h_lsl0_b:
353 ; CHECK-NEXT: bic v0.8h, #255
355 %tmp1 = and <8 x i16> %a, < i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280 >
359 define <8 x i16> @bicimm8h_lsl8_a(<8 x i16> %a) {
360 ; CHECK-LABEL: bicimm8h_lsl8_a:
362 ; CHECK-NEXT: bic v0.8h, #16, lsl #8
364 %tmp1 = and <8 x i16> %a, < i16 4294963199, i16 4294963199, i16 4294963199, i16 4294963199,
365 i16 4294963199, i16 4294963199, i16 4294963199, i16 4294963199>
369 define <8 x i16> @bicimm8h_lsl8_b(<8 x i16> %a) {
370 ; CHECK-LABEL: bicimm8h_lsl8_b:
372 ; CHECK-NEXT: bic v0.8h, #255, lsl #8
374 %tmp1 = and <8 x i16> %a, < i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255>
378 define <2 x i32> @and2xi32(<2 x i32> %a, <2 x i32> %b) {
379 ; CHECK-LABEL: and2xi32:
381 ; CHECK-NEXT: and v0.8b, v0.8b, v1.8b
383 %tmp1 = and <2 x i32> %a, %b;
387 define <4 x i16> @and4xi16(<4 x i16> %a, <4 x i16> %b) {
388 ; CHECK-LABEL: and4xi16:
390 ; CHECK-NEXT: and v0.8b, v0.8b, v1.8b
392 %tmp1 = and <4 x i16> %a, %b;
396 define <1 x i64> @and1xi64(<1 x i64> %a, <1 x i64> %b) {
397 ; CHECK-LABEL: and1xi64:
399 ; CHECK-NEXT: and v0.8b, v0.8b, v1.8b
401 %tmp1 = and <1 x i64> %a, %b;
405 define <4 x i32> @and4xi32(<4 x i32> %a, <4 x i32> %b) {
406 ; CHECK-LABEL: and4xi32:
408 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
410 %tmp1 = and <4 x i32> %a, %b;
414 define <8 x i16> @and8xi16(<8 x i16> %a, <8 x i16> %b) {
415 ; CHECK-LABEL: and8xi16:
417 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
419 %tmp1 = and <8 x i16> %a, %b;
423 define <2 x i64> @and2xi64(<2 x i64> %a, <2 x i64> %b) {
424 ; CHECK-LABEL: and2xi64:
426 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
428 %tmp1 = and <2 x i64> %a, %b;
432 define <2 x i32> @orr2xi32(<2 x i32> %a, <2 x i32> %b) {
433 ; CHECK-LABEL: orr2xi32:
435 ; CHECK-NEXT: orr v0.8b, v0.8b, v1.8b
437 %tmp1 = or <2 x i32> %a, %b;
441 define <4 x i16> @orr4xi16(<4 x i16> %a, <4 x i16> %b) {
442 ; CHECK-LABEL: orr4xi16:
444 ; CHECK-NEXT: orr v0.8b, v0.8b, v1.8b
446 %tmp1 = or <4 x i16> %a, %b;
450 define <1 x i64> @orr1xi64(<1 x i64> %a, <1 x i64> %b) {
451 ; CHECK-LABEL: orr1xi64:
453 ; CHECK-NEXT: orr v0.8b, v0.8b, v1.8b
455 %tmp1 = or <1 x i64> %a, %b;
459 define <4 x i32> @orr4xi32(<4 x i32> %a, <4 x i32> %b) {
460 ; CHECK-LABEL: orr4xi32:
462 ; CHECK-NEXT: orr v0.16b, v0.16b, v1.16b
464 %tmp1 = or <4 x i32> %a, %b;
468 define <8 x i16> @orr8xi16(<8 x i16> %a, <8 x i16> %b) {
469 ; CHECK-LABEL: orr8xi16:
471 ; CHECK-NEXT: orr v0.16b, v0.16b, v1.16b
473 %tmp1 = or <8 x i16> %a, %b;
477 define <2 x i64> @orr2xi64(<2 x i64> %a, <2 x i64> %b) {
478 ; CHECK-LABEL: orr2xi64:
480 ; CHECK-NEXT: orr v0.16b, v0.16b, v1.16b
482 %tmp1 = or <2 x i64> %a, %b;
486 define <2 x i32> @eor2xi32(<2 x i32> %a, <2 x i32> %b) {
487 ; CHECK-LABEL: eor2xi32:
489 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
491 %tmp1 = xor <2 x i32> %a, %b;
495 define <4 x i16> @eor4xi16(<4 x i16> %a, <4 x i16> %b) {
496 ; CHECK-LABEL: eor4xi16:
498 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
500 %tmp1 = xor <4 x i16> %a, %b;
504 define <1 x i64> @eor1xi64(<1 x i64> %a, <1 x i64> %b) {
505 ; CHECK-LABEL: eor1xi64:
507 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
509 %tmp1 = xor <1 x i64> %a, %b;
513 define <4 x i32> @eor4xi32(<4 x i32> %a, <4 x i32> %b) {
514 ; CHECK-LABEL: eor4xi32:
516 ; CHECK-NEXT: eor v0.16b, v0.16b, v1.16b
518 %tmp1 = xor <4 x i32> %a, %b;
522 define <8 x i16> @eor8xi16(<8 x i16> %a, <8 x i16> %b) {
523 ; CHECK-LABEL: eor8xi16:
525 ; CHECK-NEXT: eor v0.16b, v0.16b, v1.16b
527 %tmp1 = xor <8 x i16> %a, %b;
531 define <2 x i64> @eor2xi64(<2 x i64> %a, <2 x i64> %b) {
532 ; CHECK-LABEL: eor2xi64:
534 ; CHECK-NEXT: eor v0.16b, v0.16b, v1.16b
536 %tmp1 = xor <2 x i64> %a, %b;
541 define <2 x i32> @bic2xi32(<2 x i32> %a, <2 x i32> %b) {
542 ; CHECK-LABEL: bic2xi32:
544 ; CHECK-NEXT: bic v0.8b, v0.8b, v1.8b
546 %tmp1 = xor <2 x i32> %b, < i32 -1, i32 -1 >
547 %tmp2 = and <2 x i32> %a, %tmp1
551 define <4 x i16> @bic4xi16(<4 x i16> %a, <4 x i16> %b) {
552 ; CHECK-LABEL: bic4xi16:
554 ; CHECK-NEXT: bic v0.8b, v0.8b, v1.8b
556 %tmp1 = xor <4 x i16> %b, < i16 -1, i16 -1, i16 -1, i16-1 >
557 %tmp2 = and <4 x i16> %a, %tmp1
561 define <1 x i64> @bic1xi64(<1 x i64> %a, <1 x i64> %b) {
562 ; CHECK-LABEL: bic1xi64:
564 ; CHECK-NEXT: bic v0.8b, v0.8b, v1.8b
566 %tmp1 = xor <1 x i64> %b, < i64 -1>
567 %tmp2 = and <1 x i64> %a, %tmp1
571 define <4 x i32> @bic4xi32(<4 x i32> %a, <4 x i32> %b) {
572 ; CHECK-LABEL: bic4xi32:
574 ; CHECK-NEXT: bic v0.16b, v0.16b, v1.16b
576 %tmp1 = xor <4 x i32> %b, < i32 -1, i32 -1, i32 -1, i32 -1>
577 %tmp2 = and <4 x i32> %a, %tmp1
581 define <8 x i16> @bic8xi16(<8 x i16> %a, <8 x i16> %b) {
582 ; CHECK-LABEL: bic8xi16:
584 ; CHECK-NEXT: bic v0.16b, v0.16b, v1.16b
586 %tmp1 = xor <8 x i16> %b, < i16 -1, i16 -1, i16 -1, i16-1, i16 -1, i16 -1, i16 -1, i16 -1 >
587 %tmp2 = and <8 x i16> %a, %tmp1
591 define <2 x i64> @bic2xi64(<2 x i64> %a, <2 x i64> %b) {
592 ; CHECK-LABEL: bic2xi64:
594 ; CHECK-NEXT: bic v0.16b, v0.16b, v1.16b
596 %tmp1 = xor <2 x i64> %b, < i64 -1, i64 -1>
597 %tmp2 = and <2 x i64> %a, %tmp1
601 define <2 x i32> @orn2xi32(<2 x i32> %a, <2 x i32> %b) {
602 ; CHECK-LABEL: orn2xi32:
604 ; CHECK-NEXT: orn v0.8b, v0.8b, v1.8b
606 %tmp1 = xor <2 x i32> %b, < i32 -1, i32 -1 >
607 %tmp2 = or <2 x i32> %a, %tmp1
611 define <4 x i16> @orn4xi16(<4 x i16> %a, <4 x i16> %b) {
612 ; CHECK-LABEL: orn4xi16:
614 ; CHECK-NEXT: orn v0.8b, v0.8b, v1.8b
616 %tmp1 = xor <4 x i16> %b, < i16 -1, i16 -1, i16 -1, i16-1 >
617 %tmp2 = or <4 x i16> %a, %tmp1
621 define <1 x i64> @orn1xi64(<1 x i64> %a, <1 x i64> %b) {
622 ; CHECK-LABEL: orn1xi64:
624 ; CHECK-NEXT: orn v0.8b, v0.8b, v1.8b
626 %tmp1 = xor <1 x i64> %b, < i64 -1>
627 %tmp2 = or <1 x i64> %a, %tmp1
631 define <4 x i32> @orn4xi32(<4 x i32> %a, <4 x i32> %b) {
632 ; CHECK-LABEL: orn4xi32:
634 ; CHECK-NEXT: orn v0.16b, v0.16b, v1.16b
636 %tmp1 = xor <4 x i32> %b, < i32 -1, i32 -1, i32 -1, i32 -1>
637 %tmp2 = or <4 x i32> %a, %tmp1
641 define <8 x i16> @orn8xi16(<8 x i16> %a, <8 x i16> %b) {
642 ; CHECK-LABEL: orn8xi16:
644 ; CHECK-NEXT: orn v0.16b, v0.16b, v1.16b
646 %tmp1 = xor <8 x i16> %b, < i16 -1, i16 -1, i16 -1, i16-1, i16 -1, i16 -1, i16 -1, i16 -1 >
647 %tmp2 = or <8 x i16> %a, %tmp1
651 define <2 x i64> @orn2xi64(<2 x i64> %a, <2 x i64> %b) {
652 ; CHECK-LABEL: orn2xi64:
654 ; CHECK-NEXT: orn v0.16b, v0.16b, v1.16b
656 %tmp1 = xor <2 x i64> %b, < i64 -1, i64 -1>
657 %tmp2 = or <2 x i64> %a, %tmp1
661 define <2 x i32> @bsl2xi32_const(<2 x i32> %a, <2 x i32> %b) {
662 ; CHECK-LABEL: bsl2xi32_const:
664 ; CHECK-NEXT: movi d2, #0x000000ffffffff
665 ; CHECK-NEXT: bif v0.8b, v1.8b, v2.8b
667 %tmp1 = and <2 x i32> %a, < i32 -1, i32 0 >
668 %tmp2 = and <2 x i32> %b, < i32 0, i32 -1 >
669 %tmp3 = or <2 x i32> %tmp1, %tmp2
674 define <4 x i16> @bsl4xi16_const(<4 x i16> %a, <4 x i16> %b) {
675 ; CHECK-LABEL: bsl4xi16_const:
677 ; CHECK-NEXT: movi d2, #0x00ffff0000ffff
678 ; CHECK-NEXT: bif v0.8b, v1.8b, v2.8b
680 %tmp1 = and <4 x i16> %a, < i16 -1, i16 0, i16 -1,i16 0 >
681 %tmp2 = and <4 x i16> %b, < i16 0, i16 -1,i16 0, i16 -1 >
682 %tmp3 = or <4 x i16> %tmp1, %tmp2
686 define <1 x i64> @bsl1xi64_const(<1 x i64> %a, <1 x i64> %b) {
687 ; CHECK-LABEL: bsl1xi64_const:
689 ; CHECK-NEXT: movi d2, #0xffffffffffffff00
690 ; CHECK-NEXT: bif v0.8b, v1.8b, v2.8b
692 %tmp1 = and <1 x i64> %a, < i64 -256 >
693 %tmp2 = and <1 x i64> %b, < i64 255 >
694 %tmp3 = or <1 x i64> %tmp1, %tmp2
698 define <4 x i32> @bsl4xi32_const(<4 x i32> %a, <4 x i32> %b) {
699 ; CHECK-LABEL: bsl4xi32_const:
701 ; CHECK-NEXT: movi v2.2d, #0x000000ffffffff
702 ; CHECK-NEXT: bif v0.16b, v1.16b, v2.16b
704 %tmp1 = and <4 x i32> %a, < i32 -1, i32 0, i32 -1, i32 0 >
705 %tmp2 = and <4 x i32> %b, < i32 0, i32 -1, i32 0, i32 -1 >
706 %tmp3 = or <4 x i32> %tmp1, %tmp2
710 define <8 x i16> @bsl8xi16_const(<8 x i16> %a, <8 x i16> %b) {
711 ; CHECK-LABEL: bsl8xi16_const:
713 ; CHECK-NEXT: movi v2.2d, #0x000000ffffffff
714 ; CHECK-NEXT: bif v0.16b, v1.16b, v2.16b
716 %tmp1 = and <8 x i16> %a, < i16 -1, i16 -1, i16 0,i16 0, i16 -1, i16 -1, i16 0,i16 0 >
717 %tmp2 = and <8 x i16> %b, < i16 0, i16 0, i16 -1, i16 -1, i16 0, i16 0, i16 -1, i16 -1 >
718 %tmp3 = or <8 x i16> %tmp1, %tmp2
722 define <2 x i64> @bsl2xi64_const(<2 x i64> %a, <2 x i64> %b) {
723 ; CHECK-LABEL: bsl2xi64_const:
725 ; CHECK-NEXT: adrp x8, .LCPI75_0
726 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI75_0]
727 ; CHECK-NEXT: bif v0.16b, v1.16b, v2.16b
729 %tmp1 = and <2 x i64> %a, < i64 -1, i64 0 >
730 %tmp2 = and <2 x i64> %b, < i64 0, i64 -1 >
731 %tmp3 = or <2 x i64> %tmp1, %tmp2
736 define <8 x i8> @bsl8xi8(<8 x i8> %v1, <8 x i8> %v2, <8 x i8> %v3) {
737 ; CHECK-LABEL: bsl8xi8:
739 ; CHECK-NEXT: bsl v0.8b, v1.8b, v2.8b
741 %1 = and <8 x i8> %v1, %v2
742 %2 = xor <8 x i8> %v1, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
743 %3 = and <8 x i8> %2, %v3
744 %4 = or <8 x i8> %1, %3
748 define <4 x i16> @bsl4xi16(<4 x i16> %v1, <4 x i16> %v2, <4 x i16> %v3) {
749 ; CHECK-LABEL: bsl4xi16:
751 ; CHECK-NEXT: bsl v0.8b, v1.8b, v2.8b
753 %1 = and <4 x i16> %v1, %v2
754 %2 = xor <4 x i16> %v1, <i16 -1, i16 -1, i16 -1, i16 -1>
755 %3 = and <4 x i16> %2, %v3
756 %4 = or <4 x i16> %1, %3
760 define <2 x i32> @bsl2xi32(<2 x i32> %v1, <2 x i32> %v2, <2 x i32> %v3) {
761 ; CHECK-LABEL: bsl2xi32:
763 ; CHECK-NEXT: bsl v0.8b, v1.8b, v2.8b
765 %1 = and <2 x i32> %v1, %v2
766 %2 = xor <2 x i32> %v1, <i32 -1, i32 -1>
767 %3 = and <2 x i32> %2, %v3
768 %4 = or <2 x i32> %1, %3
772 define <1 x i64> @bsl1xi64(<1 x i64> %v1, <1 x i64> %v2, <1 x i64> %v3) {
773 ; CHECK-LABEL: bsl1xi64:
775 ; CHECK-NEXT: bsl v0.8b, v1.8b, v2.8b
777 %1 = and <1 x i64> %v1, %v2
778 %2 = xor <1 x i64> %v1, <i64 -1>
779 %3 = and <1 x i64> %2, %v3
780 %4 = or <1 x i64> %1, %3
784 define <16 x i8> @bsl16xi8(<16 x i8> %v1, <16 x i8> %v2, <16 x i8> %v3) {
785 ; CHECK-LABEL: bsl16xi8:
787 ; CHECK-NEXT: bsl v0.16b, v1.16b, v2.16b
789 %1 = and <16 x i8> %v1, %v2
790 %2 = xor <16 x i8> %v1, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
791 %3 = and <16 x i8> %2, %v3
792 %4 = or <16 x i8> %1, %3
796 define <8 x i16> @bsl8xi16(<8 x i16> %v1, <8 x i16> %v2, <8 x i16> %v3) {
797 ; CHECK-LABEL: bsl8xi16:
799 ; CHECK-NEXT: bsl v0.16b, v1.16b, v2.16b
801 %1 = and <8 x i16> %v1, %v2
802 %2 = xor <8 x i16> %v1, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
803 %3 = and <8 x i16> %2, %v3
804 %4 = or <8 x i16> %1, %3
808 define <4 x i32> @bsl4xi32(<4 x i32> %v1, <4 x i32> %v2, <4 x i32> %v3) {
809 ; CHECK-LABEL: bsl4xi32:
811 ; CHECK-NEXT: bsl v0.16b, v1.16b, v2.16b
813 %1 = and <4 x i32> %v1, %v2
814 %2 = xor <4 x i32> %v1, <i32 -1, i32 -1, i32 -1, i32 -1>
815 %3 = and <4 x i32> %2, %v3
816 %4 = or <4 x i32> %1, %3
820 define <8 x i8> @vselect_constant_cond_zero_v8i8(<8 x i8> %a) {
821 ; CHECK-LABEL: vselect_constant_cond_zero_v8i8:
823 ; CHECK-NEXT: movi d1, #0x00000000ff00ff
824 ; CHECK-NEXT: and v0.8b, v0.8b, v1.8b
825 ; CHECK-NEXT: orr v0.2s, #0
827 %b = select <8 x i1> <i1 true, i1 false, i1 true, i1 false, i1 false, i1 false, i1 false, i1 false>, <8 x i8> %a, <8 x i8> zeroinitializer
831 define <4 x i16> @vselect_constant_cond_zero_v4i16(<4 x i16> %a) {
832 ; CHECK-LABEL: vselect_constant_cond_zero_v4i16:
834 ; CHECK-NEXT: movi d1, #0xffff00000000ffff
835 ; CHECK-NEXT: and v0.8b, v0.8b, v1.8b
836 ; CHECK-NEXT: orr v0.2s, #0
838 %b = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i16> %a, <4 x i16> zeroinitializer
842 define <4 x i32> @vselect_constant_cond_zero_v4i32(<4 x i32> %a) {
843 ; CHECK-LABEL: vselect_constant_cond_zero_v4i32:
845 ; CHECK-NEXT: adrp x8, .LCPI85_0
846 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI85_0]
847 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
848 ; CHECK-NEXT: orr v0.4s, #0
850 %b = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i32> %a, <4 x i32> zeroinitializer
854 define <8 x i8> @vselect_constant_cond_v8i8(<8 x i8> %a, <8 x i8> %b) {
855 ; CHECK-LABEL: vselect_constant_cond_v8i8:
857 ; CHECK-NEXT: movi d2, #0xffffffffff00ff00
858 ; CHECK-NEXT: movi d3, #0x00000000ff00ff
859 ; CHECK-NEXT: and v1.8b, v1.8b, v2.8b
860 ; CHECK-NEXT: and v0.8b, v0.8b, v3.8b
861 ; CHECK-NEXT: orr v0.8b, v0.8b, v1.8b
863 %c = select <8 x i1> <i1 true, i1 false, i1 true, i1 false, i1 false, i1 false, i1 false, i1 false>, <8 x i8> %a, <8 x i8> %b
867 define <4 x i16> @vselect_constant_cond_v4i16(<4 x i16> %a, <4 x i16> %b) {
868 ; CHECK-LABEL: vselect_constant_cond_v4i16:
870 ; CHECK-NEXT: movi d2, #0x00ffffffff0000
871 ; CHECK-NEXT: movi d3, #0xffff00000000ffff
872 ; CHECK-NEXT: and v1.8b, v1.8b, v2.8b
873 ; CHECK-NEXT: and v0.8b, v0.8b, v3.8b
874 ; CHECK-NEXT: orr v0.8b, v0.8b, v1.8b
876 %c = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i16> %a, <4 x i16> %b
880 define <4 x i32> @vselect_constant_cond_v4i32(<4 x i32> %a, <4 x i32> %b) {
881 ; CHECK-LABEL: vselect_constant_cond_v4i32:
883 ; CHECK-NEXT: adrp x8, .LCPI88_0
884 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI88_0]
885 ; CHECK-NEXT: bif v0.16b, v1.16b, v2.16b
887 %c = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i32> %a, <4 x i32> %b
891 define <8 x i8> @vselect_equivalent_shuffle_v8i8(<8 x i8> %a, <8 x i8> %b) {
892 ; CHECK-LABEL: vselect_equivalent_shuffle_v8i8:
894 ; CHECK-NEXT: adrp x8, .LCPI89_0
895 ; CHECK-NEXT: ldr d2, [x8, :lo12:.LCPI89_0]
896 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
897 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $q1
898 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
899 ; CHECK-NEXT: tbl v0.8b, { v0.16b }, v2.8b
901 %c = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 9, i32 4, i32 5, i32 6, i32 7>
905 define <8 x i16> @vselect_equivalent_shuffle_v8i16(<8 x i16> %a, <8 x i16> %b) {
906 ; CHECK-LABEL: vselect_equivalent_shuffle_v8i16:
908 ; CHECK-NEXT: adrp x8, .LCPI90_0
909 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI90_0]
910 ; CHECK-NEXT: // kill: def $q1 killed $q1 killed $q0_q1 def $q0_q1
911 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $q0_q1 def $q0_q1
912 ; CHECK-NEXT: tbl v0.16b, { v0.16b, v1.16b }, v2.16b
914 %c = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 9, i32 4, i32 5, i32 6, i32 7>
918 define <4 x i16> @vselect_equivalent_shuffle_v4i16(<4 x i16> %a, <4 x i16> %b) {
919 ; CHECK-LABEL: vselect_equivalent_shuffle_v4i16:
921 ; CHECK-NEXT: ext v0.8b, v0.8b, v0.8b, #2
922 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #4
923 ; CHECK-NEXT: ext v0.8b, v0.8b, v0.8b, #2
925 %c = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 0, i32 4, i32 5, i32 3>
929 define <4 x i32> @vselect_equivalent_shuffle_v4i32(<4 x i32> %a, <4 x i32> %b) {
930 ; CHECK-LABEL: vselect_equivalent_shuffle_v4i32:
932 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #4
933 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #8
934 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #4
936 %c = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 5, i32 3>
940 define <8 x i8> @vselect_cmp_ne(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) {
941 ; CHECK-LABEL: vselect_cmp_ne:
943 ; CHECK-NEXT: cmeq v0.8b, v0.8b, v1.8b
944 ; CHECK-NEXT: bsl v0.8b, v2.8b, v1.8b
946 %cmp = icmp ne <8 x i8> %a, %b
947 %d = select <8 x i1> %cmp, <8 x i8> %b, <8 x i8> %c
951 define <8 x i8> @vselect_cmp_eq(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) {
952 ; CHECK-LABEL: vselect_cmp_eq:
954 ; CHECK-NEXT: cmeq v0.8b, v0.8b, v1.8b
955 ; CHECK-NEXT: bsl v0.8b, v1.8b, v2.8b
957 %cmp = icmp eq <8 x i8> %a, %b
958 %d = select <8 x i1> %cmp, <8 x i8> %b, <8 x i8> %c
962 define <8 x i8> @vselect_cmpz_ne(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) {
963 ; CHECK-LABEL: vselect_cmpz_ne:
965 ; CHECK-NEXT: cmeq v0.8b, v0.8b, #0
966 ; CHECK-NEXT: bsl v0.8b, v2.8b, v1.8b
968 %cmp = icmp ne <8 x i8> %a, zeroinitializer
969 %d = select <8 x i1> %cmp, <8 x i8> %b, <8 x i8> %c
973 define <8 x i8> @vselect_cmpz_eq(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) {
974 ; CHECK-LABEL: vselect_cmpz_eq:
976 ; CHECK-NEXT: cmeq v0.8b, v0.8b, #0
977 ; CHECK-NEXT: bsl v0.8b, v1.8b, v2.8b
979 %cmp = icmp eq <8 x i8> %a, zeroinitializer
980 %d = select <8 x i1> %cmp, <8 x i8> %b, <8 x i8> %c
984 define <8 x i8> @vselect_tst(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) {
985 ; CHECK-LABEL: vselect_tst:
987 ; CHECK-NEXT: and v0.8b, v0.8b, v1.8b
988 ; CHECK-NEXT: cmeq v0.8b, v0.8b, #0
989 ; CHECK-NEXT: bsl v0.8b, v2.8b, v1.8b
991 %tmp3 = and <8 x i8> %a, %b
992 %tmp4 = icmp eq <8 x i8> %tmp3, zeroinitializer
993 %d = select <8 x i1> %tmp4, <8 x i8> %c, <8 x i8> %b
997 define <8 x i8> @sext_tst(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c) {
998 ; CHECK-LABEL: sext_tst:
1000 ; CHECK-NEXT: cmtst v0.8b, v0.8b, v1.8b
1002 %tmp3 = and <8 x i8> %a, %b
1003 %tmp4 = icmp ne <8 x i8> %tmp3, zeroinitializer
1004 %d = sext <8 x i1> %tmp4 to <8 x i8>
1008 define <2 x i64> @bsl2xi64(<2 x i64> %v1, <2 x i64> %v2, <2 x i64> %v3) {
1009 ; CHECK-LABEL: bsl2xi64:
1011 ; CHECK-NEXT: bsl v0.16b, v1.16b, v2.16b
1013 %1 = and <2 x i64> %v1, %v2
1014 %2 = xor <2 x i64> %v1, <i64 -1, i64 -1>
1015 %3 = and <2 x i64> %2, %v3
1016 %4 = or <2 x i64> %1, %3
1020 define <8 x i8> @orrimm8b_as_orrimm4h_lsl0(<8 x i8> %a) {
1021 ; CHECK-LABEL: orrimm8b_as_orrimm4h_lsl0:
1023 ; CHECK-NEXT: orr v0.4h, #255
1025 %val = or <8 x i8> %a, <i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0>
1029 define <8 x i8> @orrimm8b_as_orimm4h_lsl8(<8 x i8> %a) {
1030 ; CHECK-LABEL: orrimm8b_as_orimm4h_lsl8:
1032 ; CHECK-NEXT: orr v0.4h, #255, lsl #8
1034 %val = or <8 x i8> %a, <i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255>
1038 define <16 x i8> @orimm16b_as_orrimm8h_lsl0(<16 x i8> %a) {
1039 ; CHECK-LABEL: orimm16b_as_orrimm8h_lsl0:
1041 ; CHECK-NEXT: orr v0.8h, #255
1043 %val = or <16 x i8> %a, <i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0>
1047 define <16 x i8> @orimm16b_as_orrimm8h_lsl8(<16 x i8> %a) {
1048 ; CHECK-LABEL: orimm16b_as_orrimm8h_lsl8:
1050 ; CHECK-NEXT: orr v0.8h, #255, lsl #8
1052 %val = or <16 x i8> %a, <i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255>
1056 define <8 x i8> @and8imm2s_lsl0(<8 x i8> %a) {
1057 ; CHECK-LABEL: and8imm2s_lsl0:
1059 ; CHECK-NEXT: bic v0.2s, #255
1061 %tmp1 = and <8 x i8> %a, < i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255>
1065 define <8 x i8> @and8imm2s_lsl8(<8 x i8> %a) {
1066 ; CHECK-LABEL: and8imm2s_lsl8:
1068 ; CHECK-NEXT: bic v0.2s, #255, lsl #8
1070 %tmp1 = and <8 x i8> %a, < i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255>
1074 define <8 x i8> @and8imm2s_lsl16(<8 x i8> %a) {
1075 ; CHECK-LABEL: and8imm2s_lsl16:
1077 ; CHECK-NEXT: bic v0.2s, #255, lsl #16
1079 %tmp1 = and <8 x i8> %a, < i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255>
1083 define <8 x i8> @and8imm2s_lsl24(<8 x i8> %a) {
1084 ; CHECK-LABEL: and8imm2s_lsl24:
1086 ; CHECK-NEXT: bic v0.2s, #254, lsl #24
1088 %tmp1 = and <8 x i8> %a, < i8 255, i8 255, i8 255, i8 1, i8 255, i8 255, i8 255, i8 1>
1092 define <4 x i16> @and16imm2s_lsl0(<4 x i16> %a) {
1093 ; CHECK-LABEL: and16imm2s_lsl0:
1095 ; CHECK-NEXT: bic v0.2s, #255
1097 %tmp1 = and <4 x i16> %a, < i16 65280, i16 65535, i16 65280, i16 65535>
1101 define <4 x i16> @and16imm2s_lsl8(<4 x i16> %a) {
1102 ; CHECK-LABEL: and16imm2s_lsl8:
1104 ; CHECK-NEXT: bic v0.2s, #255, lsl #8
1106 %tmp1 = and <4 x i16> %a, < i16 255, i16 65535, i16 255, i16 65535>
1110 define <4 x i16> @and16imm2s_lsl16(<4 x i16> %a) {
1111 ; CHECK-LABEL: and16imm2s_lsl16:
1113 ; CHECK-NEXT: bic v0.2s, #255, lsl #16
1115 %tmp1 = and <4 x i16> %a, < i16 65535, i16 65280, i16 65535, i16 65280>
1119 define <4 x i16> @and16imm2s_lsl24(<4 x i16> %a) {
1120 ; CHECK-LABEL: and16imm2s_lsl24:
1122 ; CHECK-NEXT: bic v0.2s, #254, lsl #24
1124 %tmp1 = and <4 x i16> %a, < i16 65535, i16 511, i16 65535, i16 511>
1129 define <1 x i64> @and64imm2s_lsl0(<1 x i64> %a) {
1130 ; CHECK-LABEL: and64imm2s_lsl0:
1132 ; CHECK-NEXT: bic v0.2s, #255
1134 %tmp1 = and <1 x i64> %a, < i64 -1095216660736>
1138 define <1 x i64> @and64imm2s_lsl8(<1 x i64> %a) {
1139 ; CHECK-LABEL: and64imm2s_lsl8:
1141 ; CHECK-NEXT: bic v0.2s, #255, lsl #8
1143 %tmp1 = and <1 x i64> %a, < i64 -280375465148161>
1147 define <1 x i64> @and64imm2s_lsl16(<1 x i64> %a) {
1148 ; CHECK-LABEL: and64imm2s_lsl16:
1150 ; CHECK-NEXT: bic v0.2s, #255, lsl #16
1152 %tmp1 = and <1 x i64> %a, < i64 -71776119077928961>
1156 define <1 x i64> @and64imm2s_lsl24(<1 x i64> %a) {
1157 ; CHECK-LABEL: and64imm2s_lsl24:
1159 ; CHECK-NEXT: bic v0.2s, #254, lsl #24
1161 %tmp1 = and <1 x i64> %a, < i64 144115183814443007>
1165 define <16 x i8> @and8imm4s_lsl0(<16 x i8> %a) {
1166 ; CHECK-LABEL: and8imm4s_lsl0:
1168 ; CHECK-NEXT: bic v0.4s, #255
1170 %tmp1 = and <16 x i8> %a, < i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255>
1174 define <16 x i8> @and8imm4s_lsl8(<16 x i8> %a) {
1175 ; CHECK-LABEL: and8imm4s_lsl8:
1177 ; CHECK-NEXT: bic v0.4s, #255, lsl #8
1179 %tmp1 = and <16 x i8> %a, < i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255>
1183 define <16 x i8> @and8imm4s_lsl16(<16 x i8> %a) {
1184 ; CHECK-LABEL: and8imm4s_lsl16:
1186 ; CHECK-NEXT: bic v0.4s, #255, lsl #16
1188 %tmp1 = and <16 x i8> %a, < i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255, i8 255, i8 255, i8 0, i8 255>
1192 define <16 x i8> @and8imm4s_lsl24(<16 x i8> %a) {
1193 ; CHECK-LABEL: and8imm4s_lsl24:
1195 ; CHECK-NEXT: bic v0.4s, #254, lsl #24
1197 %tmp1 = and <16 x i8> %a, < i8 255, i8 255, i8 255, i8 1, i8 255, i8 255, i8 255, i8 1, i8 255, i8 255, i8 255, i8 1, i8 255, i8 255, i8 255, i8 1>
1201 define <8 x i16> @and16imm4s_lsl0(<8 x i16> %a) {
1202 ; CHECK-LABEL: and16imm4s_lsl0:
1204 ; CHECK-NEXT: bic v0.4s, #255
1206 %tmp1 = and <8 x i16> %a, < i16 65280, i16 65535, i16 65280, i16 65535, i16 65280, i16 65535, i16 65280, i16 65535>
1210 define <8 x i16> @and16imm4s_lsl8(<8 x i16> %a) {
1211 ; CHECK-LABEL: and16imm4s_lsl8:
1213 ; CHECK-NEXT: bic v0.4s, #255, lsl #8
1215 %tmp1 = and <8 x i16> %a, < i16 255, i16 65535, i16 255, i16 65535, i16 255, i16 65535, i16 255, i16 65535>
1219 define <8 x i16> @and16imm4s_lsl16(<8 x i16> %a) {
1220 ; CHECK-LABEL: and16imm4s_lsl16:
1222 ; CHECK-NEXT: bic v0.4s, #255, lsl #16
1224 %tmp1 = and <8 x i16> %a, < i16 65535, i16 65280, i16 65535, i16 65280, i16 65535, i16 65280, i16 65535, i16 65280>
1228 define <8 x i16> @and16imm4s_lsl24(<8 x i16> %a) {
1229 ; CHECK-LABEL: and16imm4s_lsl24:
1231 ; CHECK-NEXT: bic v0.4s, #254, lsl #24
1233 %tmp1 = and <8 x i16> %a, < i16 65535, i16 511, i16 65535, i16 511, i16 65535, i16 511, i16 65535, i16 511>
1237 define <2 x i64> @and64imm4s_lsl0(<2 x i64> %a) {
1238 ; CHECK-LABEL: and64imm4s_lsl0:
1240 ; CHECK-NEXT: bic v0.4s, #255
1242 %tmp1 = and <2 x i64> %a, < i64 -1095216660736, i64 -1095216660736>
1246 define <2 x i64> @and64imm4s_lsl8(<2 x i64> %a) {
1247 ; CHECK-LABEL: and64imm4s_lsl8:
1249 ; CHECK-NEXT: bic v0.4s, #255, lsl #8
1251 %tmp1 = and <2 x i64> %a, < i64 -280375465148161, i64 -280375465148161>
1255 define <2 x i64> @and64imm4s_lsl16(<2 x i64> %a) {
1256 ; CHECK-LABEL: and64imm4s_lsl16:
1258 ; CHECK-NEXT: bic v0.4s, #255, lsl #16
1260 %tmp1 = and <2 x i64> %a, < i64 -71776119077928961, i64 -71776119077928961>
1264 define <2 x i64> @and64imm4s_lsl24(<2 x i64> %a) {
1265 ; CHECK-LABEL: and64imm4s_lsl24:
1267 ; CHECK-NEXT: bic v0.4s, #254, lsl #24
1269 %tmp1 = and <2 x i64> %a, < i64 144115183814443007, i64 144115183814443007>
1273 define <8 x i8> @and8imm4h_lsl0(<8 x i8> %a) {
1274 ; CHECK-LABEL: and8imm4h_lsl0:
1276 ; CHECK-NEXT: bic v0.4h, #255
1278 %tmp1 = and <8 x i8> %a, < i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255>
1282 define <8 x i8> @and8imm4h_lsl8(<8 x i8> %a) {
1283 ; CHECK-LABEL: and8imm4h_lsl8:
1285 ; CHECK-NEXT: bic v0.4h, #255, lsl #8
1287 %tmp1 = and <8 x i8> %a, < i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0>
1291 define <2 x i32> @and16imm4h_lsl0(<2 x i32> %a) {
1292 ; CHECK-LABEL: and16imm4h_lsl0:
1294 ; CHECK-NEXT: bic v0.4h, #255
1296 %tmp1 = and <2 x i32> %a, < i32 4278255360, i32 4278255360>
1300 define <2 x i32> @and16imm4h_lsl8(<2 x i32> %a) {
1301 ; CHECK-LABEL: and16imm4h_lsl8:
1303 ; CHECK-NEXT: bic v0.4h, #255, lsl #8
1305 %tmp1 = and <2 x i32> %a, < i32 16711935, i32 16711935>
1309 define <1 x i64> @and64imm4h_lsl0(<1 x i64> %a) {
1310 ; CHECK-LABEL: and64imm4h_lsl0:
1312 ; CHECK-NEXT: bic v0.4h, #255
1314 %tmp1 = and <1 x i64> %a, < i64 -71777214294589696>
1318 define <1 x i64> @and64imm4h_lsl8(<1 x i64> %a) {
1319 ; CHECK-LABEL: and64imm4h_lsl8:
1321 ; CHECK-NEXT: bic v0.4h, #255, lsl #8
1323 %tmp1 = and <1 x i64> %a, < i64 71777214294589695>
1327 define <16 x i8> @and8imm8h_lsl0(<16 x i8> %a) {
1328 ; CHECK-LABEL: and8imm8h_lsl0:
1330 ; CHECK-NEXT: bic v0.8h, #255
1332 %tmp1 = and <16 x i8> %a, < i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255 >
1336 define <16 x i8> @and8imm8h_lsl8(<16 x i8> %a) {
1337 ; CHECK-LABEL: and8imm8h_lsl8:
1339 ; CHECK-NEXT: bic v0.8h, #255, lsl #8
1341 %tmp1 = and <16 x i8> %a, <i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0 >
1345 define <4 x i32> @and16imm8h_lsl0(<4 x i32> %a) {
1346 ; CHECK-LABEL: and16imm8h_lsl0:
1348 ; CHECK-NEXT: bic v0.8h, #255
1350 %tmp1 = and <4 x i32> %a, < i32 4278255360, i32 4278255360, i32 4278255360, i32 4278255360>
1354 define <4 x i32> @and16imm8h_lsl8(<4 x i32> %a) {
1355 ; CHECK-LABEL: and16imm8h_lsl8:
1357 ; CHECK-NEXT: bic v0.8h, #255, lsl #8
1359 %tmp1 = and <4 x i32> %a, < i32 16711935, i32 16711935, i32 16711935, i32 16711935>
1363 define <2 x i64> @and64imm8h_lsl0(<2 x i64> %a) {
1364 ; CHECK-LABEL: and64imm8h_lsl0:
1366 ; CHECK-NEXT: bic v0.8h, #255
1368 %tmp1 = and <2 x i64> %a, < i64 -71777214294589696, i64 -71777214294589696>
1372 define <2 x i64> @and64imm8h_lsl8(<2 x i64> %a) {
1373 ; CHECK-LABEL: and64imm8h_lsl8:
1375 ; CHECK-NEXT: bic v0.8h, #255, lsl #8
1377 %tmp1 = and <2 x i64> %a, < i64 71777214294589695, i64 71777214294589695>
1381 define <8 x i8> @orr8imm2s_lsl0(<8 x i8> %a) {
1382 ; CHECK-LABEL: orr8imm2s_lsl0:
1384 ; CHECK-NEXT: orr v0.2s, #255
1386 %tmp1 = or <8 x i8> %a, < i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0>
1390 define <8 x i8> @orr8imm2s_lsl8(<8 x i8> %a) {
1391 ; CHECK-LABEL: orr8imm2s_lsl8:
1393 ; CHECK-NEXT: orr v0.2s, #255, lsl #8
1395 %tmp1 = or <8 x i8> %a, < i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0>
1399 define <8 x i8> @orr8imm2s_lsl16(<8 x i8> %a) {
1400 ; CHECK-LABEL: orr8imm2s_lsl16:
1402 ; CHECK-NEXT: orr v0.2s, #255, lsl #16
1404 %tmp1 = or <8 x i8> %a, < i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0>
1408 define <8 x i8> @orr8imm2s_lsl24(<8 x i8> %a) {
1409 ; CHECK-LABEL: orr8imm2s_lsl24:
1411 ; CHECK-NEXT: orr v0.2s, #255, lsl #24
1413 %tmp1 = or <8 x i8> %a, < i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255>
1417 define <4 x i16> @orr16imm2s_lsl0(<4 x i16> %a) {
1418 ; CHECK-LABEL: orr16imm2s_lsl0:
1420 ; CHECK-NEXT: orr v0.2s, #255
1422 %tmp1 = or <4 x i16> %a, < i16 255, i16 0, i16 255, i16 0>
1426 define <4 x i16> @orr16imm2s_lsl8(<4 x i16> %a) {
1427 ; CHECK-LABEL: orr16imm2s_lsl8:
1429 ; CHECK-NEXT: orr v0.2s, #255, lsl #8
1431 %tmp1 = or <4 x i16> %a, < i16 65280, i16 0, i16 65280, i16 0>
1435 define <4 x i16> @orr16imm2s_lsl16(<4 x i16> %a) {
1436 ; CHECK-LABEL: orr16imm2s_lsl16:
1438 ; CHECK-NEXT: orr v0.2s, #255, lsl #16
1440 %tmp1 = or <4 x i16> %a, < i16 0, i16 255, i16 0, i16 255>
1444 define <4 x i16> @orr16imm2s_lsl24(<4 x i16> %a) {
1445 ; CHECK-LABEL: orr16imm2s_lsl24:
1447 ; CHECK-NEXT: orr v0.2s, #255, lsl #24
1449 %tmp1 = or <4 x i16> %a, < i16 0, i16 65280, i16 0, i16 65280>
1453 define <1 x i64> @orr64imm2s_lsl0(<1 x i64> %a) {
1454 ; CHECK-LABEL: orr64imm2s_lsl0:
1456 ; CHECK-NEXT: orr v0.2s, #255
1458 %tmp1 = or <1 x i64> %a, < i64 1095216660735>
1462 define <1 x i64> @orr64imm2s_lsl8(<1 x i64> %a) {
1463 ; CHECK-LABEL: orr64imm2s_lsl8:
1465 ; CHECK-NEXT: orr v0.2s, #255, lsl #8
1467 %tmp1 = or <1 x i64> %a, < i64 280375465148160>
1471 define <1 x i64> @orr64imm2s_lsl16(<1 x i64> %a) {
1472 ; CHECK-LABEL: orr64imm2s_lsl16:
1474 ; CHECK-NEXT: orr v0.2s, #255, lsl #16
1476 %tmp1 = or <1 x i64> %a, < i64 71776119077928960>
1480 define <1 x i64> @orr64imm2s_lsl24(<1 x i64> %a) {
1481 ; CHECK-LABEL: orr64imm2s_lsl24:
1483 ; CHECK-NEXT: orr v0.2s, #255, lsl #24
1485 %tmp1 = or <1 x i64> %a, < i64 -72057589759737856>
1489 define <16 x i8> @orr8imm4s_lsl0(<16 x i8> %a) {
1490 ; CHECK-LABEL: orr8imm4s_lsl0:
1492 ; CHECK-NEXT: orr v0.4s, #255
1494 %tmp1 = or <16 x i8> %a, < i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0>
1498 define <16 x i8> @orr8imm4s_lsl8(<16 x i8> %a) {
1499 ; CHECK-LABEL: orr8imm4s_lsl8:
1501 ; CHECK-NEXT: orr v0.4s, #255, lsl #8
1503 %tmp1 = or <16 x i8> %a, < i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0>
1507 define <16 x i8> @orr8imm4s_lsl16(<16 x i8> %a) {
1508 ; CHECK-LABEL: orr8imm4s_lsl16:
1510 ; CHECK-NEXT: orr v0.4s, #255, lsl #16
1512 %tmp1 = or <16 x i8> %a, < i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0>
1516 define <16 x i8> @orr8imm4s_lsl24(<16 x i8> %a) {
1517 ; CHECK-LABEL: orr8imm4s_lsl24:
1519 ; CHECK-NEXT: orr v0.4s, #255, lsl #24
1521 %tmp1 = or <16 x i8> %a, < i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255, i8 0, i8 0, i8 0, i8 255>
1525 define <8 x i16> @orr16imm4s_lsl0(<8 x i16> %a) {
1526 ; CHECK-LABEL: orr16imm4s_lsl0:
1528 ; CHECK-NEXT: orr v0.4s, #255
1530 %tmp1 = or <8 x i16> %a, < i16 255, i16 0, i16 255, i16 0, i16 255, i16 0, i16 255, i16 0>
1534 define <8 x i16> @orr16imm4s_lsl8(<8 x i16> %a) {
1535 ; CHECK-LABEL: orr16imm4s_lsl8:
1537 ; CHECK-NEXT: orr v0.4s, #255, lsl #8
1539 %tmp1 = or <8 x i16> %a, < i16 65280, i16 0, i16 65280, i16 0, i16 65280, i16 0, i16 65280, i16 0>
1543 define <8 x i16> @orr16imm4s_lsl16(<8 x i16> %a) {
1544 ; CHECK-LABEL: orr16imm4s_lsl16:
1546 ; CHECK-NEXT: orr v0.4s, #255, lsl #16
1548 %tmp1 = or <8 x i16> %a, < i16 0, i16 255, i16 0, i16 255, i16 0, i16 255, i16 0, i16 255>
1552 define <8 x i16> @orr16imm4s_lsl24(<8 x i16> %a) {
1553 ; CHECK-LABEL: orr16imm4s_lsl24:
1555 ; CHECK-NEXT: orr v0.4s, #255, lsl #24
1557 %tmp1 = or <8 x i16> %a, < i16 0, i16 65280, i16 0, i16 65280, i16 0, i16 65280, i16 0, i16 65280>
1561 define <2 x i64> @orr64imm4s_lsl0(<2 x i64> %a) {
1562 ; CHECK-LABEL: orr64imm4s_lsl0:
1564 ; CHECK-NEXT: orr v0.4s, #255
1566 %tmp1 = or <2 x i64> %a, < i64 1095216660735, i64 1095216660735>
1570 define <2 x i64> @orr64imm4s_lsl8(<2 x i64> %a) {
1571 ; CHECK-LABEL: orr64imm4s_lsl8:
1573 ; CHECK-NEXT: orr v0.4s, #255, lsl #8
1575 %tmp1 = or <2 x i64> %a, < i64 280375465148160, i64 280375465148160>
1579 define <2 x i64> @orr64imm4s_lsl16(<2 x i64> %a) {
1580 ; CHECK-LABEL: orr64imm4s_lsl16:
1582 ; CHECK-NEXT: orr v0.4s, #255, lsl #16
1584 %tmp1 = or <2 x i64> %a, < i64 71776119077928960, i64 71776119077928960>
1588 define <2 x i64> @orr64imm4s_lsl24(<2 x i64> %a) {
1589 ; CHECK-LABEL: orr64imm4s_lsl24:
1591 ; CHECK-NEXT: orr v0.4s, #255, lsl #24
1593 %tmp1 = or <2 x i64> %a, < i64 -72057589759737856, i64 -72057589759737856>
1597 define <8 x i8> @orr8imm4h_lsl0(<8 x i8> %a) {
1598 ; CHECK-LABEL: orr8imm4h_lsl0:
1600 ; CHECK-NEXT: orr v0.4h, #255
1602 %tmp1 = or <8 x i8> %a, < i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0>
1606 define <8 x i8> @orr8imm4h_lsl8(<8 x i8> %a) {
1607 ; CHECK-LABEL: orr8imm4h_lsl8:
1609 ; CHECK-NEXT: orr v0.4h, #255, lsl #8
1611 %tmp1 = or <8 x i8> %a, < i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255>
1615 define <2 x i32> @orr16imm4h_lsl0(<2 x i32> %a) {
1616 ; CHECK-LABEL: orr16imm4h_lsl0:
1618 ; CHECK-NEXT: orr v0.4h, #255
1620 %tmp1 = or <2 x i32> %a, < i32 16711935, i32 16711935>
1624 define <2 x i32> @orr16imm4h_lsl8(<2 x i32> %a) {
1625 ; CHECK-LABEL: orr16imm4h_lsl8:
1627 ; CHECK-NEXT: orr v0.4h, #255, lsl #8
1629 %tmp1 = or <2 x i32> %a, < i32 4278255360, i32 4278255360>
1633 define <1 x i64> @orr64imm4h_lsl0(<1 x i64> %a) {
1634 ; CHECK-LABEL: orr64imm4h_lsl0:
1636 ; CHECK-NEXT: orr v0.4h, #255
1638 %tmp1 = or <1 x i64> %a, < i64 71777214294589695>
1642 define <1 x i64> @orr64imm4h_lsl8(<1 x i64> %a) {
1643 ; CHECK-LABEL: orr64imm4h_lsl8:
1645 ; CHECK-NEXT: orr v0.4h, #255, lsl #8
1647 %tmp1 = or <1 x i64> %a, < i64 -71777214294589696>
1651 define <16 x i8> @orr8imm8h_lsl0(<16 x i8> %a) {
1652 ; CHECK-LABEL: orr8imm8h_lsl0:
1654 ; CHECK-NEXT: orr v0.8h, #255
1656 %tmp1 = or <16 x i8> %a, < i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0>
1660 define <16 x i8> @orr8imm8h_lsl8(<16 x i8> %a) {
1661 ; CHECK-LABEL: orr8imm8h_lsl8:
1663 ; CHECK-NEXT: orr v0.8h, #255, lsl #8
1665 %tmp1 = or <16 x i8> %a, < i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255>
1669 define <4 x i32> @orr16imm8h_lsl0(<4 x i32> %a) {
1670 ; CHECK-LABEL: orr16imm8h_lsl0:
1672 ; CHECK-NEXT: orr v0.8h, #255
1674 %tmp1 = or <4 x i32> %a, < i32 16711935, i32 16711935, i32 16711935, i32 16711935>
1678 define <4 x i32> @orr16imm8h_lsl8(<4 x i32> %a) {
1679 ; CHECK-LABEL: orr16imm8h_lsl8:
1681 ; CHECK-NEXT: orr v0.8h, #255, lsl #8
1683 %tmp1 = or <4 x i32> %a, < i32 4278255360, i32 4278255360, i32 4278255360, i32 4278255360>
1687 define <2 x i64> @orr64imm8h_lsl0(<2 x i64> %a) {
1688 ; CHECK-LABEL: orr64imm8h_lsl0:
1690 ; CHECK-NEXT: orr v0.8h, #255
1692 %tmp1 = or <2 x i64> %a, < i64 71777214294589695, i64 71777214294589695>
1696 define <2 x i64> @orr64imm8h_lsl8(<2 x i64> %a) {
1697 ; CHECK-LABEL: orr64imm8h_lsl8:
1699 ; CHECK-NEXT: orr v0.8h, #255, lsl #8
1701 %tmp1 = or <2 x i64> %a, < i64 -71777214294589696, i64 -71777214294589696>