1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+m,+d,+zfh,+v,+zvfh \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s \
4 ; RUN: -check-prefixes=CHECK,CHECK-RV32
5 ; RUN: llc -mtriple=riscv64 -mattr=+m,+d,+zfh,+v,+zvfh \
6 ; RUN: -verify-machineinstrs < %s | FileCheck %s \
7 ; RUN: -check-prefixes=CHECK,CHECK-RV64
9 declare void @llvm.experimental.vp.strided.store.nxv1i8.p0.i8(<vscale x 1 x i8>, ptr, i8, <vscale x 1 x i1>, i32)
11 define void @strided_vpstore_nxv1i8_i8(<vscale x 1 x i8> %val, ptr %ptr, i8 signext %stride, <vscale x 1 x i1> %m, i32 zeroext %evl) {
12 ; CHECK-LABEL: strided_vpstore_nxv1i8_i8:
14 ; CHECK-NEXT: vsetvli zero, a2, e8, mf8, ta, ma
15 ; CHECK-NEXT: vsse8.v v8, (a0), a1, v0.t
17 call void @llvm.experimental.vp.strided.store.nxv1i8.p0.i8(<vscale x 1 x i8> %val, ptr %ptr, i8 %stride, <vscale x 1 x i1> %m, i32 %evl)
21 declare void @llvm.experimental.vp.strided.store.nxv1i8.p0.i16(<vscale x 1 x i8>, ptr, i16, <vscale x 1 x i1>, i32)
23 define void @strided_vpstore_nxv1i8_i16(<vscale x 1 x i8> %val, ptr %ptr, i16 signext %stride, <vscale x 1 x i1> %m, i32 zeroext %evl) {
24 ; CHECK-LABEL: strided_vpstore_nxv1i8_i16:
26 ; CHECK-NEXT: vsetvli zero, a2, e8, mf8, ta, ma
27 ; CHECK-NEXT: vsse8.v v8, (a0), a1, v0.t
29 call void @llvm.experimental.vp.strided.store.nxv1i8.p0.i16(<vscale x 1 x i8> %val, ptr %ptr, i16 %stride, <vscale x 1 x i1> %m, i32 %evl)
33 declare void @llvm.experimental.vp.strided.store.nxv1i8.p0.i64(<vscale x 1 x i8>, ptr, i64, <vscale x 1 x i1>, i32)
35 define void @strided_vpstore_nxv1i8_i64(<vscale x 1 x i8> %val, ptr %ptr, i64 signext %stride, <vscale x 1 x i1> %m, i32 zeroext %evl) {
36 ; CHECK-RV32-LABEL: strided_vpstore_nxv1i8_i64:
37 ; CHECK-RV32: # %bb.0:
38 ; CHECK-RV32-NEXT: vsetvli zero, a3, e8, mf8, ta, ma
39 ; CHECK-RV32-NEXT: vsse8.v v8, (a0), a1, v0.t
40 ; CHECK-RV32-NEXT: ret
42 ; CHECK-RV64-LABEL: strided_vpstore_nxv1i8_i64:
43 ; CHECK-RV64: # %bb.0:
44 ; CHECK-RV64-NEXT: vsetvli zero, a2, e8, mf8, ta, ma
45 ; CHECK-RV64-NEXT: vsse8.v v8, (a0), a1, v0.t
46 ; CHECK-RV64-NEXT: ret
47 call void @llvm.experimental.vp.strided.store.nxv1i8.p0.i64(<vscale x 1 x i8> %val, ptr %ptr, i64 %stride, <vscale x 1 x i1> %m, i32 %evl)
51 declare void @llvm.experimental.vp.strided.store.nxv1i8.p0.i32(<vscale x 1 x i8>, ptr, i32, <vscale x 1 x i1>, i32)
53 define void @strided_vpstore_nxv1i8(<vscale x 1 x i8> %val, ptr %ptr, i32 signext %strided, <vscale x 1 x i1> %m, i32 zeroext %evl) {
54 ; CHECK-LABEL: strided_vpstore_nxv1i8:
56 ; CHECK-NEXT: vsetvli zero, a2, e8, mf8, ta, ma
57 ; CHECK-NEXT: vsse8.v v8, (a0), a1, v0.t
59 call void @llvm.experimental.vp.strided.store.nxv1i8.p0.i32(<vscale x 1 x i8> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %m, i32 %evl)
63 declare void @llvm.experimental.vp.strided.store.nxv2i8.p0.i32(<vscale x 2 x i8>, ptr, i32, <vscale x 2 x i1>, i32)
65 define void @strided_vpstore_nxv2i8(<vscale x 2 x i8> %val, ptr %ptr, i32 signext %strided, <vscale x 2 x i1> %m, i32 zeroext %evl) {
66 ; CHECK-LABEL: strided_vpstore_nxv2i8:
68 ; CHECK-NEXT: vsetvli zero, a2, e8, mf4, ta, ma
69 ; CHECK-NEXT: vsse8.v v8, (a0), a1, v0.t
71 call void @llvm.experimental.vp.strided.store.nxv2i8.p0.i32(<vscale x 2 x i8> %val, ptr %ptr, i32 %strided, <vscale x 2 x i1> %m, i32 %evl)
75 declare void @llvm.experimental.vp.strided.store.nxv4i8.p0.i32(<vscale x 4 x i8>, ptr, i32, <vscale x 4 x i1>, i32)
77 define void @strided_vpstore_nxv4i8(<vscale x 4 x i8> %val, ptr %ptr, i32 signext %strided, <vscale x 4 x i1> %m, i32 zeroext %evl) {
78 ; CHECK-LABEL: strided_vpstore_nxv4i8:
80 ; CHECK-NEXT: vsetvli zero, a2, e8, mf2, ta, ma
81 ; CHECK-NEXT: vsse8.v v8, (a0), a1, v0.t
83 call void @llvm.experimental.vp.strided.store.nxv4i8.p0.i32(<vscale x 4 x i8> %val, ptr %ptr, i32 %strided, <vscale x 4 x i1> %m, i32 %evl)
87 declare void @llvm.experimental.vp.strided.store.nxv8i8.p0.i32(<vscale x 8 x i8>, ptr, i32, <vscale x 8 x i1>, i32)
89 define void @strided_vpstore_nxv8i8(<vscale x 8 x i8> %val, ptr %ptr, i32 signext %strided, <vscale x 8 x i1> %m, i32 zeroext %evl) {
90 ; CHECK-LABEL: strided_vpstore_nxv8i8:
92 ; CHECK-NEXT: vsetvli zero, a2, e8, m1, ta, ma
93 ; CHECK-NEXT: vsse8.v v8, (a0), a1, v0.t
95 call void @llvm.experimental.vp.strided.store.nxv8i8.p0.i32(<vscale x 8 x i8> %val, ptr %ptr, i32 %strided, <vscale x 8 x i1> %m, i32 %evl)
99 define void @strided_vpstore_nxv8i8_unit_stride(<vscale x 8 x i8> %val, ptr %ptr, <vscale x 8 x i1> %m, i32 zeroext %evl) {
100 ; CHECK-LABEL: strided_vpstore_nxv8i8_unit_stride:
102 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
103 ; CHECK-NEXT: vse8.v v8, (a0), v0.t
105 call void @llvm.experimental.vp.strided.store.nxv8i8.p0.i32(<vscale x 8 x i8> %val, ptr %ptr, i32 1, <vscale x 8 x i1> %m, i32 %evl)
109 declare void @llvm.experimental.vp.strided.store.nxv1i16.p0.i32(<vscale x 1 x i16>, ptr, i32, <vscale x 1 x i1>, i32)
111 define void @strided_vpstore_nxv1i16(<vscale x 1 x i16> %val, ptr %ptr, i32 signext %strided, <vscale x 1 x i1> %m, i32 zeroext %evl) {
112 ; CHECK-LABEL: strided_vpstore_nxv1i16:
114 ; CHECK-NEXT: vsetvli zero, a2, e16, mf4, ta, ma
115 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
117 call void @llvm.experimental.vp.strided.store.nxv1i16.p0.i32(<vscale x 1 x i16> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %m, i32 %evl)
121 declare void @llvm.experimental.vp.strided.store.nxv2i16.p0.i32(<vscale x 2 x i16>, ptr, i32, <vscale x 2 x i1>, i32)
123 define void @strided_vpstore_nxv2i16(<vscale x 2 x i16> %val, ptr %ptr, i32 signext %strided, <vscale x 2 x i1> %m, i32 zeroext %evl) {
124 ; CHECK-LABEL: strided_vpstore_nxv2i16:
126 ; CHECK-NEXT: vsetvli zero, a2, e16, mf2, ta, ma
127 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
129 call void @llvm.experimental.vp.strided.store.nxv2i16.p0.i32(<vscale x 2 x i16> %val, ptr %ptr, i32 %strided, <vscale x 2 x i1> %m, i32 %evl)
133 declare void @llvm.experimental.vp.strided.store.nxv4i16.p0.i32(<vscale x 4 x i16>, ptr, i32, <vscale x 4 x i1>, i32)
135 define void @strided_vpstore_nxv4i16(<vscale x 4 x i16> %val, ptr %ptr, i32 signext %strided, <vscale x 4 x i1> %m, i32 zeroext %evl) {
136 ; CHECK-LABEL: strided_vpstore_nxv4i16:
138 ; CHECK-NEXT: vsetvli zero, a2, e16, m1, ta, ma
139 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
141 call void @llvm.experimental.vp.strided.store.nxv4i16.p0.i32(<vscale x 4 x i16> %val, ptr %ptr, i32 %strided, <vscale x 4 x i1> %m, i32 %evl)
145 define void @strided_vpstore_nxv4i16_unit_stride(<vscale x 4 x i16> %val, ptr %ptr, <vscale x 4 x i1> %m, i32 zeroext %evl) {
146 ; CHECK-LABEL: strided_vpstore_nxv4i16_unit_stride:
148 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
149 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
151 call void @llvm.experimental.vp.strided.store.nxv4i16.p0.i32(<vscale x 4 x i16> %val, ptr %ptr, i32 2, <vscale x 4 x i1> %m, i32 %evl)
155 declare void @llvm.experimental.vp.strided.store.nxv8i16.p0.i32(<vscale x 8 x i16>, ptr, i32, <vscale x 8 x i1>, i32)
157 define void @strided_vpstore_nxv8i16(<vscale x 8 x i16> %val, ptr %ptr, i32 signext %strided, <vscale x 8 x i1> %m, i32 zeroext %evl) {
158 ; CHECK-LABEL: strided_vpstore_nxv8i16:
160 ; CHECK-NEXT: vsetvli zero, a2, e16, m2, ta, ma
161 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
163 call void @llvm.experimental.vp.strided.store.nxv8i16.p0.i32(<vscale x 8 x i16> %val, ptr %ptr, i32 %strided, <vscale x 8 x i1> %m, i32 %evl)
167 declare void @llvm.experimental.vp.strided.store.nxv1i32.p0.i32(<vscale x 1 x i32>, ptr, i32, <vscale x 1 x i1>, i32)
169 define void @strided_vpstore_nxv1i32(<vscale x 1 x i32> %val, ptr %ptr, i32 signext %strided, <vscale x 1 x i1> %m, i32 zeroext %evl) {
170 ; CHECK-LABEL: strided_vpstore_nxv1i32:
172 ; CHECK-NEXT: vsetvli zero, a2, e32, mf2, ta, ma
173 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
175 call void @llvm.experimental.vp.strided.store.nxv1i32.p0.i32(<vscale x 1 x i32> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %m, i32 %evl)
179 declare void @llvm.experimental.vp.strided.store.nxv2i32.p0.i32(<vscale x 2 x i32>, ptr, i32, <vscale x 2 x i1>, i32)
181 define void @strided_vpstore_nxv2i32(<vscale x 2 x i32> %val, ptr %ptr, i32 signext %strided, <vscale x 2 x i1> %m, i32 zeroext %evl) {
182 ; CHECK-LABEL: strided_vpstore_nxv2i32:
184 ; CHECK-NEXT: vsetvli zero, a2, e32, m1, ta, ma
185 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
187 call void @llvm.experimental.vp.strided.store.nxv2i32.p0.i32(<vscale x 2 x i32> %val, ptr %ptr, i32 %strided, <vscale x 2 x i1> %m, i32 %evl)
191 declare void @llvm.experimental.vp.strided.store.nxv4i32.p0.i32(<vscale x 4 x i32>, ptr, i32, <vscale x 4 x i1>, i32)
193 define void @strided_vpstore_nxv4i32(<vscale x 4 x i32> %val, ptr %ptr, i32 signext %strided, <vscale x 4 x i1> %m, i32 zeroext %evl) {
194 ; CHECK-LABEL: strided_vpstore_nxv4i32:
196 ; CHECK-NEXT: vsetvli zero, a2, e32, m2, ta, ma
197 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
199 call void @llvm.experimental.vp.strided.store.nxv4i32.p0.i32(<vscale x 4 x i32> %val, ptr %ptr, i32 %strided, <vscale x 4 x i1> %m, i32 %evl)
203 define void @strided_vpstore_nxv4i32_unit_stride(<vscale x 4 x i32> %val, ptr %ptr, <vscale x 4 x i1> %m, i32 zeroext %evl) {
204 ; CHECK-LABEL: strided_vpstore_nxv4i32_unit_stride:
206 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
207 ; CHECK-NEXT: vse32.v v8, (a0), v0.t
209 call void @llvm.experimental.vp.strided.store.nxv4i32.p0.i32(<vscale x 4 x i32> %val, ptr %ptr, i32 4, <vscale x 4 x i1> %m, i32 %evl)
213 declare void @llvm.experimental.vp.strided.store.nxv8i32.p0.i32(<vscale x 8 x i32>, ptr, i32, <vscale x 8 x i1>, i32)
215 define void @strided_vpstore_nxv8i32(<vscale x 8 x i32> %val, ptr %ptr, i32 signext %strided, <vscale x 8 x i1> %m, i32 zeroext %evl) {
216 ; CHECK-LABEL: strided_vpstore_nxv8i32:
218 ; CHECK-NEXT: vsetvli zero, a2, e32, m4, ta, ma
219 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
221 call void @llvm.experimental.vp.strided.store.nxv8i32.p0.i32(<vscale x 8 x i32> %val, ptr %ptr, i32 %strided, <vscale x 8 x i1> %m, i32 %evl)
225 declare void @llvm.experimental.vp.strided.store.nxv1i64.p0.i32(<vscale x 1 x i64>, ptr, i32, <vscale x 1 x i1>, i32)
227 define void @strided_vpstore_nxv1i64(<vscale x 1 x i64> %val, ptr %ptr, i32 signext %strided, <vscale x 1 x i1> %m, i32 zeroext %evl) {
228 ; CHECK-LABEL: strided_vpstore_nxv1i64:
230 ; CHECK-NEXT: vsetvli zero, a2, e64, m1, ta, ma
231 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
233 call void @llvm.experimental.vp.strided.store.nxv1i64.p0.i32(<vscale x 1 x i64> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %m, i32 %evl)
237 define void @strided_vpstore_nxv1i64_unit_stride(<vscale x 1 x i64> %val, ptr %ptr, <vscale x 1 x i1> %m, i32 zeroext %evl) {
238 ; CHECK-LABEL: strided_vpstore_nxv1i64_unit_stride:
240 ; CHECK-NEXT: vsetvli zero, a1, e64, m1, ta, ma
241 ; CHECK-NEXT: vse64.v v8, (a0), v0.t
243 call void @llvm.experimental.vp.strided.store.nxv1i64.p0.i32(<vscale x 1 x i64> %val, ptr %ptr, i32 8, <vscale x 1 x i1> %m, i32 %evl)
247 declare void @llvm.experimental.vp.strided.store.nxv2i64.p0.i32(<vscale x 2 x i64>, ptr, i32, <vscale x 2 x i1>, i32)
249 define void @strided_vpstore_nxv2i64(<vscale x 2 x i64> %val, ptr %ptr, i32 signext %strided, <vscale x 2 x i1> %m, i32 zeroext %evl) {
250 ; CHECK-LABEL: strided_vpstore_nxv2i64:
252 ; CHECK-NEXT: vsetvli zero, a2, e64, m2, ta, ma
253 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
255 call void @llvm.experimental.vp.strided.store.nxv2i64.p0.i32(<vscale x 2 x i64> %val, ptr %ptr, i32 %strided, <vscale x 2 x i1> %m, i32 %evl)
259 declare void @llvm.experimental.vp.strided.store.nxv4i64.p0.i32(<vscale x 4 x i64>, ptr, i32, <vscale x 4 x i1>, i32)
261 define void @strided_vpstore_nxv4i64(<vscale x 4 x i64> %val, ptr %ptr, i32 signext %strided, <vscale x 4 x i1> %m, i32 zeroext %evl) {
262 ; CHECK-LABEL: strided_vpstore_nxv4i64:
264 ; CHECK-NEXT: vsetvli zero, a2, e64, m4, ta, ma
265 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
267 call void @llvm.experimental.vp.strided.store.nxv4i64.p0.i32(<vscale x 4 x i64> %val, ptr %ptr, i32 %strided, <vscale x 4 x i1> %m, i32 %evl)
271 declare void @llvm.experimental.vp.strided.store.nxv8i64.p0.i32(<vscale x 8 x i64>, ptr, i32, <vscale x 8 x i1>, i32)
273 define void @strided_vpstore_nxv8i64(<vscale x 8 x i64> %val, ptr %ptr, i32 signext %strided, <vscale x 8 x i1> %m, i32 zeroext %evl) {
274 ; CHECK-LABEL: strided_vpstore_nxv8i64:
276 ; CHECK-NEXT: vsetvli zero, a2, e64, m8, ta, ma
277 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
279 call void @llvm.experimental.vp.strided.store.nxv8i64.p0.i32(<vscale x 8 x i64> %val, ptr %ptr, i32 %strided, <vscale x 8 x i1> %m, i32 %evl)
283 declare void @llvm.experimental.vp.strided.store.nxv1f16.p0.i32(<vscale x 1 x half>, ptr, i32, <vscale x 1 x i1>, i32)
285 define void @strided_vpstore_nxv1f16(<vscale x 1 x half> %val, ptr %ptr, i32 signext %strided, <vscale x 1 x i1> %m, i32 zeroext %evl) {
286 ; CHECK-LABEL: strided_vpstore_nxv1f16:
288 ; CHECK-NEXT: vsetvli zero, a2, e16, mf4, ta, ma
289 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
291 call void @llvm.experimental.vp.strided.store.nxv1f16.p0.i32(<vscale x 1 x half> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %m, i32 %evl)
295 declare void @llvm.experimental.vp.strided.store.nxv2f16.p0.i32(<vscale x 2 x half>, ptr, i32, <vscale x 2 x i1>, i32)
297 define void @strided_vpstore_nxv2f16(<vscale x 2 x half> %val, ptr %ptr, i32 signext %strided, <vscale x 2 x i1> %m, i32 zeroext %evl) {
298 ; CHECK-LABEL: strided_vpstore_nxv2f16:
300 ; CHECK-NEXT: vsetvli zero, a2, e16, mf2, ta, ma
301 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
303 call void @llvm.experimental.vp.strided.store.nxv2f16.p0.i32(<vscale x 2 x half> %val, ptr %ptr, i32 %strided, <vscale x 2 x i1> %m, i32 %evl)
307 declare void @llvm.experimental.vp.strided.store.nxv4f16.p0.i32(<vscale x 4 x half>, ptr, i32, <vscale x 4 x i1>, i32)
309 define void @strided_vpstore_nxv4f16(<vscale x 4 x half> %val, ptr %ptr, i32 signext %strided, <vscale x 4 x i1> %m, i32 zeroext %evl) {
310 ; CHECK-LABEL: strided_vpstore_nxv4f16:
312 ; CHECK-NEXT: vsetvli zero, a2, e16, m1, ta, ma
313 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
315 call void @llvm.experimental.vp.strided.store.nxv4f16.p0.i32(<vscale x 4 x half> %val, ptr %ptr, i32 %strided, <vscale x 4 x i1> %m, i32 %evl)
319 define void @strided_vpstore_nxv4f16_unit_stride(<vscale x 4 x half> %val, ptr %ptr, <vscale x 4 x i1> %m, i32 zeroext %evl) {
320 ; CHECK-LABEL: strided_vpstore_nxv4f16_unit_stride:
322 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
323 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
325 call void @llvm.experimental.vp.strided.store.nxv4f16.p0.i32(<vscale x 4 x half> %val, ptr %ptr, i32 2, <vscale x 4 x i1> %m, i32 %evl)
329 declare void @llvm.experimental.vp.strided.store.nxv8f16.p0.i32(<vscale x 8 x half>, ptr, i32, <vscale x 8 x i1>, i32)
331 define void @strided_vpstore_nxv8f16(<vscale x 8 x half> %val, ptr %ptr, i32 signext %strided, <vscale x 8 x i1> %m, i32 zeroext %evl) {
332 ; CHECK-LABEL: strided_vpstore_nxv8f16:
334 ; CHECK-NEXT: vsetvli zero, a2, e16, m2, ta, ma
335 ; CHECK-NEXT: vsse16.v v8, (a0), a1, v0.t
337 call void @llvm.experimental.vp.strided.store.nxv8f16.p0.i32(<vscale x 8 x half> %val, ptr %ptr, i32 %strided, <vscale x 8 x i1> %m, i32 %evl)
341 declare void @llvm.experimental.vp.strided.store.nxv1f32.p0.i32(<vscale x 1 x float>, ptr, i32, <vscale x 1 x i1>, i32)
343 define void @strided_vpstore_nxv1f32(<vscale x 1 x float> %val, ptr %ptr, i32 signext %strided, <vscale x 1 x i1> %m, i32 zeroext %evl) {
344 ; CHECK-LABEL: strided_vpstore_nxv1f32:
346 ; CHECK-NEXT: vsetvli zero, a2, e32, mf2, ta, ma
347 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
349 call void @llvm.experimental.vp.strided.store.nxv1f32.p0.i32(<vscale x 1 x float> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %m, i32 %evl)
353 declare void @llvm.experimental.vp.strided.store.nxv2f32.p0.i32(<vscale x 2 x float>, ptr, i32, <vscale x 2 x i1>, i32)
355 define void @strided_vpstore_nxv2f32(<vscale x 2 x float> %val, ptr %ptr, i32 signext %strided, <vscale x 2 x i1> %m, i32 zeroext %evl) {
356 ; CHECK-LABEL: strided_vpstore_nxv2f32:
358 ; CHECK-NEXT: vsetvli zero, a2, e32, m1, ta, ma
359 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
361 call void @llvm.experimental.vp.strided.store.nxv2f32.p0.i32(<vscale x 2 x float> %val, ptr %ptr, i32 %strided, <vscale x 2 x i1> %m, i32 %evl)
365 declare void @llvm.experimental.vp.strided.store.nxv4f32.p0.i32(<vscale x 4 x float>, ptr, i32, <vscale x 4 x i1>, i32)
367 define void @strided_vpstore_nxv4f32(<vscale x 4 x float> %val, ptr %ptr, i32 signext %strided, <vscale x 4 x i1> %m, i32 zeroext %evl) {
368 ; CHECK-LABEL: strided_vpstore_nxv4f32:
370 ; CHECK-NEXT: vsetvli zero, a2, e32, m2, ta, ma
371 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
373 call void @llvm.experimental.vp.strided.store.nxv4f32.p0.i32(<vscale x 4 x float> %val, ptr %ptr, i32 %strided, <vscale x 4 x i1> %m, i32 %evl)
377 define void @strided_vpstore_nxv4f32_unit_stride(<vscale x 4 x float> %val, ptr %ptr, <vscale x 4 x i1> %m, i32 zeroext %evl) {
378 ; CHECK-LABEL: strided_vpstore_nxv4f32_unit_stride:
380 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
381 ; CHECK-NEXT: vse32.v v8, (a0), v0.t
383 call void @llvm.experimental.vp.strided.store.nxv4f32.p0.i32(<vscale x 4 x float> %val, ptr %ptr, i32 4, <vscale x 4 x i1> %m, i32 %evl)
387 declare void @llvm.experimental.vp.strided.store.nxv8f32.p0.i32(<vscale x 8 x float>, ptr, i32, <vscale x 8 x i1>, i32)
389 define void @strided_vpstore_nxv8f32(<vscale x 8 x float> %val, ptr %ptr, i32 signext %strided, <vscale x 8 x i1> %m, i32 zeroext %evl) {
390 ; CHECK-LABEL: strided_vpstore_nxv8f32:
392 ; CHECK-NEXT: vsetvli zero, a2, e32, m4, ta, ma
393 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
395 call void @llvm.experimental.vp.strided.store.nxv8f32.p0.i32(<vscale x 8 x float> %val, ptr %ptr, i32 %strided, <vscale x 8 x i1> %m, i32 %evl)
399 declare void @llvm.experimental.vp.strided.store.nxv1f64.p0.i32(<vscale x 1 x double>, ptr, i32, <vscale x 1 x i1>, i32)
401 define void @strided_vpstore_nxv1f64(<vscale x 1 x double> %val, ptr %ptr, i32 signext %strided, <vscale x 1 x i1> %m, i32 zeroext %evl) {
402 ; CHECK-LABEL: strided_vpstore_nxv1f64:
404 ; CHECK-NEXT: vsetvli zero, a2, e64, m1, ta, ma
405 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
407 call void @llvm.experimental.vp.strided.store.nxv1f64.p0.i32(<vscale x 1 x double> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %m, i32 %evl)
411 define void @strided_vpstore_nxv1f64_unit_stride(<vscale x 1 x double> %val, ptr %ptr, <vscale x 1 x i1> %m, i32 zeroext %evl) {
412 ; CHECK-LABEL: strided_vpstore_nxv1f64_unit_stride:
414 ; CHECK-NEXT: vsetvli zero, a1, e64, m1, ta, ma
415 ; CHECK-NEXT: vse64.v v8, (a0), v0.t
417 call void @llvm.experimental.vp.strided.store.nxv1f64.p0.i32(<vscale x 1 x double> %val, ptr %ptr, i32 8, <vscale x 1 x i1> %m, i32 %evl)
421 declare void @llvm.experimental.vp.strided.store.nxv2f64.p0.i32(<vscale x 2 x double>, ptr, i32, <vscale x 2 x i1>, i32)
423 define void @strided_vpstore_nxv2f64(<vscale x 2 x double> %val, ptr %ptr, i32 signext %strided, <vscale x 2 x i1> %m, i32 zeroext %evl) {
424 ; CHECK-LABEL: strided_vpstore_nxv2f64:
426 ; CHECK-NEXT: vsetvli zero, a2, e64, m2, ta, ma
427 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
429 call void @llvm.experimental.vp.strided.store.nxv2f64.p0.i32(<vscale x 2 x double> %val, ptr %ptr, i32 %strided, <vscale x 2 x i1> %m, i32 %evl)
433 declare void @llvm.experimental.vp.strided.store.nxv4f64.p0.i32(<vscale x 4 x double>, ptr, i32, <vscale x 4 x i1>, i32)
435 define void @strided_vpstore_nxv4f64(<vscale x 4 x double> %val, ptr %ptr, i32 signext %strided, <vscale x 4 x i1> %m, i32 zeroext %evl) {
436 ; CHECK-LABEL: strided_vpstore_nxv4f64:
438 ; CHECK-NEXT: vsetvli zero, a2, e64, m4, ta, ma
439 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
441 call void @llvm.experimental.vp.strided.store.nxv4f64.p0.i32(<vscale x 4 x double> %val, ptr %ptr, i32 %strided, <vscale x 4 x i1> %m, i32 %evl)
445 declare void @llvm.experimental.vp.strided.store.nxv8f64.p0.i32(<vscale x 8 x double>, ptr, i32, <vscale x 8 x i1>, i32)
447 define void @strided_vpstore_nxv8f64(<vscale x 8 x double> %val, ptr %ptr, i32 signext %strided, <vscale x 8 x i1> %m, i32 zeroext %evl) {
448 ; CHECK-LABEL: strided_vpstore_nxv8f64:
450 ; CHECK-NEXT: vsetvli zero, a2, e64, m8, ta, ma
451 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
453 call void @llvm.experimental.vp.strided.store.nxv8f64.p0.i32(<vscale x 8 x double> %val, ptr %ptr, i32 %strided, <vscale x 8 x i1> %m, i32 %evl)
457 define void @strided_vpstore_nxv1i8_allones_mask(<vscale x 1 x i8> %val, ptr %ptr, i32 signext %strided, i32 zeroext %evl) {
458 ; CHECK-LABEL: strided_vpstore_nxv1i8_allones_mask:
460 ; CHECK-NEXT: vsetvli zero, a2, e8, mf8, ta, ma
461 ; CHECK-NEXT: vsse8.v v8, (a0), a1
463 %a = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
464 %b = shufflevector <vscale x 1 x i1> %a, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
465 call void @llvm.experimental.vp.strided.store.nxv1i8.p0.i32(<vscale x 1 x i8> %val, ptr %ptr, i32 %strided, <vscale x 1 x i1> %b, i32 %evl)
470 define void @strided_vpstore_nxv3f32(<vscale x 3 x float> %v, ptr %ptr, i32 signext %stride, <vscale x 3 x i1> %mask, i32 zeroext %evl) {
471 ; CHECK-LABEL: strided_vpstore_nxv3f32:
473 ; CHECK-NEXT: vsetvli zero, a2, e32, m2, ta, ma
474 ; CHECK-NEXT: vsse32.v v8, (a0), a1, v0.t
476 call void @llvm.experimental.vp.strided.store.nxv3f32.p0.i32(<vscale x 3 x float> %v, ptr %ptr, i32 %stride, <vscale x 3 x i1> %mask, i32 %evl)
480 define void @strided_vpstore_nxv3f32_allones_mask(<vscale x 3 x float> %v, ptr %ptr, i32 signext %stride, i32 zeroext %evl) {
481 ; CHECK-LABEL: strided_vpstore_nxv3f32_allones_mask:
483 ; CHECK-NEXT: vsetvli zero, a2, e32, m2, ta, ma
484 ; CHECK-NEXT: vsse32.v v8, (a0), a1
486 %one = insertelement <vscale x 3 x i1> poison, i1 true, i32 0
487 %allones = shufflevector <vscale x 3 x i1> %one, <vscale x 3 x i1> poison, <vscale x 3 x i32> zeroinitializer
488 call void @llvm.experimental.vp.strided.store.nxv3f32.p0.i32(<vscale x 3 x float> %v, ptr %ptr, i32 %stride, <vscale x 3 x i1> %allones, i32 %evl)
492 declare void @llvm.experimental.vp.strided.store.nxv3f32.p0.i32(<vscale x 3 x float>, ptr , i32, <vscale x 3 x i1>, i32)
495 define void @strided_store_nxv16f64(<vscale x 16 x double> %v, ptr %ptr, i32 signext %stride, <vscale x 16 x i1> %mask, i32 zeroext %evl) {
496 ; CHECK-LABEL: strided_store_nxv16f64:
498 ; CHECK-NEXT: csrr a3, vlenb
499 ; CHECK-NEXT: mv a4, a2
500 ; CHECK-NEXT: bltu a2, a3, .LBB41_2
501 ; CHECK-NEXT: # %bb.1:
502 ; CHECK-NEXT: mv a4, a3
503 ; CHECK-NEXT: .LBB41_2:
504 ; CHECK-NEXT: vsetvli zero, a4, e64, m8, ta, ma
505 ; CHECK-NEXT: vsse64.v v8, (a0), a1, v0.t
506 ; CHECK-NEXT: sub a5, a2, a3
507 ; CHECK-NEXT: sltu a2, a2, a5
508 ; CHECK-NEXT: addi a2, a2, -1
509 ; CHECK-NEXT: and a2, a2, a5
510 ; CHECK-NEXT: mul a4, a4, a1
511 ; CHECK-NEXT: add a0, a0, a4
512 ; CHECK-NEXT: srli a3, a3, 3
513 ; CHECK-NEXT: vsetvli a4, zero, e8, mf4, ta, ma
514 ; CHECK-NEXT: vslidedown.vx v0, v0, a3
515 ; CHECK-NEXT: vsetvli zero, a2, e64, m8, ta, ma
516 ; CHECK-NEXT: vsse64.v v16, (a0), a1, v0.t
518 call void @llvm.experimental.vp.strided.store.nxv16f64.p0.i32(<vscale x 16 x double> %v, ptr %ptr, i32 %stride, <vscale x 16 x i1> %mask, i32 %evl)
522 define void @strided_store_nxv16f64_allones_mask(<vscale x 16 x double> %v, ptr %ptr, i32 signext %stride, i32 zeroext %evl) {
523 ; CHECK-LABEL: strided_store_nxv16f64_allones_mask:
525 ; CHECK-NEXT: csrr a3, vlenb
526 ; CHECK-NEXT: mv a4, a2
527 ; CHECK-NEXT: bltu a2, a3, .LBB42_2
528 ; CHECK-NEXT: # %bb.1:
529 ; CHECK-NEXT: mv a4, a3
530 ; CHECK-NEXT: .LBB42_2:
531 ; CHECK-NEXT: vsetvli zero, a4, e64, m8, ta, ma
532 ; CHECK-NEXT: vsse64.v v8, (a0), a1
533 ; CHECK-NEXT: sub a3, a2, a3
534 ; CHECK-NEXT: sltu a2, a2, a3
535 ; CHECK-NEXT: addi a2, a2, -1
536 ; CHECK-NEXT: and a2, a2, a3
537 ; CHECK-NEXT: mul a3, a4, a1
538 ; CHECK-NEXT: add a0, a0, a3
539 ; CHECK-NEXT: vsetvli zero, a2, e64, m8, ta, ma
540 ; CHECK-NEXT: vsse64.v v16, (a0), a1
542 %one = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
543 %allones = shufflevector <vscale x 16 x i1> %one, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
544 call void @llvm.experimental.vp.strided.store.nxv16f64.p0.i32(<vscale x 16 x double> %v, ptr %ptr, i32 %stride, <vscale x 16 x i1> %allones, i32 %evl)
548 declare void @llvm.experimental.vp.strided.store.nxv16f64.p0.i32(<vscale x 16 x double>, ptr, i32, <vscale x 16 x i1>, i32)
550 ; Widening + splitting (with HiIsEmpty == true)
551 define void @strided_store_nxv17f64(<vscale x 17 x double> %v, ptr %ptr, i32 signext %stride, <vscale x 17 x i1> %mask, i32 zeroext %evl) {
552 ; CHECK-LABEL: strided_store_nxv17f64:
554 ; CHECK-NEXT: csrr a4, vlenb
555 ; CHECK-NEXT: slli a6, a4, 1
556 ; CHECK-NEXT: vmv1r.v v24, v0
557 ; CHECK-NEXT: mv a5, a3
558 ; CHECK-NEXT: bltu a3, a6, .LBB43_2
559 ; CHECK-NEXT: # %bb.1:
560 ; CHECK-NEXT: mv a5, a6
561 ; CHECK-NEXT: .LBB43_2:
562 ; CHECK-NEXT: mv a7, a5
563 ; CHECK-NEXT: bltu a5, a4, .LBB43_4
564 ; CHECK-NEXT: # %bb.3:
565 ; CHECK-NEXT: mv a7, a4
566 ; CHECK-NEXT: .LBB43_4:
567 ; CHECK-NEXT: addi sp, sp, -16
568 ; CHECK-NEXT: .cfi_def_cfa_offset 16
569 ; CHECK-NEXT: csrr t0, vlenb
570 ; CHECK-NEXT: slli t0, t0, 3
571 ; CHECK-NEXT: sub sp, sp, t0
572 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
573 ; CHECK-NEXT: vl8re64.v v0, (a0)
574 ; CHECK-NEXT: addi a0, sp, 16
575 ; CHECK-NEXT: vs8r.v v0, (a0) # Unknown-size Folded Spill
576 ; CHECK-NEXT: vsetvli zero, a7, e64, m8, ta, ma
577 ; CHECK-NEXT: vmv1r.v v0, v24
578 ; CHECK-NEXT: vsse64.v v8, (a1), a2, v0.t
579 ; CHECK-NEXT: sub a0, a5, a4
580 ; CHECK-NEXT: sltu t0, a5, a0
581 ; CHECK-NEXT: addi t0, t0, -1
582 ; CHECK-NEXT: and a0, t0, a0
583 ; CHECK-NEXT: mul a7, a7, a2
584 ; CHECK-NEXT: add a7, a1, a7
585 ; CHECK-NEXT: srli t0, a4, 3
586 ; CHECK-NEXT: vsetvli t1, zero, e8, mf4, ta, ma
587 ; CHECK-NEXT: vslidedown.vx v0, v24, t0
588 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
589 ; CHECK-NEXT: sub a0, a3, a6
590 ; CHECK-NEXT: sltu a3, a3, a0
591 ; CHECK-NEXT: addi a3, a3, -1
592 ; CHECK-NEXT: and a0, a3, a0
593 ; CHECK-NEXT: vsse64.v v16, (a7), a2, v0.t
594 ; CHECK-NEXT: bltu a0, a4, .LBB43_6
595 ; CHECK-NEXT: # %bb.5:
596 ; CHECK-NEXT: mv a0, a4
597 ; CHECK-NEXT: .LBB43_6:
598 ; CHECK-NEXT: mul a3, a5, a2
599 ; CHECK-NEXT: add a1, a1, a3
600 ; CHECK-NEXT: srli a4, a4, 2
601 ; CHECK-NEXT: vsetvli a3, zero, e8, mf2, ta, ma
602 ; CHECK-NEXT: vslidedown.vx v0, v24, a4
603 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
604 ; CHECK-NEXT: addi a0, sp, 16
605 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
606 ; CHECK-NEXT: vsse64.v v8, (a1), a2, v0.t
607 ; CHECK-NEXT: csrr a0, vlenb
608 ; CHECK-NEXT: slli a0, a0, 3
609 ; CHECK-NEXT: add sp, sp, a0
610 ; CHECK-NEXT: addi sp, sp, 16
612 call void @llvm.experimental.vp.strided.store.nxv17f64.p0.i32(<vscale x 17 x double> %v, ptr %ptr, i32 %stride, <vscale x 17 x i1> %mask, i32 %evl)
616 declare void @llvm.experimental.vp.strided.store.nxv17f64.p0.i32(<vscale x 17 x double>, ptr, i32, <vscale x 17 x i1>, i32)