1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve < %s | FileCheck %s
4 target triple = "aarch64-unknown-linux-gnu"
10 define <vscale x 16 x i8> @asr_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
11 ; CHECK-LABEL: asr_i8:
13 ; CHECK-NEXT: asr z0.b, p0/m, z0.b, z1.b
15 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.asr.u.nxv16i8(<vscale x 16 x i1> %pg,
16 <vscale x 16 x i8> %a,
17 <vscale x 16 x i8> %b)
18 ret <vscale x 16 x i8> %out
21 define <vscale x 8 x i16> @asr_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
22 ; CHECK-LABEL: asr_i16:
24 ; CHECK-NEXT: asr z0.h, p0/m, z0.h, z1.h
26 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.asr.u.nxv8i16(<vscale x 8 x i1> %pg,
27 <vscale x 8 x i16> %a,
28 <vscale x 8 x i16> %b)
29 ret <vscale x 8 x i16> %out
32 define <vscale x 4 x i32> @asr_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
33 ; CHECK-LABEL: asr_i32:
35 ; CHECK-NEXT: asr z0.s, p0/m, z0.s, z1.s
37 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.asr.u.nxv4i32(<vscale x 4 x i1> %pg,
38 <vscale x 4 x i32> %a,
39 <vscale x 4 x i32> %b)
40 ret <vscale x 4 x i32> %out
43 define <vscale x 2 x i64> @asr_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
44 ; CHECK-LABEL: asr_i64:
46 ; CHECK-NEXT: asr z0.d, p0/m, z0.d, z1.d
48 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.asr.u.nxv2i64(<vscale x 2 x i1> %pg,
49 <vscale x 2 x i64> %a,
50 <vscale x 2 x i64> %b)
51 ret <vscale x 2 x i64> %out
58 define <vscale x 16 x i8> @asr_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
59 ; CHECK-LABEL: asr_imm_i8:
61 ; CHECK-NEXT: asr z0.b, z0.b, #3
63 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.asr.u.nxv16i8(<vscale x 16 x i1> %pg,
64 <vscale x 16 x i8> %a,
65 <vscale x 16 x i8> splat(i8 3))
66 ret <vscale x 16 x i8> %out
69 define <vscale x 8 x i16> @asr_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
70 ; CHECK-LABEL: asr_imm_i16:
72 ; CHECK-NEXT: asr z0.h, z0.h, #4
74 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.asr.u.nxv8i16(<vscale x 8 x i1> %pg,
75 <vscale x 8 x i16> %a,
76 <vscale x 8 x i16> splat(i16 4))
77 ret <vscale x 8 x i16> %out
80 define <vscale x 4 x i32> @asr_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
81 ; CHECK-LABEL: asr_imm_i32:
83 ; CHECK-NEXT: asr z0.s, z0.s, #5
85 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.asr.u.nxv4i32(<vscale x 4 x i1> %pg,
86 <vscale x 4 x i32> %a,
87 <vscale x 4 x i32> splat(i32 5))
88 ret <vscale x 4 x i32> %out
91 define <vscale x 2 x i64> @asr_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
92 ; CHECK-LABEL: asr_imm_i64:
94 ; CHECK-NEXT: asr z0.d, z0.d, #6
96 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.asr.u.nxv2i64(<vscale x 2 x i1> %pg,
97 <vscale x 2 x i64> %a,
98 <vscale x 2 x i64> splat(i64 6))
99 ret <vscale x 2 x i64> %out
106 define <vscale x 16 x i8> @lsl_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
107 ; CHECK-LABEL: lsl_i8:
109 ; CHECK-NEXT: lsl z0.b, p0/m, z0.b, z1.b
111 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.lsl.u.nxv16i8(<vscale x 16 x i1> %pg,
112 <vscale x 16 x i8> %a,
113 <vscale x 16 x i8> %b)
114 ret <vscale x 16 x i8> %out
117 define <vscale x 8 x i16> @lsl_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
118 ; CHECK-LABEL: lsl_i16:
120 ; CHECK-NEXT: lsl z0.h, p0/m, z0.h, z1.h
122 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.lsl.u.nxv8i16(<vscale x 8 x i1> %pg,
123 <vscale x 8 x i16> %a,
124 <vscale x 8 x i16> %b)
125 ret <vscale x 8 x i16> %out
128 define <vscale x 4 x i32> @lsl_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
129 ; CHECK-LABEL: lsl_i32:
131 ; CHECK-NEXT: lsl z0.s, p0/m, z0.s, z1.s
133 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.lsl.u.nxv4i32(<vscale x 4 x i1> %pg,
134 <vscale x 4 x i32> %a,
135 <vscale x 4 x i32> %b)
136 ret <vscale x 4 x i32> %out
139 define <vscale x 2 x i64> @lsl_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
140 ; CHECK-LABEL: lsl_i64:
142 ; CHECK-NEXT: lsl z0.d, p0/m, z0.d, z1.d
144 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.lsl.u.nxv2i64(<vscale x 2 x i1> %pg,
145 <vscale x 2 x i64> %a,
146 <vscale x 2 x i64> %b)
147 ret <vscale x 2 x i64> %out
154 define <vscale x 16 x i8> @lsl_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
155 ; CHECK-LABEL: lsl_imm_i8:
157 ; CHECK-NEXT: lsl z0.b, z0.b, #7
159 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.lsl.u.nxv16i8(<vscale x 16 x i1> %pg,
160 <vscale x 16 x i8> %a,
161 <vscale x 16 x i8> splat(i8 7))
162 ret <vscale x 16 x i8> %out
165 define <vscale x 8 x i16> @lsl_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
166 ; CHECK-LABEL: lsl_imm_i16:
168 ; CHECK-NEXT: lsl z0.h, z0.h, #8
170 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.lsl.u.nxv8i16(<vscale x 8 x i1> %pg,
171 <vscale x 8 x i16> %a,
172 <vscale x 8 x i16> splat(i16 8))
173 ret <vscale x 8 x i16> %out
176 define <vscale x 4 x i32> @lsl_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
177 ; CHECK-LABEL: lsl_imm_i32:
179 ; CHECK-NEXT: lsl z0.s, z0.s, #9
181 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.lsl.u.nxv4i32(<vscale x 4 x i1> %pg,
182 <vscale x 4 x i32> %a,
183 <vscale x 4 x i32> splat(i32 9))
184 ret <vscale x 4 x i32> %out
187 define <vscale x 2 x i64> @lsl_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
188 ; CHECK-LABEL: lsl_imm_i64:
190 ; CHECK-NEXT: lsl z0.d, z0.d, #10
192 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.lsl.u.nxv2i64(<vscale x 2 x i1> %pg,
193 <vscale x 2 x i64> %a,
194 <vscale x 2 x i64> splat(i64 10))
195 ret <vscale x 2 x i64> %out
202 define <vscale x 16 x i8> @lsr_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a, <vscale x 16 x i8> %b) {
203 ; CHECK-LABEL: lsr_i8:
205 ; CHECK-NEXT: lsr z0.b, p0/m, z0.b, z1.b
207 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.lsr.u.nxv16i8(<vscale x 16 x i1> %pg,
208 <vscale x 16 x i8> %a,
209 <vscale x 16 x i8> %b)
210 ret <vscale x 16 x i8> %out
213 define <vscale x 8 x i16> @lsr_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
214 ; CHECK-LABEL: lsr_i16:
216 ; CHECK-NEXT: lsr z0.h, p0/m, z0.h, z1.h
218 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.lsr.u.nxv8i16(<vscale x 8 x i1> %pg,
219 <vscale x 8 x i16> %a,
220 <vscale x 8 x i16> %b)
221 ret <vscale x 8 x i16> %out
224 define <vscale x 4 x i32> @lsr_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
225 ; CHECK-LABEL: lsr_i32:
227 ; CHECK-NEXT: lsr z0.s, p0/m, z0.s, z1.s
229 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.lsr.u.nxv4i32(<vscale x 4 x i1> %pg,
230 <vscale x 4 x i32> %a,
231 <vscale x 4 x i32> %b)
232 ret <vscale x 4 x i32> %out
235 define <vscale x 2 x i64> @lsr_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) {
236 ; CHECK-LABEL: lsr_i64:
238 ; CHECK-NEXT: lsr z0.d, p0/m, z0.d, z1.d
240 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.lsr.u.nxv2i64(<vscale x 2 x i1> %pg,
241 <vscale x 2 x i64> %a,
242 <vscale x 2 x i64> %b)
243 ret <vscale x 2 x i64> %out
250 define <vscale x 16 x i8> @lsr_imm_i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %a) {
251 ; CHECK-LABEL: lsr_imm_i8:
253 ; CHECK-NEXT: lsr z0.b, z0.b, #8
255 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.lsr.u.nxv16i8(<vscale x 16 x i1> %pg,
256 <vscale x 16 x i8> %a,
257 <vscale x 16 x i8> splat(i8 8))
258 ret <vscale x 16 x i8> %out
261 define <vscale x 8 x i16> @lsr_imm_i16(<vscale x 8 x i1> %pg, <vscale x 8 x i16> %a) {
262 ; CHECK-LABEL: lsr_imm_i16:
264 ; CHECK-NEXT: lsr z0.h, z0.h, #12
266 %out = call <vscale x 8 x i16> @llvm.aarch64.sve.lsr.u.nxv8i16(<vscale x 8 x i1> %pg,
267 <vscale x 8 x i16> %a,
268 <vscale x 8 x i16> splat(i16 12))
269 ret <vscale x 8 x i16> %out
272 define <vscale x 4 x i32> @lsr_imm_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a) {
273 ; CHECK-LABEL: lsr_imm_i32:
275 ; CHECK-NEXT: lsr z0.s, z0.s, #13
277 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.lsr.u.nxv4i32(<vscale x 4 x i1> %pg,
278 <vscale x 4 x i32> %a,
279 <vscale x 4 x i32> splat(i32 13))
280 ret <vscale x 4 x i32> %out
283 define <vscale x 2 x i64> @lsr_imm_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a) {
284 ; CHECK-LABEL: lsr_imm_i64:
286 ; CHECK-NEXT: lsr z0.d, z0.d, #14
288 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.lsr.u.nxv2i64(<vscale x 2 x i1> %pg,
289 <vscale x 2 x i64> %a,
290 <vscale x 2 x i64> splat(i64 14))
291 ret <vscale x 2 x i64> %out
294 declare <vscale x 16 x i8> @llvm.aarch64.sve.asr.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
295 declare <vscale x 8 x i16> @llvm.aarch64.sve.asr.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
296 declare <vscale x 4 x i32> @llvm.aarch64.sve.asr.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
297 declare <vscale x 2 x i64> @llvm.aarch64.sve.asr.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
299 declare <vscale x 16 x i8> @llvm.aarch64.sve.lsl.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
300 declare <vscale x 8 x i16> @llvm.aarch64.sve.lsl.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
301 declare <vscale x 4 x i32> @llvm.aarch64.sve.lsl.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
302 declare <vscale x 2 x i64> @llvm.aarch64.sve.lsl.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)
304 declare <vscale x 16 x i8> @llvm.aarch64.sve.lsr.u.nxv16i8(<vscale x 16 x i1>, <vscale x 16 x i8>, <vscale x 16 x i8>)
305 declare <vscale x 8 x i16> @llvm.aarch64.sve.lsr.u.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
306 declare <vscale x 4 x i32> @llvm.aarch64.sve.lsr.u.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)
307 declare <vscale x 2 x i64> @llvm.aarch64.sve.lsr.u.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>)