1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=RV64
7 declare void @llvm.vp.scatter.nxv1i8.nxv1p0(<vscale x 1 x i8>, <vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
9 define void @vpscatter_nxv1i8(<vscale x 1 x i8> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
10 ; RV32-LABEL: vpscatter_nxv1i8:
12 ; RV32-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
13 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
16 ; RV64-LABEL: vpscatter_nxv1i8:
18 ; RV64-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
19 ; RV64-NEXT: vsoxei64.v v8, (zero), v9, v0.t
21 call void @llvm.vp.scatter.nxv1i8.nxv1p0(<vscale x 1 x i8> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
25 declare void @llvm.vp.scatter.nxv2i8.nxv2p0(<vscale x 2 x i8>, <vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
27 define void @vpscatter_nxv2i8(<vscale x 2 x i8> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
28 ; RV32-LABEL: vpscatter_nxv2i8:
30 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
31 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
34 ; RV64-LABEL: vpscatter_nxv2i8:
36 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
37 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
39 call void @llvm.vp.scatter.nxv2i8.nxv2p0(<vscale x 2 x i8> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
43 define void @vpscatter_nxv2i16_truncstore_nxv2i8(<vscale x 2 x i16> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
44 ; RV32-LABEL: vpscatter_nxv2i16_truncstore_nxv2i8:
46 ; RV32-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
47 ; RV32-NEXT: vnsrl.wi v8, v8, 0
48 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
49 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
52 ; RV64-LABEL: vpscatter_nxv2i16_truncstore_nxv2i8:
54 ; RV64-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
55 ; RV64-NEXT: vnsrl.wi v8, v8, 0
56 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
57 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
59 %tval = trunc <vscale x 2 x i16> %val to <vscale x 2 x i8>
60 call void @llvm.vp.scatter.nxv2i8.nxv2p0(<vscale x 2 x i8> %tval, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
64 define void @vpscatter_nxv2i32_truncstore_nxv2i8(<vscale x 2 x i32> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
65 ; RV32-LABEL: vpscatter_nxv2i32_truncstore_nxv2i8:
67 ; RV32-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
68 ; RV32-NEXT: vnsrl.wi v8, v8, 0
69 ; RV32-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
70 ; RV32-NEXT: vnsrl.wi v8, v8, 0
71 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
72 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
75 ; RV64-LABEL: vpscatter_nxv2i32_truncstore_nxv2i8:
77 ; RV64-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
78 ; RV64-NEXT: vnsrl.wi v8, v8, 0
79 ; RV64-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
80 ; RV64-NEXT: vnsrl.wi v8, v8, 0
81 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
82 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
84 %tval = trunc <vscale x 2 x i32> %val to <vscale x 2 x i8>
85 call void @llvm.vp.scatter.nxv2i8.nxv2p0(<vscale x 2 x i8> %tval, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
89 define void @vpscatter_nxv2i64_truncstore_nxv2i8(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
90 ; RV32-LABEL: vpscatter_nxv2i64_truncstore_nxv2i8:
92 ; RV32-NEXT: vsetvli a1, zero, e32, m1, ta, ma
93 ; RV32-NEXT: vnsrl.wi v11, v8, 0
94 ; RV32-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
95 ; RV32-NEXT: vnsrl.wi v8, v11, 0
96 ; RV32-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
97 ; RV32-NEXT: vnsrl.wi v8, v8, 0
98 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
99 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
102 ; RV64-LABEL: vpscatter_nxv2i64_truncstore_nxv2i8:
104 ; RV64-NEXT: vsetvli a1, zero, e32, m1, ta, ma
105 ; RV64-NEXT: vnsrl.wi v12, v8, 0
106 ; RV64-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
107 ; RV64-NEXT: vnsrl.wi v8, v12, 0
108 ; RV64-NEXT: vsetvli zero, zero, e8, mf4, ta, ma
109 ; RV64-NEXT: vnsrl.wi v8, v8, 0
110 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
111 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
113 %tval = trunc <vscale x 2 x i64> %val to <vscale x 2 x i8>
114 call void @llvm.vp.scatter.nxv2i8.nxv2p0(<vscale x 2 x i8> %tval, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
118 declare void @llvm.vp.scatter.nxv4i8.nxv4p0(<vscale x 4 x i8>, <vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
120 define void @vpscatter_nxv4i8(<vscale x 4 x i8> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
121 ; RV32-LABEL: vpscatter_nxv4i8:
123 ; RV32-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
124 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
127 ; RV64-LABEL: vpscatter_nxv4i8:
129 ; RV64-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
130 ; RV64-NEXT: vsoxei64.v v8, (zero), v12, v0.t
132 call void @llvm.vp.scatter.nxv4i8.nxv4p0(<vscale x 4 x i8> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
136 define void @vpscatter_truemask_nxv4i8(<vscale x 4 x i8> %val, <vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
137 ; RV32-LABEL: vpscatter_truemask_nxv4i8:
139 ; RV32-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
140 ; RV32-NEXT: vsoxei32.v v8, (zero), v10
143 ; RV64-LABEL: vpscatter_truemask_nxv4i8:
145 ; RV64-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
146 ; RV64-NEXT: vsoxei64.v v8, (zero), v12
148 %mhead = insertelement <vscale x 4 x i1> poison, i1 1, i32 0
149 %mtrue = shufflevector <vscale x 4 x i1> %mhead, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
150 call void @llvm.vp.scatter.nxv4i8.nxv4p0(<vscale x 4 x i8> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %mtrue, i32 %evl)
154 declare void @llvm.vp.scatter.nxv8i8.nxv8p0(<vscale x 8 x i8>, <vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
156 define void @vpscatter_nxv8i8(<vscale x 8 x i8> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
157 ; RV32-LABEL: vpscatter_nxv8i8:
159 ; RV32-NEXT: vsetvli zero, a0, e8, m1, ta, ma
160 ; RV32-NEXT: vsoxei32.v v8, (zero), v12, v0.t
163 ; RV64-LABEL: vpscatter_nxv8i8:
165 ; RV64-NEXT: vsetvli zero, a0, e8, m1, ta, ma
166 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
168 call void @llvm.vp.scatter.nxv8i8.nxv8p0(<vscale x 8 x i8> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
172 define void @vpscatter_baseidx_nxv8i8(<vscale x 8 x i8> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
173 ; RV32-LABEL: vpscatter_baseidx_nxv8i8:
175 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
176 ; RV32-NEXT: vsext.vf4 v12, v9
177 ; RV32-NEXT: vsetvli zero, a1, e8, m1, ta, ma
178 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
181 ; RV64-LABEL: vpscatter_baseidx_nxv8i8:
183 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
184 ; RV64-NEXT: vsext.vf8 v16, v9
185 ; RV64-NEXT: vsetvli zero, a1, e8, m1, ta, ma
186 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
188 %ptrs = getelementptr inbounds i8, ptr %base, <vscale x 8 x i8> %idxs
189 call void @llvm.vp.scatter.nxv8i8.nxv8p0(<vscale x 8 x i8> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
193 declare void @llvm.vp.scatter.nxv1i16.nxv1p0(<vscale x 1 x i16>, <vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
195 define void @vpscatter_nxv1i16(<vscale x 1 x i16> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
196 ; RV32-LABEL: vpscatter_nxv1i16:
198 ; RV32-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
199 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
202 ; RV64-LABEL: vpscatter_nxv1i16:
204 ; RV64-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
205 ; RV64-NEXT: vsoxei64.v v8, (zero), v9, v0.t
207 call void @llvm.vp.scatter.nxv1i16.nxv1p0(<vscale x 1 x i16> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
211 declare void @llvm.vp.scatter.nxv2i16.nxv2p0(<vscale x 2 x i16>, <vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
213 define void @vpscatter_nxv2i16(<vscale x 2 x i16> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
214 ; RV32-LABEL: vpscatter_nxv2i16:
216 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
217 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
220 ; RV64-LABEL: vpscatter_nxv2i16:
222 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
223 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
225 call void @llvm.vp.scatter.nxv2i16.nxv2p0(<vscale x 2 x i16> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
229 define void @vpscatter_nxv2i32_truncstore_nxv2i16(<vscale x 2 x i32> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
230 ; RV32-LABEL: vpscatter_nxv2i32_truncstore_nxv2i16:
232 ; RV32-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
233 ; RV32-NEXT: vnsrl.wi v8, v8, 0
234 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
235 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
238 ; RV64-LABEL: vpscatter_nxv2i32_truncstore_nxv2i16:
240 ; RV64-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
241 ; RV64-NEXT: vnsrl.wi v8, v8, 0
242 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
243 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
245 %tval = trunc <vscale x 2 x i32> %val to <vscale x 2 x i16>
246 call void @llvm.vp.scatter.nxv2i16.nxv2p0(<vscale x 2 x i16> %tval, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
250 define void @vpscatter_nxv2i64_truncstore_nxv2i16(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
251 ; RV32-LABEL: vpscatter_nxv2i64_truncstore_nxv2i16:
253 ; RV32-NEXT: vsetvli a1, zero, e32, m1, ta, ma
254 ; RV32-NEXT: vnsrl.wi v11, v8, 0
255 ; RV32-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
256 ; RV32-NEXT: vnsrl.wi v8, v11, 0
257 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
258 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
261 ; RV64-LABEL: vpscatter_nxv2i64_truncstore_nxv2i16:
263 ; RV64-NEXT: vsetvli a1, zero, e32, m1, ta, ma
264 ; RV64-NEXT: vnsrl.wi v12, v8, 0
265 ; RV64-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
266 ; RV64-NEXT: vnsrl.wi v8, v12, 0
267 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
268 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
270 %tval = trunc <vscale x 2 x i64> %val to <vscale x 2 x i16>
271 call void @llvm.vp.scatter.nxv2i16.nxv2p0(<vscale x 2 x i16> %tval, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
275 declare void @llvm.vp.scatter.nxv4i16.nxv4p0(<vscale x 4 x i16>, <vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
277 define void @vpscatter_nxv4i16(<vscale x 4 x i16> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
278 ; RV32-LABEL: vpscatter_nxv4i16:
280 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
281 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
284 ; RV64-LABEL: vpscatter_nxv4i16:
286 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
287 ; RV64-NEXT: vsoxei64.v v8, (zero), v12, v0.t
289 call void @llvm.vp.scatter.nxv4i16.nxv4p0(<vscale x 4 x i16> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
293 define void @vpscatter_truemask_nxv4i16(<vscale x 4 x i16> %val, <vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
294 ; RV32-LABEL: vpscatter_truemask_nxv4i16:
296 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
297 ; RV32-NEXT: vsoxei32.v v8, (zero), v10
300 ; RV64-LABEL: vpscatter_truemask_nxv4i16:
302 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
303 ; RV64-NEXT: vsoxei64.v v8, (zero), v12
305 %mhead = insertelement <vscale x 4 x i1> poison, i1 1, i32 0
306 %mtrue = shufflevector <vscale x 4 x i1> %mhead, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
307 call void @llvm.vp.scatter.nxv4i16.nxv4p0(<vscale x 4 x i16> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %mtrue, i32 %evl)
311 declare void @llvm.vp.scatter.nxv8i16.nxv8p0(<vscale x 8 x i16>, <vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
313 define void @vpscatter_nxv8i16(<vscale x 8 x i16> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
314 ; RV32-LABEL: vpscatter_nxv8i16:
316 ; RV32-NEXT: vsetvli zero, a0, e16, m2, ta, ma
317 ; RV32-NEXT: vsoxei32.v v8, (zero), v12, v0.t
320 ; RV64-LABEL: vpscatter_nxv8i16:
322 ; RV64-NEXT: vsetvli zero, a0, e16, m2, ta, ma
323 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
325 call void @llvm.vp.scatter.nxv8i16.nxv8p0(<vscale x 8 x i16> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
329 define void @vpscatter_baseidx_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
330 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8i16:
332 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
333 ; RV32-NEXT: vsext.vf4 v12, v10
334 ; RV32-NEXT: vadd.vv v12, v12, v12
335 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
336 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
339 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8i16:
341 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
342 ; RV64-NEXT: vsext.vf8 v16, v10
343 ; RV64-NEXT: vadd.vv v16, v16, v16
344 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
345 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
347 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i8> %idxs
348 call void @llvm.vp.scatter.nxv8i16.nxv8p0(<vscale x 8 x i16> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
352 define void @vpscatter_baseidx_sext_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
353 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i16:
355 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
356 ; RV32-NEXT: vsext.vf4 v12, v10
357 ; RV32-NEXT: vadd.vv v12, v12, v12
358 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
359 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
362 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i16:
364 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
365 ; RV64-NEXT: vsext.vf8 v16, v10
366 ; RV64-NEXT: vadd.vv v16, v16, v16
367 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
368 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
370 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
371 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %eidxs
372 call void @llvm.vp.scatter.nxv8i16.nxv8p0(<vscale x 8 x i16> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
376 define void @vpscatter_baseidx_zext_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
377 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i16:
379 ; RV32-NEXT: vsetvli a2, zero, e8, m1, ta, ma
380 ; RV32-NEXT: vwaddu.vv v12, v10, v10
381 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
382 ; RV32-NEXT: vsoxei16.v v8, (a0), v12, v0.t
385 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i16:
387 ; RV64-NEXT: vsetvli a2, zero, e8, m1, ta, ma
388 ; RV64-NEXT: vwaddu.vv v12, v10, v10
389 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
390 ; RV64-NEXT: vsoxei16.v v8, (a0), v12, v0.t
392 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
393 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %eidxs
394 call void @llvm.vp.scatter.nxv8i16.nxv8p0(<vscale x 8 x i16> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
398 define void @vpscatter_baseidx_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
399 ; RV32-LABEL: vpscatter_baseidx_nxv8i16:
401 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
402 ; RV32-NEXT: vwadd.vv v12, v10, v10
403 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
404 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
407 ; RV64-LABEL: vpscatter_baseidx_nxv8i16:
409 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
410 ; RV64-NEXT: vsext.vf4 v16, v10
411 ; RV64-NEXT: vadd.vv v16, v16, v16
412 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
413 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
415 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %idxs
416 call void @llvm.vp.scatter.nxv8i16.nxv8p0(<vscale x 8 x i16> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
420 declare void @llvm.vp.scatter.nxv1i32.nxv1p0(<vscale x 1 x i32>, <vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
422 define void @vpscatter_nxv1i32(<vscale x 1 x i32> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
423 ; RV32-LABEL: vpscatter_nxv1i32:
425 ; RV32-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
426 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
429 ; RV64-LABEL: vpscatter_nxv1i32:
431 ; RV64-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
432 ; RV64-NEXT: vsoxei64.v v8, (zero), v9, v0.t
434 call void @llvm.vp.scatter.nxv1i32.nxv1p0(<vscale x 1 x i32> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
438 declare void @llvm.vp.scatter.nxv2i32.nxv2p0(<vscale x 2 x i32>, <vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
440 define void @vpscatter_nxv2i32(<vscale x 2 x i32> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
441 ; RV32-LABEL: vpscatter_nxv2i32:
443 ; RV32-NEXT: vsetvli zero, a0, e32, m1, ta, ma
444 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
447 ; RV64-LABEL: vpscatter_nxv2i32:
449 ; RV64-NEXT: vsetvli zero, a0, e32, m1, ta, ma
450 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
452 call void @llvm.vp.scatter.nxv2i32.nxv2p0(<vscale x 2 x i32> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
456 define void @vpscatter_nxv2i64_truncstore_nxv2i32(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
457 ; RV32-LABEL: vpscatter_nxv2i64_truncstore_nxv2i32:
459 ; RV32-NEXT: vsetvli a1, zero, e32, m1, ta, ma
460 ; RV32-NEXT: vnsrl.wi v11, v8, 0
461 ; RV32-NEXT: vsetvli zero, a0, e32, m1, ta, ma
462 ; RV32-NEXT: vsoxei32.v v11, (zero), v10, v0.t
465 ; RV64-LABEL: vpscatter_nxv2i64_truncstore_nxv2i32:
467 ; RV64-NEXT: vsetvli a1, zero, e32, m1, ta, ma
468 ; RV64-NEXT: vnsrl.wi v12, v8, 0
469 ; RV64-NEXT: vsetvli zero, a0, e32, m1, ta, ma
470 ; RV64-NEXT: vsoxei64.v v12, (zero), v10, v0.t
472 %tval = trunc <vscale x 2 x i64> %val to <vscale x 2 x i32>
473 call void @llvm.vp.scatter.nxv2i32.nxv2p0(<vscale x 2 x i32> %tval, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
477 declare void @llvm.vp.scatter.nxv4i32.nxv4p0(<vscale x 4 x i32>, <vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
479 define void @vpscatter_nxv4i32(<vscale x 4 x i32> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
480 ; RV32-LABEL: vpscatter_nxv4i32:
482 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
483 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
486 ; RV64-LABEL: vpscatter_nxv4i32:
488 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
489 ; RV64-NEXT: vsoxei64.v v8, (zero), v12, v0.t
491 call void @llvm.vp.scatter.nxv4i32.nxv4p0(<vscale x 4 x i32> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
495 define void @vpscatter_truemask_nxv4i32(<vscale x 4 x i32> %val, <vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
496 ; RV32-LABEL: vpscatter_truemask_nxv4i32:
498 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
499 ; RV32-NEXT: vsoxei32.v v8, (zero), v10
502 ; RV64-LABEL: vpscatter_truemask_nxv4i32:
504 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
505 ; RV64-NEXT: vsoxei64.v v8, (zero), v12
507 %mhead = insertelement <vscale x 4 x i1> poison, i1 1, i32 0
508 %mtrue = shufflevector <vscale x 4 x i1> %mhead, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
509 call void @llvm.vp.scatter.nxv4i32.nxv4p0(<vscale x 4 x i32> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %mtrue, i32 %evl)
513 declare void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32>, <vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
515 define void @vpscatter_nxv8i32(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
516 ; RV32-LABEL: vpscatter_nxv8i32:
518 ; RV32-NEXT: vsetvli zero, a0, e32, m4, ta, ma
519 ; RV32-NEXT: vsoxei32.v v8, (zero), v12, v0.t
522 ; RV64-LABEL: vpscatter_nxv8i32:
524 ; RV64-NEXT: vsetvli zero, a0, e32, m4, ta, ma
525 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
527 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
531 define void @vpscatter_baseidx_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
532 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8i32:
534 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
535 ; RV32-NEXT: vsext.vf4 v16, v12
536 ; RV32-NEXT: vsll.vi v12, v16, 2
537 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
538 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
541 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8i32:
543 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
544 ; RV64-NEXT: vsext.vf8 v16, v12
545 ; RV64-NEXT: vsll.vi v16, v16, 2
546 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
547 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
549 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i8> %idxs
550 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
554 define void @vpscatter_baseidx_sext_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
555 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i32:
557 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
558 ; RV32-NEXT: vsext.vf4 v16, v12
559 ; RV32-NEXT: vsll.vi v12, v16, 2
560 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
561 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
564 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i32:
566 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
567 ; RV64-NEXT: vsext.vf8 v16, v12
568 ; RV64-NEXT: vsll.vi v16, v16, 2
569 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
570 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
572 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
573 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
574 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
578 define void @vpscatter_baseidx_zext_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
579 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i32:
581 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
582 ; RV32-NEXT: vzext.vf2 v14, v12
583 ; RV32-NEXT: vsll.vi v12, v14, 2
584 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
585 ; RV32-NEXT: vsoxei16.v v8, (a0), v12, v0.t
588 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i32:
590 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
591 ; RV64-NEXT: vzext.vf2 v14, v12
592 ; RV64-NEXT: vsll.vi v12, v14, 2
593 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
594 ; RV64-NEXT: vsoxei16.v v8, (a0), v12, v0.t
596 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
597 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
598 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
602 define void @vpscatter_baseidx_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
603 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8i32:
605 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
606 ; RV32-NEXT: vsext.vf2 v16, v12
607 ; RV32-NEXT: vsll.vi v12, v16, 2
608 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
609 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
612 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8i32:
614 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
615 ; RV64-NEXT: vsext.vf4 v16, v12
616 ; RV64-NEXT: vsll.vi v16, v16, 2
617 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
618 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
620 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i16> %idxs
621 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
625 define void @vpscatter_baseidx_sext_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
626 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i32:
628 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
629 ; RV32-NEXT: vsext.vf2 v16, v12
630 ; RV32-NEXT: vsll.vi v12, v16, 2
631 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
632 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
635 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i32:
637 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
638 ; RV64-NEXT: vsext.vf4 v16, v12
639 ; RV64-NEXT: vsll.vi v16, v16, 2
640 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
641 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
643 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
644 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
645 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
649 define void @vpscatter_baseidx_zext_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
650 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i32:
652 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
653 ; RV32-NEXT: vzext.vf2 v16, v12
654 ; RV32-NEXT: vsll.vi v12, v16, 2
655 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
656 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
659 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i32:
661 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
662 ; RV64-NEXT: vzext.vf2 v16, v12
663 ; RV64-NEXT: vsll.vi v12, v16, 2
664 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
665 ; RV64-NEXT: vsoxei32.v v8, (a0), v12, v0.t
667 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
668 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
669 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
673 define void @vpscatter_baseidx_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
674 ; RV32-LABEL: vpscatter_baseidx_nxv8i32:
676 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
677 ; RV32-NEXT: vsll.vi v12, v12, 2
678 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
679 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
682 ; RV64-LABEL: vpscatter_baseidx_nxv8i32:
684 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
685 ; RV64-NEXT: vsext.vf2 v16, v12
686 ; RV64-NEXT: vsll.vi v16, v16, 2
687 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
688 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
690 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %idxs
691 call void @llvm.vp.scatter.nxv8i32.nxv8p0(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
695 declare void @llvm.vp.scatter.nxv1i64.nxv1p0(<vscale x 1 x i64>, <vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
697 define void @vpscatter_nxv1i64(<vscale x 1 x i64> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
698 ; RV32-LABEL: vpscatter_nxv1i64:
700 ; RV32-NEXT: vsetvli zero, a0, e64, m1, ta, ma
701 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
704 ; RV64-LABEL: vpscatter_nxv1i64:
706 ; RV64-NEXT: vsetvli zero, a0, e64, m1, ta, ma
707 ; RV64-NEXT: vsoxei64.v v8, (zero), v9, v0.t
709 call void @llvm.vp.scatter.nxv1i64.nxv1p0(<vscale x 1 x i64> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
713 declare void @llvm.vp.scatter.nxv2i64.nxv2p0(<vscale x 2 x i64>, <vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
715 define void @vpscatter_nxv2i64(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
716 ; RV32-LABEL: vpscatter_nxv2i64:
718 ; RV32-NEXT: vsetvli zero, a0, e64, m2, ta, ma
719 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
722 ; RV64-LABEL: vpscatter_nxv2i64:
724 ; RV64-NEXT: vsetvli zero, a0, e64, m2, ta, ma
725 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
727 call void @llvm.vp.scatter.nxv2i64.nxv2p0(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
731 declare void @llvm.vp.scatter.nxv4i64.nxv4p0(<vscale x 4 x i64>, <vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
733 define void @vpscatter_nxv4i64(<vscale x 4 x i64> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
734 ; RV32-LABEL: vpscatter_nxv4i64:
736 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
737 ; RV32-NEXT: vsoxei32.v v8, (zero), v12, v0.t
740 ; RV64-LABEL: vpscatter_nxv4i64:
742 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
743 ; RV64-NEXT: vsoxei64.v v8, (zero), v12, v0.t
745 call void @llvm.vp.scatter.nxv4i64.nxv4p0(<vscale x 4 x i64> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
749 define void @vpscatter_truemask_nxv4i64(<vscale x 4 x i64> %val, <vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
750 ; RV32-LABEL: vpscatter_truemask_nxv4i64:
752 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
753 ; RV32-NEXT: vsoxei32.v v8, (zero), v12
756 ; RV64-LABEL: vpscatter_truemask_nxv4i64:
758 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
759 ; RV64-NEXT: vsoxei64.v v8, (zero), v12
761 %mhead = insertelement <vscale x 4 x i1> poison, i1 1, i32 0
762 %mtrue = shufflevector <vscale x 4 x i1> %mhead, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
763 call void @llvm.vp.scatter.nxv4i64.nxv4p0(<vscale x 4 x i64> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %mtrue, i32 %evl)
767 declare void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64>, <vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
769 define void @vpscatter_nxv8i64(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
770 ; RV32-LABEL: vpscatter_nxv8i64:
772 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma
773 ; RV32-NEXT: vsoxei32.v v8, (zero), v16, v0.t
776 ; RV64-LABEL: vpscatter_nxv8i64:
778 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
779 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
781 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
785 define void @vpscatter_baseidx_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
786 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8i64:
788 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
789 ; RV32-NEXT: vsext.vf4 v20, v16
790 ; RV32-NEXT: vsll.vi v16, v20, 3
791 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
792 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
795 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8i64:
797 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
798 ; RV64-NEXT: vsext.vf8 v24, v16
799 ; RV64-NEXT: vsll.vi v16, v24, 3
800 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
801 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
803 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i8> %idxs
804 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
808 define void @vpscatter_baseidx_sext_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
809 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i64:
811 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
812 ; RV32-NEXT: vsext.vf4 v20, v16
813 ; RV32-NEXT: vsll.vi v16, v20, 3
814 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
815 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
818 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i64:
820 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
821 ; RV64-NEXT: vsext.vf8 v24, v16
822 ; RV64-NEXT: vsll.vi v16, v24, 3
823 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
824 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
826 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
827 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
828 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
832 define void @vpscatter_baseidx_zext_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
833 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i64:
835 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
836 ; RV32-NEXT: vzext.vf2 v18, v16
837 ; RV32-NEXT: vsll.vi v16, v18, 3
838 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
839 ; RV32-NEXT: vsoxei16.v v8, (a0), v16, v0.t
842 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i64:
844 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
845 ; RV64-NEXT: vzext.vf2 v18, v16
846 ; RV64-NEXT: vsll.vi v16, v18, 3
847 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
848 ; RV64-NEXT: vsoxei16.v v8, (a0), v16, v0.t
850 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
851 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
852 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
856 define void @vpscatter_baseidx_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
857 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8i64:
859 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
860 ; RV32-NEXT: vsext.vf2 v20, v16
861 ; RV32-NEXT: vsll.vi v16, v20, 3
862 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
863 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
866 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8i64:
868 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
869 ; RV64-NEXT: vsext.vf4 v24, v16
870 ; RV64-NEXT: vsll.vi v16, v24, 3
871 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
872 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
874 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i16> %idxs
875 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
879 define void @vpscatter_baseidx_sext_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
880 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i64:
882 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
883 ; RV32-NEXT: vsext.vf2 v20, v16
884 ; RV32-NEXT: vsll.vi v16, v20, 3
885 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
886 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
889 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i64:
891 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
892 ; RV64-NEXT: vsext.vf4 v24, v16
893 ; RV64-NEXT: vsll.vi v16, v24, 3
894 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
895 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
897 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
898 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
899 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
903 define void @vpscatter_baseidx_zext_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
904 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i64:
906 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
907 ; RV32-NEXT: vzext.vf2 v20, v16
908 ; RV32-NEXT: vsll.vi v16, v20, 3
909 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
910 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
913 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i64:
915 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
916 ; RV64-NEXT: vzext.vf2 v20, v16
917 ; RV64-NEXT: vsll.vi v16, v20, 3
918 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
919 ; RV64-NEXT: vsoxei32.v v8, (a0), v16, v0.t
921 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
922 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
923 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
927 define void @vpscatter_baseidx_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
928 ; RV32-LABEL: vpscatter_baseidx_nxv8i32_nxv8i64:
930 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
931 ; RV32-NEXT: vsll.vi v16, v16, 3
932 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
933 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
936 ; RV64-LABEL: vpscatter_baseidx_nxv8i32_nxv8i64:
938 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
939 ; RV64-NEXT: vsext.vf2 v24, v16
940 ; RV64-NEXT: vsll.vi v16, v24, 3
941 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
942 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
944 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i32> %idxs
945 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
949 define void @vpscatter_baseidx_sext_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
950 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8i64:
952 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
953 ; RV32-NEXT: vsll.vi v16, v16, 3
954 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
955 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
958 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8i64:
960 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
961 ; RV64-NEXT: vsext.vf2 v24, v16
962 ; RV64-NEXT: vsll.vi v16, v24, 3
963 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
964 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
966 %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
967 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
968 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
972 define void @vpscatter_baseidx_zext_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
973 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8i64:
975 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
976 ; RV32-NEXT: vsll.vi v16, v16, 3
977 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
978 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
981 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8i64:
983 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
984 ; RV64-NEXT: vzext.vf2 v24, v16
985 ; RV64-NEXT: vsll.vi v16, v24, 3
986 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
987 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
989 %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
990 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
991 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
995 define void @vpscatter_baseidx_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
996 ; RV32-LABEL: vpscatter_baseidx_nxv8i64:
998 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
999 ; RV32-NEXT: vnsrl.wi v24, v16, 0
1000 ; RV32-NEXT: vsll.vi v16, v24, 3
1001 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1002 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1005 ; RV64-LABEL: vpscatter_baseidx_nxv8i64:
1007 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1008 ; RV64-NEXT: vsll.vi v16, v16, 3
1009 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1010 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1012 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %idxs
1013 call void @llvm.vp.scatter.nxv8i64.nxv8p0(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1017 declare void @llvm.vp.scatter.nxv1f16.nxv1p0(<vscale x 1 x half>, <vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
1019 define void @vpscatter_nxv1f16(<vscale x 1 x half> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1020 ; RV32-LABEL: vpscatter_nxv1f16:
1022 ; RV32-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1023 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
1026 ; RV64-LABEL: vpscatter_nxv1f16:
1028 ; RV64-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1029 ; RV64-NEXT: vsoxei64.v v8, (zero), v9, v0.t
1031 call void @llvm.vp.scatter.nxv1f16.nxv1p0(<vscale x 1 x half> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
1035 declare void @llvm.vp.scatter.nxv2f16.nxv2p0(<vscale x 2 x half>, <vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
1037 define void @vpscatter_nxv2f16(<vscale x 2 x half> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1038 ; RV32-LABEL: vpscatter_nxv2f16:
1040 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1041 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
1044 ; RV64-LABEL: vpscatter_nxv2f16:
1046 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1047 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
1049 call void @llvm.vp.scatter.nxv2f16.nxv2p0(<vscale x 2 x half> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
1053 declare void @llvm.vp.scatter.nxv4f16.nxv4p0(<vscale x 4 x half>, <vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
1055 define void @vpscatter_nxv4f16(<vscale x 4 x half> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1056 ; RV32-LABEL: vpscatter_nxv4f16:
1058 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1059 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
1062 ; RV64-LABEL: vpscatter_nxv4f16:
1064 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1065 ; RV64-NEXT: vsoxei64.v v8, (zero), v12, v0.t
1067 call void @llvm.vp.scatter.nxv4f16.nxv4p0(<vscale x 4 x half> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
1071 define void @vpscatter_truemask_nxv4f16(<vscale x 4 x half> %val, <vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
1072 ; RV32-LABEL: vpscatter_truemask_nxv4f16:
1074 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1075 ; RV32-NEXT: vsoxei32.v v8, (zero), v10
1078 ; RV64-LABEL: vpscatter_truemask_nxv4f16:
1080 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1081 ; RV64-NEXT: vsoxei64.v v8, (zero), v12
1083 %mhead = insertelement <vscale x 4 x i1> poison, i1 1, i32 0
1084 %mtrue = shufflevector <vscale x 4 x i1> %mhead, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1085 call void @llvm.vp.scatter.nxv4f16.nxv4p0(<vscale x 4 x half> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %mtrue, i32 %evl)
1089 declare void @llvm.vp.scatter.nxv8f16.nxv8p0(<vscale x 8 x half>, <vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
1091 define void @vpscatter_nxv8f16(<vscale x 8 x half> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1092 ; RV32-LABEL: vpscatter_nxv8f16:
1094 ; RV32-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1095 ; RV32-NEXT: vsoxei32.v v8, (zero), v12, v0.t
1098 ; RV64-LABEL: vpscatter_nxv8f16:
1100 ; RV64-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1101 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
1103 call void @llvm.vp.scatter.nxv8f16.nxv8p0(<vscale x 8 x half> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1107 define void @vpscatter_baseidx_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1108 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8f16:
1110 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1111 ; RV32-NEXT: vsext.vf4 v12, v10
1112 ; RV32-NEXT: vadd.vv v12, v12, v12
1113 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1114 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1117 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8f16:
1119 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1120 ; RV64-NEXT: vsext.vf8 v16, v10
1121 ; RV64-NEXT: vadd.vv v16, v16, v16
1122 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1123 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1125 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i8> %idxs
1126 call void @llvm.vp.scatter.nxv8f16.nxv8p0(<vscale x 8 x half> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1130 define void @vpscatter_baseidx_sext_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1131 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f16:
1133 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1134 ; RV32-NEXT: vsext.vf4 v12, v10
1135 ; RV32-NEXT: vadd.vv v12, v12, v12
1136 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1137 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1140 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f16:
1142 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1143 ; RV64-NEXT: vsext.vf8 v16, v10
1144 ; RV64-NEXT: vadd.vv v16, v16, v16
1145 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1146 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1148 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
1149 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %eidxs
1150 call void @llvm.vp.scatter.nxv8f16.nxv8p0(<vscale x 8 x half> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1154 define void @vpscatter_baseidx_zext_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1155 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f16:
1157 ; RV32-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1158 ; RV32-NEXT: vwaddu.vv v12, v10, v10
1159 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1160 ; RV32-NEXT: vsoxei16.v v8, (a0), v12, v0.t
1163 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f16:
1165 ; RV64-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1166 ; RV64-NEXT: vwaddu.vv v12, v10, v10
1167 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1168 ; RV64-NEXT: vsoxei16.v v8, (a0), v12, v0.t
1170 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
1171 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %eidxs
1172 call void @llvm.vp.scatter.nxv8f16.nxv8p0(<vscale x 8 x half> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1176 define void @vpscatter_baseidx_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1177 ; RV32-LABEL: vpscatter_baseidx_nxv8f16:
1179 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1180 ; RV32-NEXT: vwadd.vv v12, v10, v10
1181 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1182 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1185 ; RV64-LABEL: vpscatter_baseidx_nxv8f16:
1187 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1188 ; RV64-NEXT: vsext.vf4 v16, v10
1189 ; RV64-NEXT: vadd.vv v16, v16, v16
1190 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1191 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1193 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %idxs
1194 call void @llvm.vp.scatter.nxv8f16.nxv8p0(<vscale x 8 x half> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1198 declare void @llvm.vp.scatter.nxv1f32.nxv1p0(<vscale x 1 x float>, <vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
1200 define void @vpscatter_nxv1f32(<vscale x 1 x float> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1201 ; RV32-LABEL: vpscatter_nxv1f32:
1203 ; RV32-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1204 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
1207 ; RV64-LABEL: vpscatter_nxv1f32:
1209 ; RV64-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1210 ; RV64-NEXT: vsoxei64.v v8, (zero), v9, v0.t
1212 call void @llvm.vp.scatter.nxv1f32.nxv1p0(<vscale x 1 x float> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
1216 declare void @llvm.vp.scatter.nxv2f32.nxv2p0(<vscale x 2 x float>, <vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
1218 define void @vpscatter_nxv2f32(<vscale x 2 x float> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1219 ; RV32-LABEL: vpscatter_nxv2f32:
1221 ; RV32-NEXT: vsetvli zero, a0, e32, m1, ta, ma
1222 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
1225 ; RV64-LABEL: vpscatter_nxv2f32:
1227 ; RV64-NEXT: vsetvli zero, a0, e32, m1, ta, ma
1228 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
1230 call void @llvm.vp.scatter.nxv2f32.nxv2p0(<vscale x 2 x float> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
1234 declare void @llvm.vp.scatter.nxv4f32.nxv4p0(<vscale x 4 x float>, <vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
1236 define void @vpscatter_nxv4f32(<vscale x 4 x float> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1237 ; RV32-LABEL: vpscatter_nxv4f32:
1239 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1240 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
1243 ; RV64-LABEL: vpscatter_nxv4f32:
1245 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1246 ; RV64-NEXT: vsoxei64.v v8, (zero), v12, v0.t
1248 call void @llvm.vp.scatter.nxv4f32.nxv4p0(<vscale x 4 x float> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
1252 define void @vpscatter_truemask_nxv4f32(<vscale x 4 x float> %val, <vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
1253 ; RV32-LABEL: vpscatter_truemask_nxv4f32:
1255 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1256 ; RV32-NEXT: vsoxei32.v v8, (zero), v10
1259 ; RV64-LABEL: vpscatter_truemask_nxv4f32:
1261 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1262 ; RV64-NEXT: vsoxei64.v v8, (zero), v12
1264 %mhead = insertelement <vscale x 4 x i1> poison, i1 1, i32 0
1265 %mtrue = shufflevector <vscale x 4 x i1> %mhead, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1266 call void @llvm.vp.scatter.nxv4f32.nxv4p0(<vscale x 4 x float> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %mtrue, i32 %evl)
1270 declare void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float>, <vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
1272 define void @vpscatter_nxv8f32(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1273 ; RV32-LABEL: vpscatter_nxv8f32:
1275 ; RV32-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1276 ; RV32-NEXT: vsoxei32.v v8, (zero), v12, v0.t
1279 ; RV64-LABEL: vpscatter_nxv8f32:
1281 ; RV64-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1282 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
1284 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1288 define void @vpscatter_baseidx_nxv8i8_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1289 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8f32:
1291 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1292 ; RV32-NEXT: vsext.vf4 v16, v12
1293 ; RV32-NEXT: vsll.vi v12, v16, 2
1294 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1295 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1298 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8f32:
1300 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1301 ; RV64-NEXT: vsext.vf8 v16, v12
1302 ; RV64-NEXT: vsll.vi v16, v16, 2
1303 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1304 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1306 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i8> %idxs
1307 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1311 define void @vpscatter_baseidx_sext_nxv8i8_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1312 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f32:
1314 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1315 ; RV32-NEXT: vsext.vf4 v16, v12
1316 ; RV32-NEXT: vsll.vi v12, v16, 2
1317 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1318 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1321 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f32:
1323 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1324 ; RV64-NEXT: vsext.vf8 v16, v12
1325 ; RV64-NEXT: vsll.vi v16, v16, 2
1326 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1327 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1329 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
1330 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1331 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1335 define void @vpscatter_baseidx_zext_nxv8i8_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1336 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f32:
1338 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1339 ; RV32-NEXT: vzext.vf2 v14, v12
1340 ; RV32-NEXT: vsll.vi v12, v14, 2
1341 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1342 ; RV32-NEXT: vsoxei16.v v8, (a0), v12, v0.t
1345 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f32:
1347 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1348 ; RV64-NEXT: vzext.vf2 v14, v12
1349 ; RV64-NEXT: vsll.vi v12, v14, 2
1350 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1351 ; RV64-NEXT: vsoxei16.v v8, (a0), v12, v0.t
1353 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
1354 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1355 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1359 define void @vpscatter_baseidx_nxv8i16_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1360 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8f32:
1362 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1363 ; RV32-NEXT: vsext.vf2 v16, v12
1364 ; RV32-NEXT: vsll.vi v12, v16, 2
1365 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1366 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1369 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8f32:
1371 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1372 ; RV64-NEXT: vsext.vf4 v16, v12
1373 ; RV64-NEXT: vsll.vi v16, v16, 2
1374 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1375 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1377 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i16> %idxs
1378 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1382 define void @vpscatter_baseidx_sext_nxv8i16_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1383 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f32:
1385 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1386 ; RV32-NEXT: vsext.vf2 v16, v12
1387 ; RV32-NEXT: vsll.vi v12, v16, 2
1388 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1389 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1392 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f32:
1394 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1395 ; RV64-NEXT: vsext.vf4 v16, v12
1396 ; RV64-NEXT: vsll.vi v16, v16, 2
1397 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1398 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1400 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
1401 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1402 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1406 define void @vpscatter_baseidx_zext_nxv8i16_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1407 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f32:
1409 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1410 ; RV32-NEXT: vzext.vf2 v16, v12
1411 ; RV32-NEXT: vsll.vi v12, v16, 2
1412 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1413 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1416 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f32:
1418 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1419 ; RV64-NEXT: vzext.vf2 v16, v12
1420 ; RV64-NEXT: vsll.vi v12, v16, 2
1421 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1422 ; RV64-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1424 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
1425 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1426 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1430 define void @vpscatter_baseidx_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1431 ; RV32-LABEL: vpscatter_baseidx_nxv8f32:
1433 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1434 ; RV32-NEXT: vsll.vi v12, v12, 2
1435 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1436 ; RV32-NEXT: vsoxei32.v v8, (a0), v12, v0.t
1439 ; RV64-LABEL: vpscatter_baseidx_nxv8f32:
1441 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1442 ; RV64-NEXT: vsext.vf2 v16, v12
1443 ; RV64-NEXT: vsll.vi v16, v16, 2
1444 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1445 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1447 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %idxs
1448 call void @llvm.vp.scatter.nxv8f32.nxv8p0(<vscale x 8 x float> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1452 declare void @llvm.vp.scatter.nxv1f64.nxv1p0(<vscale x 1 x double>, <vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
1454 define void @vpscatter_nxv1f64(<vscale x 1 x double> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1455 ; RV32-LABEL: vpscatter_nxv1f64:
1457 ; RV32-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1458 ; RV32-NEXT: vsoxei32.v v8, (zero), v9, v0.t
1461 ; RV64-LABEL: vpscatter_nxv1f64:
1463 ; RV64-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1464 ; RV64-NEXT: vsoxei64.v v8, (zero), v9, v0.t
1466 call void @llvm.vp.scatter.nxv1f64.nxv1p0(<vscale x 1 x double> %val, <vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
1470 declare void @llvm.vp.scatter.nxv2f64.nxv2p0(<vscale x 2 x double>, <vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
1472 define void @vpscatter_nxv2f64(<vscale x 2 x double> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1473 ; RV32-LABEL: vpscatter_nxv2f64:
1475 ; RV32-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1476 ; RV32-NEXT: vsoxei32.v v8, (zero), v10, v0.t
1479 ; RV64-LABEL: vpscatter_nxv2f64:
1481 ; RV64-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1482 ; RV64-NEXT: vsoxei64.v v8, (zero), v10, v0.t
1484 call void @llvm.vp.scatter.nxv2f64.nxv2p0(<vscale x 2 x double> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
1488 declare void @llvm.vp.scatter.nxv4f64.nxv4p0(<vscale x 4 x double>, <vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
1490 define void @vpscatter_nxv4f64(<vscale x 4 x double> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1491 ; RV32-LABEL: vpscatter_nxv4f64:
1493 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1494 ; RV32-NEXT: vsoxei32.v v8, (zero), v12, v0.t
1497 ; RV64-LABEL: vpscatter_nxv4f64:
1499 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1500 ; RV64-NEXT: vsoxei64.v v8, (zero), v12, v0.t
1502 call void @llvm.vp.scatter.nxv4f64.nxv4p0(<vscale x 4 x double> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
1506 define void @vpscatter_truemask_nxv4f64(<vscale x 4 x double> %val, <vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
1507 ; RV32-LABEL: vpscatter_truemask_nxv4f64:
1509 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1510 ; RV32-NEXT: vsoxei32.v v8, (zero), v12
1513 ; RV64-LABEL: vpscatter_truemask_nxv4f64:
1515 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1516 ; RV64-NEXT: vsoxei64.v v8, (zero), v12
1518 %mhead = insertelement <vscale x 4 x i1> poison, i1 1, i32 0
1519 %mtrue = shufflevector <vscale x 4 x i1> %mhead, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1520 call void @llvm.vp.scatter.nxv4f64.nxv4p0(<vscale x 4 x double> %val, <vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %mtrue, i32 %evl)
1524 declare void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double>, <vscale x 6 x ptr>, <vscale x 6 x i1>, i32)
1526 define void @vpscatter_nxv6f64(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1527 ; RV32-LABEL: vpscatter_nxv6f64:
1529 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1530 ; RV32-NEXT: vsoxei32.v v8, (zero), v16, v0.t
1533 ; RV64-LABEL: vpscatter_nxv6f64:
1535 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1536 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
1538 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1542 define void @vpscatter_baseidx_nxv6i8_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1543 ; RV32-LABEL: vpscatter_baseidx_nxv6i8_nxv6f64:
1545 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1546 ; RV32-NEXT: vsext.vf4 v20, v16
1547 ; RV32-NEXT: vsll.vi v16, v20, 3
1548 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1549 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1552 ; RV64-LABEL: vpscatter_baseidx_nxv6i8_nxv6f64:
1554 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1555 ; RV64-NEXT: vsext.vf8 v24, v16
1556 ; RV64-NEXT: vsll.vi v16, v24, 3
1557 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1558 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1560 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i8> %idxs
1561 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1565 define void @vpscatter_baseidx_sext_nxv6i8_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1566 ; RV32-LABEL: vpscatter_baseidx_sext_nxv6i8_nxv6f64:
1568 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1569 ; RV32-NEXT: vsext.vf4 v20, v16
1570 ; RV32-NEXT: vsll.vi v16, v20, 3
1571 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1572 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1575 ; RV64-LABEL: vpscatter_baseidx_sext_nxv6i8_nxv6f64:
1577 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1578 ; RV64-NEXT: vsext.vf8 v24, v16
1579 ; RV64-NEXT: vsll.vi v16, v24, 3
1580 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1581 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1583 %eidxs = sext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
1584 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
1585 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1589 define void @vpscatter_baseidx_zext_nxv6i8_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1590 ; RV32-LABEL: vpscatter_baseidx_zext_nxv6i8_nxv6f64:
1592 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1593 ; RV32-NEXT: vzext.vf2 v18, v16
1594 ; RV32-NEXT: vsll.vi v16, v18, 3
1595 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1596 ; RV32-NEXT: vsoxei16.v v8, (a0), v16, v0.t
1599 ; RV64-LABEL: vpscatter_baseidx_zext_nxv6i8_nxv6f64:
1601 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1602 ; RV64-NEXT: vzext.vf2 v18, v16
1603 ; RV64-NEXT: vsll.vi v16, v18, 3
1604 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1605 ; RV64-NEXT: vsoxei16.v v8, (a0), v16, v0.t
1607 %eidxs = zext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
1608 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
1609 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1613 define void @vpscatter_baseidx_nxv6i16_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1614 ; RV32-LABEL: vpscatter_baseidx_nxv6i16_nxv6f64:
1616 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1617 ; RV32-NEXT: vsext.vf2 v20, v16
1618 ; RV32-NEXT: vsll.vi v16, v20, 3
1619 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1620 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1623 ; RV64-LABEL: vpscatter_baseidx_nxv6i16_nxv6f64:
1625 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1626 ; RV64-NEXT: vsext.vf4 v24, v16
1627 ; RV64-NEXT: vsll.vi v16, v24, 3
1628 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1629 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1631 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i16> %idxs
1632 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1636 define void @vpscatter_baseidx_sext_nxv6i16_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1637 ; RV32-LABEL: vpscatter_baseidx_sext_nxv6i16_nxv6f64:
1639 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1640 ; RV32-NEXT: vsext.vf2 v20, v16
1641 ; RV32-NEXT: vsll.vi v16, v20, 3
1642 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1643 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1646 ; RV64-LABEL: vpscatter_baseidx_sext_nxv6i16_nxv6f64:
1648 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1649 ; RV64-NEXT: vsext.vf4 v24, v16
1650 ; RV64-NEXT: vsll.vi v16, v24, 3
1651 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1652 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1654 %eidxs = sext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
1655 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
1656 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1660 define void @vpscatter_baseidx_zext_nxv6i16_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1661 ; RV32-LABEL: vpscatter_baseidx_zext_nxv6i16_nxv6f64:
1663 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1664 ; RV32-NEXT: vzext.vf2 v20, v16
1665 ; RV32-NEXT: vsll.vi v16, v20, 3
1666 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1667 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1670 ; RV64-LABEL: vpscatter_baseidx_zext_nxv6i16_nxv6f64:
1672 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1673 ; RV64-NEXT: vzext.vf2 v20, v16
1674 ; RV64-NEXT: vsll.vi v16, v20, 3
1675 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1676 ; RV64-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1678 %eidxs = zext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
1679 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
1680 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1684 define void @vpscatter_baseidx_nxv6i32_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1685 ; RV32-LABEL: vpscatter_baseidx_nxv6i32_nxv6f64:
1687 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1688 ; RV32-NEXT: vsll.vi v16, v16, 3
1689 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1690 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1693 ; RV64-LABEL: vpscatter_baseidx_nxv6i32_nxv6f64:
1695 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1696 ; RV64-NEXT: vsext.vf2 v24, v16
1697 ; RV64-NEXT: vsll.vi v16, v24, 3
1698 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1699 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1701 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i32> %idxs
1702 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1706 define void @vpscatter_baseidx_sext_nxv6i32_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1707 ; RV32-LABEL: vpscatter_baseidx_sext_nxv6i32_nxv6f64:
1709 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1710 ; RV32-NEXT: vsll.vi v16, v16, 3
1711 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1712 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1715 ; RV64-LABEL: vpscatter_baseidx_sext_nxv6i32_nxv6f64:
1717 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1718 ; RV64-NEXT: vsext.vf2 v24, v16
1719 ; RV64-NEXT: vsll.vi v16, v24, 3
1720 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1721 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1723 %eidxs = sext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
1724 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
1725 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1729 define void @vpscatter_baseidx_zext_nxv6i32_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1730 ; RV32-LABEL: vpscatter_baseidx_zext_nxv6i32_nxv6f64:
1732 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1733 ; RV32-NEXT: vsll.vi v16, v16, 3
1734 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1735 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1738 ; RV64-LABEL: vpscatter_baseidx_zext_nxv6i32_nxv6f64:
1740 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1741 ; RV64-NEXT: vzext.vf2 v24, v16
1742 ; RV64-NEXT: vsll.vi v16, v24, 3
1743 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1744 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1746 %eidxs = zext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
1747 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
1748 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1752 define void @vpscatter_baseidx_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i64> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1753 ; RV32-LABEL: vpscatter_baseidx_nxv6f64:
1755 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1756 ; RV32-NEXT: vnsrl.wi v24, v16, 0
1757 ; RV32-NEXT: vsll.vi v16, v24, 3
1758 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1759 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1762 ; RV64-LABEL: vpscatter_baseidx_nxv6f64:
1764 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1765 ; RV64-NEXT: vsll.vi v16, v16, 3
1766 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1767 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1769 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %idxs
1770 call void @llvm.vp.scatter.nxv6f64.nxv6p0(<vscale x 6 x double> %val, <vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1774 declare void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double>, <vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
1776 define void @vpscatter_nxv8f64(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1777 ; RV32-LABEL: vpscatter_nxv8f64:
1779 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1780 ; RV32-NEXT: vsoxei32.v v8, (zero), v16, v0.t
1783 ; RV64-LABEL: vpscatter_nxv8f64:
1785 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1786 ; RV64-NEXT: vsoxei64.v v8, (zero), v16, v0.t
1788 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1792 define void @vpscatter_baseidx_nxv8i8_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1793 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8f64:
1795 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1796 ; RV32-NEXT: vsext.vf4 v20, v16
1797 ; RV32-NEXT: vsll.vi v16, v20, 3
1798 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1799 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1802 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8f64:
1804 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1805 ; RV64-NEXT: vsext.vf8 v24, v16
1806 ; RV64-NEXT: vsll.vi v16, v24, 3
1807 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1808 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1810 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i8> %idxs
1811 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1815 define void @vpscatter_baseidx_sext_nxv8i8_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1816 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f64:
1818 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1819 ; RV32-NEXT: vsext.vf4 v20, v16
1820 ; RV32-NEXT: vsll.vi v16, v20, 3
1821 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1822 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1825 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f64:
1827 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1828 ; RV64-NEXT: vsext.vf8 v24, v16
1829 ; RV64-NEXT: vsll.vi v16, v24, 3
1830 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1831 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1833 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
1834 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
1835 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1839 define void @vpscatter_baseidx_zext_nxv8i8_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1840 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f64:
1842 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1843 ; RV32-NEXT: vzext.vf2 v18, v16
1844 ; RV32-NEXT: vsll.vi v16, v18, 3
1845 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1846 ; RV32-NEXT: vsoxei16.v v8, (a0), v16, v0.t
1849 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f64:
1851 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1852 ; RV64-NEXT: vzext.vf2 v18, v16
1853 ; RV64-NEXT: vsll.vi v16, v18, 3
1854 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1855 ; RV64-NEXT: vsoxei16.v v8, (a0), v16, v0.t
1857 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
1858 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
1859 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1863 define void @vpscatter_baseidx_nxv8i16_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1864 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8f64:
1866 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1867 ; RV32-NEXT: vsext.vf2 v20, v16
1868 ; RV32-NEXT: vsll.vi v16, v20, 3
1869 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1870 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1873 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8f64:
1875 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1876 ; RV64-NEXT: vsext.vf4 v24, v16
1877 ; RV64-NEXT: vsll.vi v16, v24, 3
1878 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1879 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1881 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i16> %idxs
1882 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1886 define void @vpscatter_baseidx_sext_nxv8i16_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1887 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f64:
1889 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1890 ; RV32-NEXT: vsext.vf2 v20, v16
1891 ; RV32-NEXT: vsll.vi v16, v20, 3
1892 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1893 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1896 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f64:
1898 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1899 ; RV64-NEXT: vsext.vf4 v24, v16
1900 ; RV64-NEXT: vsll.vi v16, v24, 3
1901 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1902 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1904 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
1905 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
1906 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1910 define void @vpscatter_baseidx_zext_nxv8i16_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1911 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f64:
1913 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1914 ; RV32-NEXT: vzext.vf2 v20, v16
1915 ; RV32-NEXT: vsll.vi v16, v20, 3
1916 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1917 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1920 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f64:
1922 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1923 ; RV64-NEXT: vzext.vf2 v20, v16
1924 ; RV64-NEXT: vsll.vi v16, v20, 3
1925 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1926 ; RV64-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1928 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
1929 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
1930 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1934 define void @vpscatter_baseidx_nxv8i32_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1935 ; RV32-LABEL: vpscatter_baseidx_nxv8i32_nxv8f64:
1937 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1938 ; RV32-NEXT: vsll.vi v16, v16, 3
1939 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1940 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1943 ; RV64-LABEL: vpscatter_baseidx_nxv8i32_nxv8f64:
1945 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1946 ; RV64-NEXT: vsext.vf2 v24, v16
1947 ; RV64-NEXT: vsll.vi v16, v24, 3
1948 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1949 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1951 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i32> %idxs
1952 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1956 define void @vpscatter_baseidx_sext_nxv8i32_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1957 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8f64:
1959 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1960 ; RV32-NEXT: vsll.vi v16, v16, 3
1961 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1962 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1965 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8f64:
1967 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1968 ; RV64-NEXT: vsext.vf2 v24, v16
1969 ; RV64-NEXT: vsll.vi v16, v24, 3
1970 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1971 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1973 %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
1974 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
1975 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1979 define void @vpscatter_baseidx_zext_nxv8i32_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1980 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8f64:
1982 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1983 ; RV32-NEXT: vsll.vi v16, v16, 3
1984 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1985 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
1988 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8f64:
1990 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1991 ; RV64-NEXT: vzext.vf2 v24, v16
1992 ; RV64-NEXT: vsll.vi v16, v24, 3
1993 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1994 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
1996 %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
1997 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
1998 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2002 define void @vpscatter_baseidx_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2003 ; RV32-LABEL: vpscatter_baseidx_nxv8f64:
2005 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2006 ; RV32-NEXT: vnsrl.wi v24, v16, 0
2007 ; RV32-NEXT: vsll.vi v16, v24, 3
2008 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2009 ; RV32-NEXT: vsoxei32.v v8, (a0), v16, v0.t
2012 ; RV64-LABEL: vpscatter_baseidx_nxv8f64:
2014 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2015 ; RV64-NEXT: vsll.vi v16, v16, 3
2016 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2017 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
2019 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %idxs
2020 call void @llvm.vp.scatter.nxv8f64.nxv8p0(<vscale x 8 x double> %val, <vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2024 declare void @llvm.vp.scatter.nxv16f64.nxv16p0(<vscale x 16 x double>, <vscale x 16 x ptr>, <vscale x 16 x i1>, i32)
2026 define void @vpscatter_nxv16f64(<vscale x 16 x double> %val, <vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2027 ; RV32-LABEL: vpscatter_nxv16f64:
2029 ; RV32-NEXT: vl8re32.v v24, (a0)
2030 ; RV32-NEXT: csrr a0, vlenb
2031 ; RV32-NEXT: mv a2, a1
2032 ; RV32-NEXT: bltu a1, a0, .LBB95_2
2033 ; RV32-NEXT: # %bb.1:
2034 ; RV32-NEXT: mv a2, a0
2035 ; RV32-NEXT: .LBB95_2:
2036 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2037 ; RV32-NEXT: vsoxei32.v v8, (zero), v24, v0.t
2038 ; RV32-NEXT: sub a2, a1, a0
2039 ; RV32-NEXT: sltu a1, a1, a2
2040 ; RV32-NEXT: addi a1, a1, -1
2041 ; RV32-NEXT: and a1, a1, a2
2042 ; RV32-NEXT: srli a0, a0, 3
2043 ; RV32-NEXT: vsetvli a2, zero, e8, mf4, ta, ma
2044 ; RV32-NEXT: vslidedown.vx v0, v0, a0
2045 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2046 ; RV32-NEXT: vsoxei32.v v16, (zero), v28, v0.t
2049 ; RV64-LABEL: vpscatter_nxv16f64:
2051 ; RV64-NEXT: addi sp, sp, -16
2052 ; RV64-NEXT: .cfi_def_cfa_offset 16
2053 ; RV64-NEXT: csrr a1, vlenb
2054 ; RV64-NEXT: slli a1, a1, 3
2055 ; RV64-NEXT: sub sp, sp, a1
2056 ; RV64-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
2057 ; RV64-NEXT: csrr a1, vlenb
2058 ; RV64-NEXT: slli a3, a1, 3
2059 ; RV64-NEXT: add a3, a0, a3
2060 ; RV64-NEXT: vl8re64.v v24, (a3)
2061 ; RV64-NEXT: addi a3, sp, 16
2062 ; RV64-NEXT: vs8r.v v24, (a3) # Unknown-size Folded Spill
2063 ; RV64-NEXT: vl8re64.v v24, (a0)
2064 ; RV64-NEXT: mv a0, a2
2065 ; RV64-NEXT: bltu a2, a1, .LBB95_2
2066 ; RV64-NEXT: # %bb.1:
2067 ; RV64-NEXT: mv a0, a1
2068 ; RV64-NEXT: .LBB95_2:
2069 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
2070 ; RV64-NEXT: vsoxei64.v v8, (zero), v24, v0.t
2071 ; RV64-NEXT: sub a0, a2, a1
2072 ; RV64-NEXT: sltu a2, a2, a0
2073 ; RV64-NEXT: addi a2, a2, -1
2074 ; RV64-NEXT: and a0, a2, a0
2075 ; RV64-NEXT: srli a1, a1, 3
2076 ; RV64-NEXT: vsetvli a2, zero, e8, mf4, ta, ma
2077 ; RV64-NEXT: vslidedown.vx v0, v0, a1
2078 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
2079 ; RV64-NEXT: addi a0, sp, 16
2080 ; RV64-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
2081 ; RV64-NEXT: vsoxei64.v v16, (zero), v8, v0.t
2082 ; RV64-NEXT: csrr a0, vlenb
2083 ; RV64-NEXT: slli a0, a0, 3
2084 ; RV64-NEXT: add sp, sp, a0
2085 ; RV64-NEXT: addi sp, sp, 16
2087 call void @llvm.vp.scatter.nxv16f64.nxv16p0(<vscale x 16 x double> %val, <vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)
2091 define void @vpscatter_baseidx_nxv16i16_nxv16f64(<vscale x 16 x double> %val, ptr %base, <vscale x 16 x i16> %idxs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2092 ; RV32-LABEL: vpscatter_baseidx_nxv16i16_nxv16f64:
2094 ; RV32-NEXT: vl4re16.v v4, (a1)
2095 ; RV32-NEXT: vsetvli a1, zero, e32, m8, ta, ma
2096 ; RV32-NEXT: vsext.vf2 v24, v4
2097 ; RV32-NEXT: csrr a1, vlenb
2098 ; RV32-NEXT: vsll.vi v24, v24, 3
2099 ; RV32-NEXT: mv a3, a2
2100 ; RV32-NEXT: bltu a2, a1, .LBB96_2
2101 ; RV32-NEXT: # %bb.1:
2102 ; RV32-NEXT: mv a3, a1
2103 ; RV32-NEXT: .LBB96_2:
2104 ; RV32-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2105 ; RV32-NEXT: vsoxei32.v v8, (a0), v24, v0.t
2106 ; RV32-NEXT: sub a3, a2, a1
2107 ; RV32-NEXT: sltu a2, a2, a3
2108 ; RV32-NEXT: addi a2, a2, -1
2109 ; RV32-NEXT: and a2, a2, a3
2110 ; RV32-NEXT: srli a1, a1, 3
2111 ; RV32-NEXT: vsetvli a3, zero, e8, mf4, ta, ma
2112 ; RV32-NEXT: vslidedown.vx v0, v0, a1
2113 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2114 ; RV32-NEXT: vsoxei32.v v16, (a0), v28, v0.t
2117 ; RV64-LABEL: vpscatter_baseidx_nxv16i16_nxv16f64:
2119 ; RV64-NEXT: addi sp, sp, -16
2120 ; RV64-NEXT: .cfi_def_cfa_offset 16
2121 ; RV64-NEXT: csrr a3, vlenb
2122 ; RV64-NEXT: slli a3, a3, 4
2123 ; RV64-NEXT: sub sp, sp, a3
2124 ; RV64-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
2125 ; RV64-NEXT: vl4re16.v v24, (a1)
2126 ; RV64-NEXT: csrr a1, vlenb
2127 ; RV64-NEXT: slli a1, a1, 3
2128 ; RV64-NEXT: add a1, sp, a1
2129 ; RV64-NEXT: addi a1, a1, 16
2130 ; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
2131 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2132 ; RV64-NEXT: vsext.vf4 v16, v26
2133 ; RV64-NEXT: vsll.vi v16, v16, 3
2134 ; RV64-NEXT: addi a1, sp, 16
2135 ; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
2136 ; RV64-NEXT: csrr a1, vlenb
2137 ; RV64-NEXT: vsext.vf4 v16, v24
2138 ; RV64-NEXT: vsll.vi v24, v16, 3
2139 ; RV64-NEXT: mv a3, a2
2140 ; RV64-NEXT: bltu a2, a1, .LBB96_2
2141 ; RV64-NEXT: # %bb.1:
2142 ; RV64-NEXT: mv a3, a1
2143 ; RV64-NEXT: .LBB96_2:
2144 ; RV64-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2145 ; RV64-NEXT: vsoxei64.v v8, (a0), v24, v0.t
2146 ; RV64-NEXT: sub a3, a2, a1
2147 ; RV64-NEXT: sltu a2, a2, a3
2148 ; RV64-NEXT: addi a2, a2, -1
2149 ; RV64-NEXT: and a2, a2, a3
2150 ; RV64-NEXT: srli a1, a1, 3
2151 ; RV64-NEXT: vsetvli a3, zero, e8, mf4, ta, ma
2152 ; RV64-NEXT: vslidedown.vx v0, v0, a1
2153 ; RV64-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2154 ; RV64-NEXT: csrr a1, vlenb
2155 ; RV64-NEXT: slli a1, a1, 3
2156 ; RV64-NEXT: add a1, sp, a1
2157 ; RV64-NEXT: addi a1, a1, 16
2158 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload
2159 ; RV64-NEXT: addi a1, sp, 16
2160 ; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload
2161 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
2162 ; RV64-NEXT: csrr a0, vlenb
2163 ; RV64-NEXT: slli a0, a0, 4
2164 ; RV64-NEXT: add sp, sp, a0
2165 ; RV64-NEXT: addi sp, sp, 16
2167 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 16 x i16> %idxs
2168 call void @llvm.vp.scatter.nxv16f64.nxv16p0(<vscale x 16 x double> %val, <vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)
2172 define void @vpscatter_baseidx_sext_nxv16i16_nxv16f64(<vscale x 16 x double> %val, ptr %base, <vscale x 16 x i16> %idxs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2173 ; RV32-LABEL: vpscatter_baseidx_sext_nxv16i16_nxv16f64:
2175 ; RV32-NEXT: vl4re16.v v4, (a1)
2176 ; RV32-NEXT: vsetvli a1, zero, e32, m8, ta, ma
2177 ; RV32-NEXT: vsext.vf2 v24, v4
2178 ; RV32-NEXT: csrr a1, vlenb
2179 ; RV32-NEXT: vsll.vi v24, v24, 3
2180 ; RV32-NEXT: mv a3, a2
2181 ; RV32-NEXT: bltu a2, a1, .LBB97_2
2182 ; RV32-NEXT: # %bb.1:
2183 ; RV32-NEXT: mv a3, a1
2184 ; RV32-NEXT: .LBB97_2:
2185 ; RV32-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2186 ; RV32-NEXT: vsoxei32.v v8, (a0), v24, v0.t
2187 ; RV32-NEXT: sub a3, a2, a1
2188 ; RV32-NEXT: sltu a2, a2, a3
2189 ; RV32-NEXT: addi a2, a2, -1
2190 ; RV32-NEXT: and a2, a2, a3
2191 ; RV32-NEXT: srli a1, a1, 3
2192 ; RV32-NEXT: vsetvli a3, zero, e8, mf4, ta, ma
2193 ; RV32-NEXT: vslidedown.vx v0, v0, a1
2194 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2195 ; RV32-NEXT: vsoxei32.v v16, (a0), v28, v0.t
2198 ; RV64-LABEL: vpscatter_baseidx_sext_nxv16i16_nxv16f64:
2200 ; RV64-NEXT: addi sp, sp, -16
2201 ; RV64-NEXT: .cfi_def_cfa_offset 16
2202 ; RV64-NEXT: csrr a3, vlenb
2203 ; RV64-NEXT: slli a3, a3, 4
2204 ; RV64-NEXT: sub sp, sp, a3
2205 ; RV64-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
2206 ; RV64-NEXT: vl4re16.v v24, (a1)
2207 ; RV64-NEXT: csrr a1, vlenb
2208 ; RV64-NEXT: slli a1, a1, 3
2209 ; RV64-NEXT: add a1, sp, a1
2210 ; RV64-NEXT: addi a1, a1, 16
2211 ; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
2212 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2213 ; RV64-NEXT: vsext.vf4 v16, v26
2214 ; RV64-NEXT: vsll.vi v16, v16, 3
2215 ; RV64-NEXT: addi a1, sp, 16
2216 ; RV64-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
2217 ; RV64-NEXT: csrr a1, vlenb
2218 ; RV64-NEXT: vsext.vf4 v16, v24
2219 ; RV64-NEXT: vsll.vi v24, v16, 3
2220 ; RV64-NEXT: mv a3, a2
2221 ; RV64-NEXT: bltu a2, a1, .LBB97_2
2222 ; RV64-NEXT: # %bb.1:
2223 ; RV64-NEXT: mv a3, a1
2224 ; RV64-NEXT: .LBB97_2:
2225 ; RV64-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2226 ; RV64-NEXT: vsoxei64.v v8, (a0), v24, v0.t
2227 ; RV64-NEXT: sub a3, a2, a1
2228 ; RV64-NEXT: sltu a2, a2, a3
2229 ; RV64-NEXT: addi a2, a2, -1
2230 ; RV64-NEXT: and a2, a2, a3
2231 ; RV64-NEXT: srli a1, a1, 3
2232 ; RV64-NEXT: vsetvli a3, zero, e8, mf4, ta, ma
2233 ; RV64-NEXT: vslidedown.vx v0, v0, a1
2234 ; RV64-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2235 ; RV64-NEXT: csrr a1, vlenb
2236 ; RV64-NEXT: slli a1, a1, 3
2237 ; RV64-NEXT: add a1, sp, a1
2238 ; RV64-NEXT: addi a1, a1, 16
2239 ; RV64-NEXT: vl8r.v v8, (a1) # Unknown-size Folded Reload
2240 ; RV64-NEXT: addi a1, sp, 16
2241 ; RV64-NEXT: vl8r.v v16, (a1) # Unknown-size Folded Reload
2242 ; RV64-NEXT: vsoxei64.v v8, (a0), v16, v0.t
2243 ; RV64-NEXT: csrr a0, vlenb
2244 ; RV64-NEXT: slli a0, a0, 4
2245 ; RV64-NEXT: add sp, sp, a0
2246 ; RV64-NEXT: addi sp, sp, 16
2248 %eidxs = sext <vscale x 16 x i16> %idxs to <vscale x 16 x i64>
2249 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 16 x i64> %eidxs
2250 call void @llvm.vp.scatter.nxv16f64.nxv16p0(<vscale x 16 x double> %val, <vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)
2254 define void @vpscatter_baseidx_zext_nxv16i16_nxv16f64(<vscale x 16 x double> %val, ptr %base, <vscale x 16 x i16> %idxs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2255 ; RV32-LABEL: vpscatter_baseidx_zext_nxv16i16_nxv16f64:
2257 ; RV32-NEXT: vl4re16.v v4, (a1)
2258 ; RV32-NEXT: vsetvli a1, zero, e32, m8, ta, ma
2259 ; RV32-NEXT: vzext.vf2 v24, v4
2260 ; RV32-NEXT: csrr a1, vlenb
2261 ; RV32-NEXT: vsll.vi v24, v24, 3
2262 ; RV32-NEXT: mv a3, a2
2263 ; RV32-NEXT: bltu a2, a1, .LBB98_2
2264 ; RV32-NEXT: # %bb.1:
2265 ; RV32-NEXT: mv a3, a1
2266 ; RV32-NEXT: .LBB98_2:
2267 ; RV32-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2268 ; RV32-NEXT: vsoxei32.v v8, (a0), v24, v0.t
2269 ; RV32-NEXT: sub a3, a2, a1
2270 ; RV32-NEXT: sltu a2, a2, a3
2271 ; RV32-NEXT: addi a2, a2, -1
2272 ; RV32-NEXT: and a2, a2, a3
2273 ; RV32-NEXT: srli a1, a1, 3
2274 ; RV32-NEXT: vsetvli a3, zero, e8, mf4, ta, ma
2275 ; RV32-NEXT: vslidedown.vx v0, v0, a1
2276 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2277 ; RV32-NEXT: vsoxei32.v v16, (a0), v28, v0.t
2280 ; RV64-LABEL: vpscatter_baseidx_zext_nxv16i16_nxv16f64:
2282 ; RV64-NEXT: vl4re16.v v4, (a1)
2283 ; RV64-NEXT: vsetvli a1, zero, e32, m8, ta, ma
2284 ; RV64-NEXT: vzext.vf2 v24, v4
2285 ; RV64-NEXT: csrr a1, vlenb
2286 ; RV64-NEXT: vsll.vi v24, v24, 3
2287 ; RV64-NEXT: mv a3, a2
2288 ; RV64-NEXT: bltu a2, a1, .LBB98_2
2289 ; RV64-NEXT: # %bb.1:
2290 ; RV64-NEXT: mv a3, a1
2291 ; RV64-NEXT: .LBB98_2:
2292 ; RV64-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2293 ; RV64-NEXT: vsoxei32.v v8, (a0), v24, v0.t
2294 ; RV64-NEXT: sub a3, a2, a1
2295 ; RV64-NEXT: sltu a2, a2, a3
2296 ; RV64-NEXT: addi a2, a2, -1
2297 ; RV64-NEXT: and a2, a2, a3
2298 ; RV64-NEXT: srli a1, a1, 3
2299 ; RV64-NEXT: vsetvli a3, zero, e8, mf4, ta, ma
2300 ; RV64-NEXT: vslidedown.vx v0, v0, a1
2301 ; RV64-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2302 ; RV64-NEXT: vsoxei32.v v16, (a0), v28, v0.t
2304 %eidxs = zext <vscale x 16 x i16> %idxs to <vscale x 16 x i64>
2305 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 16 x i64> %eidxs
2306 call void @llvm.vp.scatter.nxv16f64.nxv16p0(<vscale x 16 x double> %val, <vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)