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 ; ST1H, ST1W, ST1D: base + 32-bit scaled offset, sign (sxtw) or zero
6 ; (uxtw) extended to 64 bits.
7 ; e.g. st1h { z0.d }, p0, [x0, z1.d, uxtw #1]
11 define void @sst1h_s_uxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %indices) {
12 ; CHECK-LABEL: sst1h_s_uxtw:
14 ; CHECK-NEXT: st1h { z0.s }, p0, [x0, z1.s, uxtw #1]
16 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
17 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i16(<vscale x 4 x i16> %data_trunc,
18 <vscale x 4 x i1> %pg,
20 <vscale x 4 x i32> %indices)
24 define void @sst1h_s_sxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %indices) {
25 ; CHECK-LABEL: sst1h_s_sxtw:
27 ; CHECK-NEXT: st1h { z0.s }, p0, [x0, z1.s, sxtw #1]
29 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
30 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i16(<vscale x 4 x i16> %data_trunc,
31 <vscale x 4 x i1> %pg,
33 <vscale x 4 x i32> %indices)
37 define void @sst1h_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %indices) {
38 ; CHECK-LABEL: sst1h_d_uxtw:
40 ; CHECK-NEXT: st1h { z0.d }, p0, [x0, z1.d, uxtw #1]
42 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
43 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i16(<vscale x 2 x i16> %data_trunc,
44 <vscale x 2 x i1> %pg,
46 <vscale x 2 x i32> %indices)
50 define void @sst1h_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %indices) {
51 ; CHECK-LABEL: sst1h_d_sxtw:
53 ; CHECK-NEXT: st1h { z0.d }, p0, [x0, z1.d, sxtw #1]
55 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
56 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i16(<vscale x 2 x i16> %data_trunc,
57 <vscale x 2 x i1> %pg,
59 <vscale x 2 x i32> %indices)
64 define void @sst1w_s_uxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %indices) {
65 ; CHECK-LABEL: sst1w_s_uxtw:
67 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, uxtw #2]
69 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i32(<vscale x 4 x i32> %data,
70 <vscale x 4 x i1> %pg,
72 <vscale x 4 x i32> %indices)
76 define void @sst1w_s_sxtw(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, ptr %base, <vscale x 4 x i32> %indices) {
77 ; CHECK-LABEL: sst1w_s_sxtw:
79 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, sxtw #2]
81 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i32(<vscale x 4 x i32> %data,
82 <vscale x 4 x i1> %pg,
84 <vscale x 4 x i32> %indices)
88 define void @sst1w_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %indices) {
89 ; CHECK-LABEL: sst1w_d_uxtw:
91 ; CHECK-NEXT: st1w { z0.d }, p0, [x0, z1.d, uxtw #2]
93 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
94 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i32(<vscale x 2 x i32> %data_trunc,
95 <vscale x 2 x i1> %pg,
97 <vscale x 2 x i32> %indices)
101 define void @sst1w_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %indices) {
102 ; CHECK-LABEL: sst1w_d_sxtw:
104 ; CHECK-NEXT: st1w { z0.d }, p0, [x0, z1.d, sxtw #2]
106 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
107 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i32(<vscale x 2 x i32> %data_trunc,
108 <vscale x 2 x i1> %pg,
110 <vscale x 2 x i32> %indices)
114 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> %indices) {
115 ; CHECK-LABEL: sst1w_s_uxtw_float:
117 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, uxtw #2]
119 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4f32(<vscale x 4 x float> %data,
120 <vscale x 4 x i1> %pg,
122 <vscale x 4 x i32> %indices)
126 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> %indices) {
127 ; CHECK-LABEL: sst1w_s_sxtw_float:
129 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, z1.s, sxtw #2]
131 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4f32(<vscale x 4 x float> %data,
132 <vscale x 4 x i1> %pg,
134 <vscale x 4 x i32> %indices)
139 define void @sst1d_d_uxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %indices) {
140 ; CHECK-LABEL: sst1d_d_uxtw:
142 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, uxtw #3]
144 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i64(<vscale x 2 x i64> %data,
145 <vscale x 2 x i1> %pg,
147 <vscale x 2 x i32> %indices)
151 define void @sst1d_d_sxtw(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i32> %indices) {
152 ; CHECK-LABEL: sst1d_d_sxtw:
154 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, sxtw #3]
156 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i64(<vscale x 2 x i64> %data,
157 <vscale x 2 x i1> %pg,
159 <vscale x 2 x i32> %indices)
163 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> %indices) {
164 ; CHECK-LABEL: sst1d_d_uxtw_double:
166 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, uxtw #3]
168 call void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2f64(<vscale x 2 x double> %data,
169 <vscale x 2 x i1> %pg,
171 <vscale x 2 x i32> %indices)
175 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> %indices) {
176 ; CHECK-LABEL: sst1d_d_sxtw_double:
178 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, z1.d, sxtw #3]
180 call void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2f64(<vscale x 2 x double> %data,
181 <vscale x 2 x i1> %pg,
183 <vscale x 2 x i32> %indices)
189 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
190 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
191 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
192 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
195 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
196 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
197 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
198 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
200 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
201 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, ptr, <vscale x 4 x i32>)
204 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
205 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
207 declare void @llvm.aarch64.sve.st1.scatter.sxtw.index.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)
208 declare void @llvm.aarch64.sve.st1.scatter.uxtw.index.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, ptr, <vscale x 2 x i32>)