1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -asm-verbose=0 < %s | FileCheck %s
7 define void @st2b_i8(<vscale x 16 x i8> %v0, <vscale x 16 x i8> %v1, <vscale x 16 x i1> %pred, i8* %addr, i64 %offset) {
8 ; CHECK-LABEL: st2b_i8:
9 ; CHECK: st2b { z0.b, z1.b }, p0, [x0, x1]
11 %1 = getelementptr i8, i8* %addr, i64 %offset
12 call void @llvm.aarch64.sve.st2.nxv16i8(<vscale x 16 x i8> %v0,
13 <vscale x 16 x i8> %v1,
14 <vscale x 16 x i1> %pred,
23 define void @st2h_i16(<vscale x 8 x i16> %v0, <vscale x 8 x i16> %v1, <vscale x 8 x i1> %pred, i16* %addr, i64 %offset) {
24 ; CHECK-LABEL: st2h_i16:
25 ; CHECK: st2h { z0.h, z1.h }, p0, [x0, x1, lsl #1]
27 %1 = getelementptr i16, i16* %addr, i64 %offset
28 call void @llvm.aarch64.sve.st2.nxv8i16(<vscale x 8 x i16> %v0,
29 <vscale x 8 x i16> %v1,
30 <vscale x 8 x i1> %pred,
35 define void @st2h_f16(<vscale x 8 x half> %v0, <vscale x 8 x half> %v1, <vscale x 8 x i1> %pred, half* %addr, i64 %offset) {
36 ; CHECK-LABEL: st2h_f16:
37 ; CHECK: st2h { z0.h, z1.h }, p0, [x0, x1, lsl #1]
39 %1 = getelementptr half, half* %addr, i64 %offset
40 call void @llvm.aarch64.sve.st2.nxv8f16(<vscale x 8 x half> %v0,
41 <vscale x 8 x half> %v1,
42 <vscale x 8 x i1> %pred,
51 define void @st2w_i32(<vscale x 4 x i32> %v0, <vscale x 4 x i32> %v1, <vscale x 4 x i1> %pred, i32* %addr, i64 %offset) {
52 ; CHECK-LABEL: st2w_i32:
53 ; CHECK: st2w { z0.s, z1.s }, p0, [x0, x1, lsl #2]
55 %1 = getelementptr i32, i32* %addr, i64 %offset
56 call void @llvm.aarch64.sve.st2.nxv4i32(<vscale x 4 x i32> %v0,
57 <vscale x 4 x i32> %v1,
58 <vscale x 4 x i1> %pred,
63 define void @st2w_f32(<vscale x 4 x float> %v0, <vscale x 4 x float> %v1, <vscale x 4 x i1> %pred, float* %addr, i64 %offset) {
64 ; CHECK-LABEL: st2w_f32:
65 ; CHECK: st2w { z0.s, z1.s }, p0, [x0, x1, lsl #2]
67 %1 = getelementptr float, float* %addr, i64 %offset
68 call void @llvm.aarch64.sve.st2.nxv4f32(<vscale x 4 x float> %v0,
69 <vscale x 4 x float> %v1,
70 <vscale x 4 x i1> %pred,
79 define void @st2d_i64(<vscale x 2 x i64> %v0, <vscale x 2 x i64> %v1, <vscale x 2 x i1> %pred, i64* %addr, i64 %offset) {
80 ; CHECK-LABEL: st2d_i64:
81 ; CHECK: st2d { z0.d, z1.d }, p0, [x0, x1, lsl #3]
83 %1 = getelementptr i64, i64* %addr, i64 %offset
84 call void @llvm.aarch64.sve.st2.nxv2i64(<vscale x 2 x i64> %v0,
85 <vscale x 2 x i64> %v1,
86 <vscale x 2 x i1> %pred,
91 define void @st2d_f64(<vscale x 2 x double> %v0, <vscale x 2 x double> %v1, <vscale x 2 x i1> %pred, double* %addr, i64 %offset) {
92 ; CHECK-LABEL: st2d_f64:
93 ; CHECK: st2d { z0.d, z1.d }, p0, [x0, x1, lsl #3]
95 %1 = getelementptr double, double* %addr, i64 %offset
96 call void @llvm.aarch64.sve.st2.nxv2f64(<vscale x 2 x double> %v0,
97 <vscale x 2 x double> %v1,
98 <vscale x 2 x i1> %pred,
107 define void @st3b_i8(<vscale x 16 x i8> %v0, <vscale x 16 x i8> %v1, <vscale x 16 x i8> %v2, <vscale x 16 x i1> %pred, i8* %addr, i64 %offset) {
108 ; CHECK-LABEL: st3b_i8:
109 ; CHECK: st3b { z0.b, z1.b, z2.b }, p0, [x0, x1]
111 %1 = getelementptr i8, i8* %addr, i64 %offset
112 call void @llvm.aarch64.sve.st3.nxv16i8(<vscale x 16 x i8> %v0,
113 <vscale x 16 x i8> %v1,
114 <vscale x 16 x i8> %v2,
115 <vscale x 16 x i1> %pred,
124 define void @st3h_i16(<vscale x 8 x i16> %v0, <vscale x 8 x i16> %v1, <vscale x 8 x i16> %v2, <vscale x 8 x i1> %pred, i16* %addr, i64 %offset) {
125 ; CHECK-LABEL: st3h_i16:
126 ; CHECK: st3h { z0.h, z1.h, z2.h }, p0, [x0, x1, lsl #1]
128 %1 = getelementptr i16, i16* %addr, i64 %offset
129 call void @llvm.aarch64.sve.st3.nxv8i16(<vscale x 8 x i16> %v0,
130 <vscale x 8 x i16> %v1,
131 <vscale x 8 x i16> %v2,
132 <vscale x 8 x i1> %pred,
137 define void @st3h_f16(<vscale x 8 x half> %v0, <vscale x 8 x half> %v1, <vscale x 8 x half> %v2, <vscale x 8 x i1> %pred, half* %addr, i64 %offset) {
138 ; CHECK-LABEL: st3h_f16:
139 ; CHECK: st3h { z0.h, z1.h, z2.h }, p0, [x0, x1, lsl #1]
141 %1 = getelementptr half, half* %addr, i64 %offset
142 call void @llvm.aarch64.sve.st3.nxv8f16(<vscale x 8 x half> %v0,
143 <vscale x 8 x half> %v1,
144 <vscale x 8 x half> %v2,
145 <vscale x 8 x i1> %pred,
154 define void @st3w_i32(<vscale x 4 x i32> %v0, <vscale x 4 x i32> %v1, <vscale x 4 x i32> %v2, <vscale x 4 x i1> %pred, i32* %addr, i64 %offset) {
155 ; CHECK-LABEL: st3w_i32:
156 ; CHECK: st3w { z0.s, z1.s, z2.s }, p0, [x0, x1, lsl #2]
158 %1 = getelementptr i32, i32* %addr, i64 %offset
159 call void @llvm.aarch64.sve.st3.nxv4i32(<vscale x 4 x i32> %v0,
160 <vscale x 4 x i32> %v1,
161 <vscale x 4 x i32> %v2,
162 <vscale x 4 x i1> %pred,
167 define void @st3w_f32(<vscale x 4 x float> %v0, <vscale x 4 x float> %v1, <vscale x 4 x float> %v2, <vscale x 4 x i1> %pred, float* %addr, i64 %offset) {
168 ; CHECK-LABEL: st3w_f32:
169 ; CHECK: st3w { z0.s, z1.s, z2.s }, p0, [x0, x1, lsl #2]
171 %1 = getelementptr float, float* %addr, i64 %offset
172 call void @llvm.aarch64.sve.st3.nxv4f32(<vscale x 4 x float> %v0,
173 <vscale x 4 x float> %v1,
174 <vscale x 4 x float> %v2,
175 <vscale x 4 x i1> %pred,
184 define void @st3d_i64(<vscale x 2 x i64> %v0, <vscale x 2 x i64> %v1, <vscale x 2 x i64> %v2, <vscale x 2 x i1> %pred, i64* %addr, i64 %offset) {
185 ; CHECK-LABEL: st3d_i64:
186 ; CHECK: st3d { z0.d, z1.d, z2.d }, p0, [x0, x1, lsl #3]
188 %1 = getelementptr i64, i64* %addr, i64 %offset
189 call void @llvm.aarch64.sve.st3.nxv2i64(<vscale x 2 x i64> %v0,
190 <vscale x 2 x i64> %v1,
191 <vscale x 2 x i64> %v2,
192 <vscale x 2 x i1> %pred,
197 define void @st3d_f64(<vscale x 2 x double> %v0, <vscale x 2 x double> %v1, <vscale x 2 x double> %v2, <vscale x 2 x i1> %pred, double* %addr, i64 %offset) {
198 ; CHECK-LABEL: st3d_f64:
199 ; CHECK: st3d { z0.d, z1.d, z2.d }, p0, [x0, x1, lsl #3]
201 %1 = getelementptr double, double* %addr, i64 %offset
202 call void @llvm.aarch64.sve.st3.nxv2f64(<vscale x 2 x double> %v0,
203 <vscale x 2 x double> %v1,
204 <vscale x 2 x double> %v2,
205 <vscale x 2 x i1> %pred,
214 define void @st4b_i8(<vscale x 16 x i8> %v0, <vscale x 16 x i8> %v1, <vscale x 16 x i8> %v2, <vscale x 16 x i8> %v3, <vscale x 16 x i1> %pred, i8* %addr, i64 %offset) {
215 ; CHECK-LABEL: st4b_i8:
216 ; CHECK: st4b { z0.b, z1.b, z2.b, z3.b }, p0, [x0, x1]
218 %1 = getelementptr i8, i8* %addr, i64 %offset
219 call void @llvm.aarch64.sve.st4.nxv16i8(<vscale x 16 x i8> %v0,
220 <vscale x 16 x i8> %v1,
221 <vscale x 16 x i8> %v2,
222 <vscale x 16 x i8> %v3,
223 <vscale x 16 x i1> %pred,
232 define void @st4h_i16(<vscale x 8 x i16> %v0, <vscale x 8 x i16> %v1, <vscale x 8 x i16> %v2, <vscale x 8 x i16> %v3, <vscale x 8 x i1> %pred, i16* %addr, i64 %offset) {
233 ; CHECK-LABEL: st4h_i16:
234 ; CHECK: st4h { z0.h, z1.h, z2.h, z3.h }, p0, [x0, x1, lsl #1]
236 %1 = getelementptr i16, i16* %addr, i64 %offset
237 call void @llvm.aarch64.sve.st4.nxv8i16(<vscale x 8 x i16> %v0,
238 <vscale x 8 x i16> %v1,
239 <vscale x 8 x i16> %v2,
240 <vscale x 8 x i16> %v3,
241 <vscale x 8 x i1> %pred,
246 define void @st4h_f16(<vscale x 8 x half> %v0, <vscale x 8 x half> %v1, <vscale x 8 x half> %v2, <vscale x 8 x half> %v3, <vscale x 8 x i1> %pred, half* %addr, i64 %offset) {
247 ; CHECK-LABEL: st4h_f16:
248 ; CHECK: st4h { z0.h, z1.h, z2.h, z3.h }, p0, [x0, x1, lsl #1]
250 %1 = getelementptr half, half* %addr, i64 %offset
251 call void @llvm.aarch64.sve.st4.nxv8f16(<vscale x 8 x half> %v0,
252 <vscale x 8 x half> %v1,
253 <vscale x 8 x half> %v2,
254 <vscale x 8 x half> %v3,
255 <vscale x 8 x i1> %pred,
264 define void @st4w_i32(<vscale x 4 x i32> %v0, <vscale x 4 x i32> %v1, <vscale x 4 x i32> %v2, <vscale x 4 x i32> %v3, <vscale x 4 x i1> %pred, i32* %addr, i64 %offset) {
265 ; CHECK-LABEL: st4w_i32:
266 ; CHECK: st4w { z0.s, z1.s, z2.s, z3.s }, p0, [x0, x1, lsl #2]
268 %1 = getelementptr i32, i32* %addr, i64 %offset
269 call void @llvm.aarch64.sve.st4.nxv4i32(<vscale x 4 x i32> %v0,
270 <vscale x 4 x i32> %v1,
271 <vscale x 4 x i32> %v2,
272 <vscale x 4 x i32> %v3,
273 <vscale x 4 x i1> %pred,
278 define void @st4w_f32(<vscale x 4 x float> %v0, <vscale x 4 x float> %v1, <vscale x 4 x float> %v2, <vscale x 4 x float> %v3, <vscale x 4 x i1> %pred, float* %addr, i64 %offset) {
279 ; CHECK-LABEL: st4w_f32:
280 ; CHECK: st4w { z0.s, z1.s, z2.s, z3.s }, p0, [x0, x1, lsl #2]
282 %1 = getelementptr float, float* %addr, i64 %offset
283 call void @llvm.aarch64.sve.st4.nxv4f32(<vscale x 4 x float> %v0,
284 <vscale x 4 x float> %v1,
285 <vscale x 4 x float> %v2,
286 <vscale x 4 x float> %v3,
287 <vscale x 4 x i1> %pred,
296 define void @st4d_i64(<vscale x 2 x i64> %v0, <vscale x 2 x i64> %v1, <vscale x 2 x i64> %v2, <vscale x 2 x i64> %v3, <vscale x 2 x i1> %pred, i64* %addr, i64 %offset) {
297 ; CHECK-LABEL: st4d_i64:
298 ; CHECK: st4d { z0.d, z1.d, z2.d, z3.d }, p0, [x0, x1, lsl #3]
300 %1 = getelementptr i64, i64* %addr, i64 %offset
301 call void @llvm.aarch64.sve.st4.nxv2i64(<vscale x 2 x i64> %v0,
302 <vscale x 2 x i64> %v1,
303 <vscale x 2 x i64> %v2,
304 <vscale x 2 x i64> %v3,
305 <vscale x 2 x i1> %pred,
310 define void @st4d_f64(<vscale x 2 x double> %v0, <vscale x 2 x double> %v1, <vscale x 2 x double> %v2, <vscale x 2 x double> %v3, <vscale x 2 x i1> %pred, double* %addr, i64 %offset) {
311 ; CHECK-LABEL: st4d_f64:
312 ; CHECK: st4d { z0.d, z1.d, z2.d, z3.d }, p0, [x0, x1, lsl #3]
314 %1 = getelementptr double, double* %addr, i64 %offset
315 call void @llvm.aarch64.sve.st4.nxv2f64(<vscale x 2 x double> %v0,
316 <vscale x 2 x double> %v1,
317 <vscale x 2 x double> %v2,
318 <vscale x 2 x double> %v3,
319 <vscale x 2 x i1> %pred,
324 declare void @llvm.aarch64.sve.st2.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i1>, i8*)
325 declare void @llvm.aarch64.sve.st2.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i1>, i16*)
326 declare void @llvm.aarch64.sve.st2.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i1>, i32*)
327 declare void @llvm.aarch64.sve.st2.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i1>, i64*)
328 declare void @llvm.aarch64.sve.st2.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, half*)
329 declare void @llvm.aarch64.sve.st2.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, float*)
330 declare void @llvm.aarch64.sve.st2.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, double*)
332 declare void @llvm.aarch64.sve.st3.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i1>, i8*)
333 declare void @llvm.aarch64.sve.st3.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i1>, i16*)
334 declare void @llvm.aarch64.sve.st3.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i1>, i32*)
335 declare void @llvm.aarch64.sve.st3.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i1>, i64*)
336 declare void @llvm.aarch64.sve.st3.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, half*)
337 declare void @llvm.aarch64.sve.st3.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, float*)
338 declare void @llvm.aarch64.sve.st3.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, double*)
340 declare void @llvm.aarch64.sve.st4.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i1>, i8*)
341 declare void @llvm.aarch64.sve.st4.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i1>, i16*)
342 declare void @llvm.aarch64.sve.st4.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i1>, i32*)
343 declare void @llvm.aarch64.sve.st4.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i1>, i64*)
344 declare void @llvm.aarch64.sve.st4.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, half*)
345 declare void @llvm.aarch64.sve.st4.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, float*)
346 declare void @llvm.aarch64.sve.st4.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, double*)