1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
5 ; ST1B, ST1W, ST1H, ST1D: base + 32-bit unscaled offset, sign (sxtw) or zero
6 ; (uxtw) extended to 64 bits.
7 ; e.g. st1h { z0.d }, p0, [x0, z1.d, uxtw]
11 define void @sst1b_s_uxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
12 ; CHECK-LABEL: sst1b_s_uxtw:
14 ; CHECK-NEXT: st1b { z0.s }, p0, [x0, z1.s, uxtw]
16 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i8>
17 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4i8(<vscale x 4 x i8> %data_trunc,
18 <vscale x 4 x i1> %pg,
20 <vscale x 4 x i32> %offsets)
24 define void @sst1b_s_sxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
25 ; CHECK-LABEL: sst1b_s_sxtw:
27 ; CHECK-NEXT: st1b { z0.s }, p0, [x0, z1.s, sxtw]
29 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i8>
30 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4i8(<vscale x 4 x i8> %data_trunc,
31 <vscale x 4 x i1> %pg,
33 <vscale x 4 x i32> %offsets)
37 define void @sst1b_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
38 ; CHECK-LABEL: sst1b_d_uxtw:
40 ; CHECK-NEXT: st1b { z0.d }, p0, [x0, z1.d, uxtw]
42 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i8>
43 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i8(<vscale x 2 x i8> %data_trunc,
44 <vscale x 2 x i1> %pg,
46 <vscale x 2 x i32> %offsets)
50 define void @sst1b_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
51 ; CHECK-LABEL: sst1b_d_sxtw:
53 ; CHECK-NEXT: st1b { z0.d }, p0, [x0, z1.d, sxtw]
55 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i8>
56 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i8(<vscale x 2 x i8> %data_trunc,
57 <vscale x 2 x i1> %pg,
59 <vscale x 2 x i32> %offsets)
64 define void @sst1h_s_uxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
65 ; CHECK-LABEL: sst1h_s_uxtw:
67 ; CHECK-NEXT: st1h { z0.s }, p0, [x0, z1.s, uxtw]
69 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
70 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4i16(<vscale x 4 x i16> %data_trunc,
71 <vscale x 4 x i1> %pg,
73 <vscale x 4 x i32> %offsets)
77 define void @sst1h_s_sxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
78 ; CHECK-LABEL: sst1h_s_sxtw:
80 ; CHECK-NEXT: st1h { z0.s }, p0, [x0, z1.s, sxtw]
82 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
83 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4i16(<vscale x 4 x i16> %data_trunc,
84 <vscale x 4 x i1> %pg,
86 <vscale x 4 x i32> %offsets)
90 define void @sst1h_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
91 ; CHECK-LABEL: sst1h_d_uxtw:
93 ; CHECK-NEXT: st1h { z0.d }, p0, [x0, z1.d, uxtw]
95 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
96 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i16(<vscale x 2 x i16> %data_trunc,
97 <vscale x 2 x i1> %pg,
99 <vscale x 2 x i32> %offsets)
103 define void @sst1h_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
104 ; CHECK-LABEL: sst1h_d_sxtw:
106 ; CHECK-NEXT: st1h { z0.d }, p0, [x0, z1.d, sxtw]
108 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
109 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i16(<vscale x 2 x i16> %data_trunc,
110 <vscale x 2 x i1> %pg,
112 <vscale x 2 x i32> %offsets)
117 define void @sst1w_s_uxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
118 ; CHECK-LABEL: sst1w_s_uxtw:
120 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, uxtw]
122 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4i32(<vscale x 4 x i32> %data,
123 <vscale x 4 x i1> %pg,
125 <vscale x 4 x i32> %offsets)
129 define void @sst1w_s_sxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
130 ; CHECK-LABEL: sst1w_s_sxtw:
132 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, sxtw]
134 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4i32(<vscale x 4 x i32> %data,
135 <vscale x 4 x i1> %pg,
137 <vscale x 4 x i32> %offsets)
141 define void @sst1w_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
142 ; CHECK-LABEL: sst1w_d_uxtw:
144 ; CHECK-NEXT: st1w { z0.d }, p0, [x0, z1.d, uxtw]
146 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
147 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i32(<vscale x 2 x i32> %data_trunc,
148 <vscale x 2 x i1> %pg,
150 <vscale x 2 x i32> %offsets)
154 define void @sst1w_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
155 ; CHECK-LABEL: sst1w_d_sxtw:
157 ; CHECK-NEXT: st1w { z0.d }, p0, [x0, z1.d, sxtw]
159 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
160 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i32(<vscale x 2 x i32> %data_trunc,
161 <vscale x 2 x i1> %pg,
163 <vscale x 2 x i32> %offsets)
167 define void @sst1w_s_uxtw_float(<vscale x 4 x float> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
168 ; CHECK-LABEL: sst1w_s_uxtw_float:
170 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, uxtw]
172 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4f32(<vscale x 4 x float> %data,
173 <vscale x 4 x i1> %pg,
175 <vscale x 4 x i32> %offsets)
179 define void @sst1w_s_sxtw_float(<vscale x 4 x float> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %offsets) {
180 ; CHECK-LABEL: sst1w_s_sxtw_float:
182 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, sxtw]
184 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4f32(<vscale x 4 x float> %data,
185 <vscale x 4 x i1> %pg,
187 <vscale x 4 x i32> %offsets)
192 define void @sst1d_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
193 ; CHECK-LABEL: sst1d_d_uxtw:
195 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, uxtw]
197 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i64(<vscale x 2 x i64> %data,
198 <vscale x 2 x i1> %pg,
200 <vscale x 2 x i32> %offsets)
204 define void @sst1d_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
205 ; CHECK-LABEL: sst1d_d_sxtw:
207 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, sxtw]
209 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i64(<vscale x 2 x i64> %data,
210 <vscale x 2 x i1> %pg,
212 <vscale x 2 x i32> %offsets)
216 define void @sst1d_d_uxtw_double(<vscale x 2 x double> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
217 ; CHECK-LABEL: sst1d_d_uxtw_double:
219 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, uxtw]
221 call void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2f64(<vscale x 2 x double> %data,
222 <vscale x 2 x i1> %pg,
224 <vscale x 2 x i32> %offsets)
228 define void @sst1d_d_sxtw_double(<vscale x 2 x double> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %offsets) {
229 ; CHECK-LABEL: sst1d_d_sxtw_double:
231 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, sxtw]
233 call void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2f64(<vscale x 2 x double> %data,
234 <vscale x 2 x i1> %pg,
236 <vscale x 2 x i32> %offsets)
242 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
243 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
244 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
245 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
248 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
249 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
250 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
251 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
254 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
255 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
256 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
257 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
259 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
260 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
263 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
264 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
266 declare void @llvm.aarch64.sve.st1.scatter.sxtw.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
267 declare void @llvm.aarch64.sve.st1.scatter.uxtw.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)