1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
4 ; ST1H, ST1W, ST1D: base + 32-bit scaled offset, sign (sxtw) or zero
5 ; (uxtw) extended to 64 bits.
6 ; e.g. st1h { z0.d }, p0, [x0, z1.d, uxtw #1]
10 define void @sst1h_s_uxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, i16* %base, <vscale x 4 x i32> %indices) {
11 ; CHECK-LABEL: sst1h_s_uxtw:
12 ; CHECK: st1h { z0.s }, p0, [x0, z1.s, uxtw #1]
14 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
15 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i16(<vscale x 4 x i16> %data_trunc,
16 <vscale x 4 x i1> %pg,
18 <vscale x 4 x i32> %indices)
22 define void @sst1h_s_sxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, i16* %base, <vscale x 4 x i32> %indices) {
23 ; CHECK-LABEL: sst1h_s_sxtw:
24 ; CHECK: st1h { z0.s }, p0, [x0, z1.s, sxtw #1]
26 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
27 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i16(<vscale x 4 x i16> %data_trunc,
28 <vscale x 4 x i1> %pg,
30 <vscale x 4 x i32> %indices)
34 define void @sst1h_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i16* %base, <vscale x 2 x i32> %indices) {
35 ; CHECK-LABEL: sst1h_d_uxtw:
36 ; CHECK: st1h { z0.d }, p0, [x0, z1.d, uxtw #1]
38 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
39 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i16(<vscale x 2 x i16> %data_trunc,
40 <vscale x 2 x i1> %pg,
42 <vscale x 2 x i32> %indices)
46 define void @sst1h_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i16* %base, <vscale x 2 x i32> %indices) {
47 ; CHECK-LABEL: sst1h_d_sxtw:
48 ; CHECK: st1h { z0.d }, p0, [x0, z1.d, sxtw #1]
50 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
51 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i16(<vscale x 2 x i16> %data_trunc,
52 <vscale x 2 x i1> %pg,
54 <vscale x 2 x i32> %indices)
59 define void @sst1w_s_uxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, i32* %base, <vscale x 4 x i32> %indices) {
60 ; CHECK-LABEL: sst1w_s_uxtw:
61 ; CHECK: st1w { z0.s }, p0, [x0, z1.s, uxtw #2]
63 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i32(<vscale x 4 x i32> %data,
64 <vscale x 4 x i1> %pg,
66 <vscale x 4 x i32> %indices)
70 define void @sst1w_s_sxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, i32* %base, <vscale x 4 x i32> %indices) {
71 ; CHECK-LABEL: sst1w_s_sxtw:
72 ; CHECK: st1w { z0.s }, p0, [x0, z1.s, sxtw #2]
74 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i32(<vscale x 4 x i32> %data,
75 <vscale x 4 x i1> %pg,
77 <vscale x 4 x i32> %indices)
81 define void @sst1w_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i32* %base, <vscale x 2 x i32> %indices) {
82 ; CHECK-LABEL: sst1w_d_uxtw:
83 ; CHECK: st1w { z0.d }, p0, [x0, z1.d, uxtw #2]
85 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
86 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i32(<vscale x 2 x i32> %data_trunc,
87 <vscale x 2 x i1> %pg,
89 <vscale x 2 x i32> %indices)
93 define void @sst1w_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i32* %base, <vscale x 2 x i32> %indices) {
94 ; CHECK-LABEL: sst1w_d_sxtw:
95 ; CHECK: st1w { z0.d }, p0, [x0, z1.d, sxtw #2]
97 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
98 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i32(<vscale x 2 x i32> %data_trunc,
99 <vscale x 2 x i1> %pg,
101 <vscale x 2 x i32> %indices)
105 define void @sst1w_s_uxtw_float(<vscale x 4 x float> %data, <vscale x 4 x i1> %pg, float* %base, <vscale x 4 x i32> %indices) {
106 ; CHECK-LABEL: sst1w_s_uxtw_float:
107 ; CHECK: st1w { z0.s }, p0, [x0, z1.s, uxtw #2]
109 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4f32(<vscale x 4 x float> %data,
110 <vscale x 4 x i1> %pg,
112 <vscale x 4 x i32> %indices)
116 define void @sst1w_s_sxtw_float(<vscale x 4 x float> %data, <vscale x 4 x i1> %pg, float* %base, <vscale x 4 x i32> %indices) {
117 ; CHECK-LABEL: sst1w_s_sxtw_float:
118 ; CHECK: st1w { z0.s }, p0, [x0, z1.s, sxtw #2]
120 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4f32(<vscale x 4 x float> %data,
121 <vscale x 4 x i1> %pg,
123 <vscale x 4 x i32> %indices)
128 define void @sst1d_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i64* %base, <vscale x 2 x i32> %indices) {
129 ; CHECK-LABEL: sst1d_d_uxtw:
130 ; CHECK: st1d { z0.d }, p0, [x0, z1.d, uxtw #3]
132 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i64(<vscale x 2 x i64> %data,
133 <vscale x 2 x i1> %pg,
135 <vscale x 2 x i32> %indices)
139 define void @sst1d_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i64* %base, <vscale x 2 x i32> %indices) {
140 ; CHECK-LABEL: sst1d_d_sxtw:
141 ; CHECK: st1d { z0.d }, p0, [x0, z1.d, sxtw #3]
143 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i64(<vscale x 2 x i64> %data,
144 <vscale x 2 x i1> %pg,
146 <vscale x 2 x i32> %indices)
150 define void @sst1d_d_uxtw_double(<vscale x 2 x double> %data, <vscale x 2 x i1> %pg, double* %base, <vscale x 2 x i32> %indices) {
151 ; CHECK-LABEL: sst1d_d_uxtw_double:
152 ; CHECK: st1d { z0.d }, p0, [x0, z1.d, uxtw #3]
154 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2f64(<vscale x 2 x double> %data,
155 <vscale x 2 x i1> %pg,
157 <vscale x 2 x i32> %indices)
161 define void @sst1d_d_sxtw_double(<vscale x 2 x double> %data, <vscale x 2 x i1> %pg, double* %base, <vscale x 2 x i32> %indices) {
162 ; CHECK-LABEL: sst1d_d_sxtw_double:
163 ; CHECK: st1d { z0.d }, p0, [x0, z1.d, sxtw #3]
165 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2f64(<vscale x 2 x double> %data,
166 <vscale x 2 x i1> %pg,
168 <vscale x 2 x i32> %indices)
174 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, i16*, <vscale x 4 x i32>)
175 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, i16*, <vscale x 2 x i32>)
176 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, i16*, <vscale x 4 x i32>)
177 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, i16*, <vscale x 2 x i32>)
180 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, i32*, <vscale x 4 x i32>)
181 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, i32*, <vscale x 2 x i32>)
182 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, i32*, <vscale x 4 x i32>)
183 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, i32*, <vscale x 2 x i32>)
185 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, float*, <vscale x 4 x i32>)
186 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, float*, <vscale x 4 x i32>)
189 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, i64*, <vscale x 2 x i32>)
190 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, i64*, <vscale x 2 x i32>)
192 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, double*, <vscale x 2 x i32>)
193 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, double*, <vscale x 2 x i32>)