11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s
33; RUN: llc -mattr=+sme -force-streaming-compatible < %s | FileCheck %s
4+ ; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE
45
56target triple = "aarch64-unknown-linux-gnu"
67
@@ -14,6 +15,12 @@ define <4 x i8> @vls_sve_and_4xi8(<4 x i8> %b) nounwind {
1415; CHECK-NEXT: and z0.d, z0.d, z1.d
1516; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1617; CHECK-NEXT: ret
18+ ;
19+ ; NONEON-NOSVE-LABEL: vls_sve_and_4xi8:
20+ ; NONEON-NOSVE: // %bb.0:
21+ ; NONEON-NOSVE-NEXT: movi d1, #0xff000000ff0000
22+ ; NONEON-NOSVE-NEXT: and v0.8b, v0.8b, v1.8b
23+ ; NONEON-NOSVE-NEXT: ret
1724 %c = and <4 x i8 > %b , <i8 0 , i8 255 , i8 0 , i8 255 >
1825 ret <4 x i8 > %c
1926}
@@ -27,6 +34,12 @@ define <8 x i8> @vls_sve_and_8xi8(<8 x i8> %b) nounwind {
2734; CHECK-NEXT: and z0.d, z0.d, z1.d
2835; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2936; CHECK-NEXT: ret
37+ ;
38+ ; NONEON-NOSVE-LABEL: vls_sve_and_8xi8:
39+ ; NONEON-NOSVE: // %bb.0:
40+ ; NONEON-NOSVE-NEXT: movi d1, #0xff00ff00ff00ff00
41+ ; NONEON-NOSVE-NEXT: and v0.8b, v0.8b, v1.8b
42+ ; NONEON-NOSVE-NEXT: ret
3043 %c = and <8 x i8 > %b , <i8 0 , i8 255 , i8 0 , i8 255 , i8 0 , i8 255 , i8 0 , i8 255 >
3144 ret <8 x i8 > %c
3245}
@@ -40,6 +53,12 @@ define <16 x i8> @vls_sve_and_16xi8(<16 x i8> %b) nounwind {
4053; CHECK-NEXT: and z0.d, z0.d, z1.d
4154; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
4255; CHECK-NEXT: ret
56+ ;
57+ ; NONEON-NOSVE-LABEL: vls_sve_and_16xi8:
58+ ; NONEON-NOSVE: // %bb.0:
59+ ; NONEON-NOSVE-NEXT: movi v1.2d, #0xff00ff00ff00ff00
60+ ; NONEON-NOSVE-NEXT: and v0.16b, v0.16b, v1.16b
61+ ; NONEON-NOSVE-NEXT: ret
4362 %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 >
4463 ret <16 x i8 > %c
4564}
@@ -56,6 +75,13 @@ define <32 x i8> @vls_sve_and_32xi8(<32 x i8> %ap) nounwind {
5675; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
5776; CHECK-NEXT: // kill: def $q1 killed $q1 killed $z1
5877; CHECK-NEXT: ret
78+ ;
79+ ; NONEON-NOSVE-LABEL: vls_sve_and_32xi8:
80+ ; NONEON-NOSVE: // %bb.0:
81+ ; NONEON-NOSVE-NEXT: movi v2.2d, #0xff00ff00ff00ff00
82+ ; NONEON-NOSVE-NEXT: and v0.16b, v0.16b, v2.16b
83+ ; NONEON-NOSVE-NEXT: and v1.16b, v1.16b, v2.16b
84+ ; NONEON-NOSVE-NEXT: ret
5985 %b = and <32 x i8 > %ap , <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 ,
6086 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 >
6187 ret <32 x i8 > %b
@@ -73,6 +99,13 @@ define <2 x i16> @vls_sve_and_2xi16(<2 x i16> %b) nounwind {
7399; CHECK-NEXT: ldr d0, [sp, #8]
74100; CHECK-NEXT: add sp, sp, #16
75101; CHECK-NEXT: ret
102+ ;
103+ ; NONEON-NOSVE-LABEL: vls_sve_and_2xi16:
104+ ; NONEON-NOSVE: // %bb.0:
105+ ; NONEON-NOSVE-NEXT: // kill: def $d0 killed $d0 def $q0
106+ ; NONEON-NOSVE-NEXT: mov v0.s[0], wzr
107+ ; NONEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $q0
108+ ; NONEON-NOSVE-NEXT: ret
76109 %c = and <2 x i16 > %b , <i16 0 , i16 65535 >
77110 ret <2 x i16 > %c
78111}
@@ -86,6 +119,12 @@ define <4 x i16> @vls_sve_and_4xi16(<4 x i16> %b) nounwind {
86119; CHECK-NEXT: and z0.d, z0.d, z1.d
87120; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
88121; CHECK-NEXT: ret
122+ ;
123+ ; NONEON-NOSVE-LABEL: vls_sve_and_4xi16:
124+ ; NONEON-NOSVE: // %bb.0:
125+ ; NONEON-NOSVE-NEXT: movi d1, #0xffff0000ffff0000
126+ ; NONEON-NOSVE-NEXT: and v0.8b, v0.8b, v1.8b
127+ ; NONEON-NOSVE-NEXT: ret
89128 %c = and <4 x i16 > %b , <i16 0 , i16 65535 , i16 0 , i16 65535 >
90129 ret <4 x i16 > %c
91130}
@@ -99,6 +138,12 @@ define <8 x i16> @vls_sve_and_8xi16(<8 x i16> %b) nounwind {
99138; CHECK-NEXT: and z0.d, z0.d, z1.d
100139; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
101140; CHECK-NEXT: ret
141+ ;
142+ ; NONEON-NOSVE-LABEL: vls_sve_and_8xi16:
143+ ; NONEON-NOSVE: // %bb.0:
144+ ; NONEON-NOSVE-NEXT: movi v1.2d, #0xffff0000ffff0000
145+ ; NONEON-NOSVE-NEXT: and v0.16b, v0.16b, v1.16b
146+ ; NONEON-NOSVE-NEXT: ret
102147 %c = and <8 x i16 > %b , <i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 >
103148 ret <8 x i16 > %c
104149}
@@ -115,6 +160,13 @@ define <16 x i16> @vls_sve_and_16xi16(<16 x i16> %b) nounwind {
115160; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
116161; CHECK-NEXT: // kill: def $q1 killed $q1 killed $z1
117162; CHECK-NEXT: ret
163+ ;
164+ ; NONEON-NOSVE-LABEL: vls_sve_and_16xi16:
165+ ; NONEON-NOSVE: // %bb.0:
166+ ; NONEON-NOSVE-NEXT: movi v2.2d, #0xffff0000ffff0000
167+ ; NONEON-NOSVE-NEXT: and v0.16b, v0.16b, v2.16b
168+ ; NONEON-NOSVE-NEXT: and v1.16b, v1.16b, v2.16b
169+ ; NONEON-NOSVE-NEXT: ret
118170 %c = and <16 x i16 > %b , <i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 , i16 0 , i16 65535 >
119171 ret <16 x i16 > %c
120172}
@@ -128,6 +180,13 @@ define <2 x i32> @vls_sve_and_2xi32(<2 x i32> %b) nounwind {
128180; CHECK-NEXT: and z0.d, z0.d, z1.d
129181; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
130182; CHECK-NEXT: ret
183+ ;
184+ ; NONEON-NOSVE-LABEL: vls_sve_and_2xi32:
185+ ; NONEON-NOSVE: // %bb.0:
186+ ; NONEON-NOSVE-NEXT: // kill: def $d0 killed $d0 def $q0
187+ ; NONEON-NOSVE-NEXT: mov v0.s[0], wzr
188+ ; NONEON-NOSVE-NEXT: // kill: def $d0 killed $d0 killed $q0
189+ ; NONEON-NOSVE-NEXT: ret
131190 %c = and <2 x i32 > %b , <i32 0 , i32 4294967295 >
132191 ret <2 x i32 > %c
133192}
@@ -141,6 +200,12 @@ define <4 x i32> @vls_sve_and_4xi32(<4 x i32> %b) nounwind {
141200; CHECK-NEXT: and z0.d, z0.d, z1.d
142201; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
143202; CHECK-NEXT: ret
203+ ;
204+ ; NONEON-NOSVE-LABEL: vls_sve_and_4xi32:
205+ ; NONEON-NOSVE: // %bb.0:
206+ ; NONEON-NOSVE-NEXT: movi v1.2d, #0xffffffff00000000
207+ ; NONEON-NOSVE-NEXT: and v0.16b, v0.16b, v1.16b
208+ ; NONEON-NOSVE-NEXT: ret
144209 %c = and <4 x i32 > %b , <i32 0 , i32 4294967295 , i32 0 , i32 4294967295 >
145210 ret <4 x i32 > %c
146211}
@@ -157,6 +222,13 @@ define <8 x i32> @vls_sve_and_8xi32(<8 x i32> %b) nounwind {
157222; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
158223; CHECK-NEXT: // kill: def $q1 killed $q1 killed $z1
159224; CHECK-NEXT: ret
225+ ;
226+ ; NONEON-NOSVE-LABEL: vls_sve_and_8xi32:
227+ ; NONEON-NOSVE: // %bb.0:
228+ ; NONEON-NOSVE-NEXT: movi v2.2d, #0xffffffff00000000
229+ ; NONEON-NOSVE-NEXT: and v0.16b, v0.16b, v2.16b
230+ ; NONEON-NOSVE-NEXT: and v1.16b, v1.16b, v2.16b
231+ ; NONEON-NOSVE-NEXT: ret
160232 %c = and <8 x i32 > %b , <i32 0 , i32 4294967295 , i32 0 , i32 4294967295 , i32 0 , i32 4294967295 , i32 0 , i32 4294967295 >
161233 ret <8 x i32 > %c
162234}
@@ -170,6 +242,11 @@ define <2 x i64> @vls_sve_and_2xi64(<2 x i64> %b) nounwind {
170242; CHECK-NEXT: and z0.d, z0.d, z1.d
171243; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
172244; CHECK-NEXT: ret
245+ ;
246+ ; NONEON-NOSVE-LABEL: vls_sve_and_2xi64:
247+ ; NONEON-NOSVE: // %bb.0:
248+ ; NONEON-NOSVE-NEXT: mov v0.d[0], xzr
249+ ; NONEON-NOSVE-NEXT: ret
173250 %c = and <2 x i64 > %b , <i64 0 , i64 18446744073709551615 >
174251 ret <2 x i64 > %c
175252}
@@ -185,6 +262,12 @@ define <4 x i64> @vls_sve_and_4xi64(<4 x i64> %b) nounwind {
185262; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
186263; CHECK-NEXT: // kill: def $q1 killed $q1 killed $z1
187264; CHECK-NEXT: ret
265+ ;
266+ ; NONEON-NOSVE-LABEL: vls_sve_and_4xi64:
267+ ; NONEON-NOSVE: // %bb.0:
268+ ; NONEON-NOSVE-NEXT: mov v0.d[0], xzr
269+ ; NONEON-NOSVE-NEXT: mov v1.d[0], xzr
270+ ; NONEON-NOSVE-NEXT: ret
188271 %c = and <4 x i64 > %b , <i64 0 , i64 18446744073709551615 , i64 0 , i64 18446744073709551615 >
189272 ret <4 x i64 > %c
190273}
0 commit comments