1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=512 -o - -asm-verbose=0 < %s | FileCheck %s
3 ; CHECK-LABEL: vls_sve_and_64xi8:
4 ; CHECK-NEXT: adrp x[[ONE:[0-9]+]], .LCPI0_0
5 ; CHECK-NEXT: ptrue p0.b, vl64
6 ; CHECK-NEXT: add x[[TWO:[0-9]+]], x[[ONE]], :lo12:.LCPI0_0
7 ; CHECK-NEXT: ld1b { z0.b }, p0/z, [x0]
8 ; CHECK-NEXT: ld1b { z1.b }, p0/z, [x[[TWO]]]
9 ; CHECK-NEXT: and z0.d, z0.d, z1.d
10 ; CHECK-NEXT: st1b { z0.b }, p0, [x1]
12 define void @vls_sve_and_64xi8(<64 x i8>* %ap, <64 x i8>* %out) nounwind {
13 %a = load <64 x i8>, <64 x i8>* %ap
14 %b = and <64 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,
15 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,
16 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,
17 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>
18 store <64 x i8> %b, <64 x i8>* %out
22 ; CHECK-LABEL: vls_sve_and_16xi8:
23 ; CHECK-NEXT: bic v0.8h, #255
25 define <16 x i8> @vls_sve_and_16xi8(<16 x i8> %b, <16 x i8>* %out) nounwind {
26 %c = and <16 x i8> %b, <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>
30 ; CHECK-LABEL: vls_sve_and_8xi8:
31 ; CHECK-NEXT: bic v0.4h, #255
33 define <8 x i8> @vls_sve_and_8xi8(<8 x i8> %b, <8 x i8>* %out) nounwind {
34 %c = and <8 x i8> %b, <i8 0, i8 255, i8 0, i8 255, i8 0, i8 255, i8 0, i8 255>