1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zvfh,+zvfbfmin,+v \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zvfh,+zvfbfmin,+v \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=RV64
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zvfhmin,+zvfbfmin,+v \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=RV32
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zvfhmin,+zvfbfmin,+v \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=RV64
11 declare <vscale x 1 x i8> @llvm.vp.gather.nxv1i8.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
13 define <vscale x 1 x i8> @vpgather_nxv1i8(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
14 ; RV32-LABEL: vpgather_nxv1i8:
16 ; RV32-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
17 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
18 ; RV32-NEXT: vmv1r.v v8, v9
21 ; RV64-LABEL: vpgather_nxv1i8:
23 ; RV64-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
24 ; RV64-NEXT: vluxei64.v v9, (zero), v8, v0.t
25 ; RV64-NEXT: vmv1r.v v8, v9
27 %v = call <vscale x 1 x i8> @llvm.vp.gather.nxv1i8.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
28 ret <vscale x 1 x i8> %v
31 declare <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
33 define <vscale x 2 x i8> @vpgather_nxv2i8(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
34 ; RV32-LABEL: vpgather_nxv2i8:
36 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
37 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
38 ; RV32-NEXT: vmv1r.v v8, v9
41 ; RV64-LABEL: vpgather_nxv2i8:
43 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
44 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
45 ; RV64-NEXT: vmv1r.v v8, v10
47 %v = call <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
48 ret <vscale x 2 x i8> %v
51 define <vscale x 2 x i16> @vpgather_nxv2i8_sextload_nxv2i16(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
52 ; RV32-LABEL: vpgather_nxv2i8_sextload_nxv2i16:
54 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
55 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
56 ; RV32-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
57 ; RV32-NEXT: vsext.vf2 v8, v9
60 ; RV64-LABEL: vpgather_nxv2i8_sextload_nxv2i16:
62 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
63 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
64 ; RV64-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
65 ; RV64-NEXT: vsext.vf2 v8, v10
67 %v = call <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
68 %ev = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>
69 ret <vscale x 2 x i16> %ev
72 define <vscale x 2 x i16> @vpgather_nxv2i8_zextload_nxv2i16(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
73 ; RV32-LABEL: vpgather_nxv2i8_zextload_nxv2i16:
75 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
76 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
77 ; RV32-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
78 ; RV32-NEXT: vzext.vf2 v8, v9
81 ; RV64-LABEL: vpgather_nxv2i8_zextload_nxv2i16:
83 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
84 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
85 ; RV64-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
86 ; RV64-NEXT: vzext.vf2 v8, v10
88 %v = call <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
89 %ev = zext <vscale x 2 x i8> %v to <vscale x 2 x i16>
90 ret <vscale x 2 x i16> %ev
93 define <vscale x 2 x i32> @vpgather_nxv2i8_sextload_nxv2i32(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
94 ; RV32-LABEL: vpgather_nxv2i8_sextload_nxv2i32:
96 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
97 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
98 ; RV32-NEXT: vsetvli a0, zero, e32, m1, ta, ma
99 ; RV32-NEXT: vsext.vf4 v8, v9
102 ; RV64-LABEL: vpgather_nxv2i8_sextload_nxv2i32:
104 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
105 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
106 ; RV64-NEXT: vsetvli a0, zero, e32, m1, ta, ma
107 ; RV64-NEXT: vsext.vf4 v8, v10
109 %v = call <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
110 %ev = sext <vscale x 2 x i8> %v to <vscale x 2 x i32>
111 ret <vscale x 2 x i32> %ev
114 define <vscale x 2 x i32> @vpgather_nxv2i8_zextload_nxv2i32(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
115 ; RV32-LABEL: vpgather_nxv2i8_zextload_nxv2i32:
117 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
118 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
119 ; RV32-NEXT: vsetvli a0, zero, e32, m1, ta, ma
120 ; RV32-NEXT: vzext.vf4 v8, v9
123 ; RV64-LABEL: vpgather_nxv2i8_zextload_nxv2i32:
125 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
126 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
127 ; RV64-NEXT: vsetvli a0, zero, e32, m1, ta, ma
128 ; RV64-NEXT: vzext.vf4 v8, v10
130 %v = call <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
131 %ev = zext <vscale x 2 x i8> %v to <vscale x 2 x i32>
132 ret <vscale x 2 x i32> %ev
135 define <vscale x 2 x i64> @vpgather_nxv2i8_sextload_nxv2i64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
136 ; RV32-LABEL: vpgather_nxv2i8_sextload_nxv2i64:
138 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
139 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
140 ; RV32-NEXT: vsetvli a0, zero, e64, m2, ta, ma
141 ; RV32-NEXT: vsext.vf8 v8, v10
144 ; RV64-LABEL: vpgather_nxv2i8_sextload_nxv2i64:
146 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
147 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
148 ; RV64-NEXT: vsetvli a0, zero, e64, m2, ta, ma
149 ; RV64-NEXT: vsext.vf8 v8, v10
151 %v = call <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
152 %ev = sext <vscale x 2 x i8> %v to <vscale x 2 x i64>
153 ret <vscale x 2 x i64> %ev
156 define <vscale x 2 x i64> @vpgather_nxv2i8_zextload_nxv2i64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
157 ; RV32-LABEL: vpgather_nxv2i8_zextload_nxv2i64:
159 ; RV32-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
160 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
161 ; RV32-NEXT: vsetvli a0, zero, e64, m2, ta, ma
162 ; RV32-NEXT: vzext.vf8 v8, v10
165 ; RV64-LABEL: vpgather_nxv2i8_zextload_nxv2i64:
167 ; RV64-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
168 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
169 ; RV64-NEXT: vsetvli a0, zero, e64, m2, ta, ma
170 ; RV64-NEXT: vzext.vf8 v8, v10
172 %v = call <vscale x 2 x i8> @llvm.vp.gather.nxv2i8.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
173 %ev = zext <vscale x 2 x i8> %v to <vscale x 2 x i64>
174 ret <vscale x 2 x i64> %ev
177 declare <vscale x 4 x i8> @llvm.vp.gather.nxv4i8.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
179 define <vscale x 4 x i8> @vpgather_nxv4i8(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
180 ; RV32-LABEL: vpgather_nxv4i8:
182 ; RV32-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
183 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
184 ; RV32-NEXT: vmv1r.v v8, v10
187 ; RV64-LABEL: vpgather_nxv4i8:
189 ; RV64-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
190 ; RV64-NEXT: vluxei64.v v12, (zero), v8, v0.t
191 ; RV64-NEXT: vmv1r.v v8, v12
193 %v = call <vscale x 4 x i8> @llvm.vp.gather.nxv4i8.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
194 ret <vscale x 4 x i8> %v
197 define <vscale x 4 x i8> @vpgather_truemask_nxv4i8(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
198 ; RV32-LABEL: vpgather_truemask_nxv4i8:
200 ; RV32-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
201 ; RV32-NEXT: vluxei32.v v10, (zero), v8
202 ; RV32-NEXT: vmv1r.v v8, v10
205 ; RV64-LABEL: vpgather_truemask_nxv4i8:
207 ; RV64-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
208 ; RV64-NEXT: vluxei64.v v12, (zero), v8
209 ; RV64-NEXT: vmv1r.v v8, v12
211 %v = call <vscale x 4 x i8> @llvm.vp.gather.nxv4i8.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
212 ret <vscale x 4 x i8> %v
215 declare <vscale x 8 x i8> @llvm.vp.gather.nxv8i8.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
217 define <vscale x 8 x i8> @vpgather_nxv8i8(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
218 ; RV32-LABEL: vpgather_nxv8i8:
220 ; RV32-NEXT: vsetvli zero, a0, e8, m1, ta, ma
221 ; RV32-NEXT: vluxei32.v v12, (zero), v8, v0.t
222 ; RV32-NEXT: vmv.v.v v8, v12
225 ; RV64-LABEL: vpgather_nxv8i8:
227 ; RV64-NEXT: vsetvli zero, a0, e8, m1, ta, ma
228 ; RV64-NEXT: vluxei64.v v16, (zero), v8, v0.t
229 ; RV64-NEXT: vmv.v.v v8, v16
231 %v = call <vscale x 8 x i8> @llvm.vp.gather.nxv8i8.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
232 ret <vscale x 8 x i8> %v
235 define <vscale x 8 x i8> @vpgather_baseidx_nxv8i8(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
236 ; RV32-LABEL: vpgather_baseidx_nxv8i8:
238 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
239 ; RV32-NEXT: vsext.vf4 v12, v8
240 ; RV32-NEXT: vsetvli zero, a1, e8, m1, ta, ma
241 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
244 ; RV64-LABEL: vpgather_baseidx_nxv8i8:
246 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
247 ; RV64-NEXT: vsext.vf8 v16, v8
248 ; RV64-NEXT: vsetvli zero, a1, e8, m1, ta, ma
249 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
251 %ptrs = getelementptr inbounds i8, ptr %base, <vscale x 8 x i8> %idxs
252 %v = call <vscale x 8 x i8> @llvm.vp.gather.nxv8i8.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
253 ret <vscale x 8 x i8> %v
256 declare <vscale x 32 x i8> @llvm.vp.gather.nxv32i8.nxv32p0(<vscale x 32 x ptr>, <vscale x 32 x i1>, i32)
258 define <vscale x 32 x i8> @vpgather_baseidx_nxv32i8(ptr %base, <vscale x 32 x i8> %idxs, <vscale x 32 x i1> %m, i32 zeroext %evl) {
259 ; RV32-LABEL: vpgather_baseidx_nxv32i8:
261 ; RV32-NEXT: vmv1r.v v12, v0
262 ; RV32-NEXT: csrr a3, vlenb
263 ; RV32-NEXT: slli a2, a3, 1
264 ; RV32-NEXT: srli a3, a3, 2
265 ; RV32-NEXT: sub a4, a1, a2
266 ; RV32-NEXT: vsetvli a5, zero, e8, mf2, ta, ma
267 ; RV32-NEXT: vslidedown.vx v0, v0, a3
268 ; RV32-NEXT: sltu a3, a1, a4
269 ; RV32-NEXT: addi a3, a3, -1
270 ; RV32-NEXT: and a3, a3, a4
271 ; RV32-NEXT: vsetvli a4, zero, e32, m8, ta, ma
272 ; RV32-NEXT: vsext.vf4 v16, v10
273 ; RV32-NEXT: vsetvli zero, a3, e8, m2, ta, ma
274 ; RV32-NEXT: vluxei32.v v10, (a0), v16, v0.t
275 ; RV32-NEXT: bltu a1, a2, .LBB12_2
276 ; RV32-NEXT: # %bb.1:
277 ; RV32-NEXT: mv a1, a2
278 ; RV32-NEXT: .LBB12_2:
279 ; RV32-NEXT: vsetvli a2, zero, e32, m8, ta, ma
280 ; RV32-NEXT: vsext.vf4 v16, v8
281 ; RV32-NEXT: vmv1r.v v0, v12
282 ; RV32-NEXT: vsetvli zero, a1, e8, m2, ta, ma
283 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
286 ; RV64-LABEL: vpgather_baseidx_nxv32i8:
288 ; RV64-NEXT: vmv1r.v v12, v0
289 ; RV64-NEXT: csrr a2, vlenb
290 ; RV64-NEXT: slli a3, a2, 1
291 ; RV64-NEXT: srli a4, a2, 2
292 ; RV64-NEXT: sub a5, a1, a3
293 ; RV64-NEXT: vsetvli a6, zero, e8, mf2, ta, ma
294 ; RV64-NEXT: vslidedown.vx v13, v0, a4
295 ; RV64-NEXT: sltu a4, a1, a5
296 ; RV64-NEXT: addi a4, a4, -1
297 ; RV64-NEXT: and a5, a4, a5
298 ; RV64-NEXT: sub a4, a5, a2
299 ; RV64-NEXT: sltu a6, a5, a4
300 ; RV64-NEXT: addi a6, a6, -1
301 ; RV64-NEXT: and a6, a6, a4
302 ; RV64-NEXT: srli a4, a2, 3
303 ; RV64-NEXT: vsetvli a7, zero, e8, mf4, ta, ma
304 ; RV64-NEXT: vslidedown.vx v0, v13, a4
305 ; RV64-NEXT: vsetvli a7, zero, e64, m8, ta, ma
306 ; RV64-NEXT: vsext.vf8 v16, v11
307 ; RV64-NEXT: vsetvli zero, a6, e8, m1, ta, ma
308 ; RV64-NEXT: vluxei64.v v11, (a0), v16, v0.t
309 ; RV64-NEXT: bltu a5, a2, .LBB12_2
310 ; RV64-NEXT: # %bb.1:
311 ; RV64-NEXT: mv a5, a2
312 ; RV64-NEXT: .LBB12_2:
313 ; RV64-NEXT: vsetvli a6, zero, e64, m8, ta, ma
314 ; RV64-NEXT: vsext.vf8 v16, v10
315 ; RV64-NEXT: vmv1r.v v0, v13
316 ; RV64-NEXT: vsetvli zero, a5, e8, m1, ta, ma
317 ; RV64-NEXT: vluxei64.v v10, (a0), v16, v0.t
318 ; RV64-NEXT: bltu a1, a3, .LBB12_4
319 ; RV64-NEXT: # %bb.3:
320 ; RV64-NEXT: mv a1, a3
321 ; RV64-NEXT: .LBB12_4:
322 ; RV64-NEXT: sub a3, a1, a2
323 ; RV64-NEXT: vsetvli a5, zero, e8, mf4, ta, ma
324 ; RV64-NEXT: vslidedown.vx v0, v12, a4
325 ; RV64-NEXT: sltu a4, a1, a3
326 ; RV64-NEXT: addi a4, a4, -1
327 ; RV64-NEXT: and a3, a4, a3
328 ; RV64-NEXT: vsetvli a4, zero, e64, m8, ta, ma
329 ; RV64-NEXT: vsext.vf8 v16, v9
330 ; RV64-NEXT: vsetvli zero, a3, e8, m1, ta, ma
331 ; RV64-NEXT: vluxei64.v v9, (a0), v16, v0.t
332 ; RV64-NEXT: bltu a1, a2, .LBB12_6
333 ; RV64-NEXT: # %bb.5:
334 ; RV64-NEXT: mv a1, a2
335 ; RV64-NEXT: .LBB12_6:
336 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
337 ; RV64-NEXT: vsext.vf8 v16, v8
338 ; RV64-NEXT: vmv1r.v v0, v12
339 ; RV64-NEXT: vsetvli zero, a1, e8, m1, ta, ma
340 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
342 %ptrs = getelementptr inbounds i8, ptr %base, <vscale x 32 x i8> %idxs
343 %v = call <vscale x 32 x i8> @llvm.vp.gather.nxv32i8.nxv32p0(<vscale x 32 x ptr> %ptrs, <vscale x 32 x i1> %m, i32 %evl)
344 ret <vscale x 32 x i8> %v
347 declare <vscale x 1 x i16> @llvm.vp.gather.nxv1i16.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
349 define <vscale x 1 x i16> @vpgather_nxv1i16(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
350 ; RV32-LABEL: vpgather_nxv1i16:
352 ; RV32-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
353 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
354 ; RV32-NEXT: vmv1r.v v8, v9
357 ; RV64-LABEL: vpgather_nxv1i16:
359 ; RV64-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
360 ; RV64-NEXT: vluxei64.v v9, (zero), v8, v0.t
361 ; RV64-NEXT: vmv1r.v v8, v9
363 %v = call <vscale x 1 x i16> @llvm.vp.gather.nxv1i16.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
364 ret <vscale x 1 x i16> %v
367 declare <vscale x 2 x i16> @llvm.vp.gather.nxv2i16.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
369 define <vscale x 2 x i16> @vpgather_nxv2i16(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
370 ; RV32-LABEL: vpgather_nxv2i16:
372 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
373 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
374 ; RV32-NEXT: vmv1r.v v8, v9
377 ; RV64-LABEL: vpgather_nxv2i16:
379 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
380 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
381 ; RV64-NEXT: vmv1r.v v8, v10
383 %v = call <vscale x 2 x i16> @llvm.vp.gather.nxv2i16.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
384 ret <vscale x 2 x i16> %v
387 define <vscale x 2 x i32> @vpgather_nxv2i16_sextload_nxv2i32(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
388 ; RV32-LABEL: vpgather_nxv2i16_sextload_nxv2i32:
390 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
391 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
392 ; RV32-NEXT: vsetvli a0, zero, e32, m1, ta, ma
393 ; RV32-NEXT: vsext.vf2 v8, v9
396 ; RV64-LABEL: vpgather_nxv2i16_sextload_nxv2i32:
398 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
399 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
400 ; RV64-NEXT: vsetvli a0, zero, e32, m1, ta, ma
401 ; RV64-NEXT: vsext.vf2 v8, v10
403 %v = call <vscale x 2 x i16> @llvm.vp.gather.nxv2i16.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
404 %ev = sext <vscale x 2 x i16> %v to <vscale x 2 x i32>
405 ret <vscale x 2 x i32> %ev
408 define <vscale x 2 x i32> @vpgather_nxv2i16_zextload_nxv2i32(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
409 ; RV32-LABEL: vpgather_nxv2i16_zextload_nxv2i32:
411 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
412 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
413 ; RV32-NEXT: vsetvli a0, zero, e32, m1, ta, ma
414 ; RV32-NEXT: vzext.vf2 v8, v9
417 ; RV64-LABEL: vpgather_nxv2i16_zextload_nxv2i32:
419 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
420 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
421 ; RV64-NEXT: vsetvli a0, zero, e32, m1, ta, ma
422 ; RV64-NEXT: vzext.vf2 v8, v10
424 %v = call <vscale x 2 x i16> @llvm.vp.gather.nxv2i16.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
425 %ev = zext <vscale x 2 x i16> %v to <vscale x 2 x i32>
426 ret <vscale x 2 x i32> %ev
429 define <vscale x 2 x i64> @vpgather_nxv2i16_sextload_nxv2i64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
430 ; RV32-LABEL: vpgather_nxv2i16_sextload_nxv2i64:
432 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
433 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
434 ; RV32-NEXT: vsetvli a0, zero, e64, m2, ta, ma
435 ; RV32-NEXT: vsext.vf4 v8, v10
438 ; RV64-LABEL: vpgather_nxv2i16_sextload_nxv2i64:
440 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
441 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
442 ; RV64-NEXT: vsetvli a0, zero, e64, m2, ta, ma
443 ; RV64-NEXT: vsext.vf4 v8, v10
445 %v = call <vscale x 2 x i16> @llvm.vp.gather.nxv2i16.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
446 %ev = sext <vscale x 2 x i16> %v to <vscale x 2 x i64>
447 ret <vscale x 2 x i64> %ev
450 define <vscale x 2 x i64> @vpgather_nxv2i16_zextload_nxv2i64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
451 ; RV32-LABEL: vpgather_nxv2i16_zextload_nxv2i64:
453 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
454 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
455 ; RV32-NEXT: vsetvli a0, zero, e64, m2, ta, ma
456 ; RV32-NEXT: vzext.vf4 v8, v10
459 ; RV64-LABEL: vpgather_nxv2i16_zextload_nxv2i64:
461 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
462 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
463 ; RV64-NEXT: vsetvli a0, zero, e64, m2, ta, ma
464 ; RV64-NEXT: vzext.vf4 v8, v10
466 %v = call <vscale x 2 x i16> @llvm.vp.gather.nxv2i16.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
467 %ev = zext <vscale x 2 x i16> %v to <vscale x 2 x i64>
468 ret <vscale x 2 x i64> %ev
471 declare <vscale x 4 x i16> @llvm.vp.gather.nxv4i16.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
473 define <vscale x 4 x i16> @vpgather_nxv4i16(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
474 ; RV32-LABEL: vpgather_nxv4i16:
476 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
477 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
478 ; RV32-NEXT: vmv.v.v v8, v10
481 ; RV64-LABEL: vpgather_nxv4i16:
483 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
484 ; RV64-NEXT: vluxei64.v v12, (zero), v8, v0.t
485 ; RV64-NEXT: vmv.v.v v8, v12
487 %v = call <vscale x 4 x i16> @llvm.vp.gather.nxv4i16.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
488 ret <vscale x 4 x i16> %v
491 define <vscale x 4 x i16> @vpgather_truemask_nxv4i16(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
492 ; RV32-LABEL: vpgather_truemask_nxv4i16:
494 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
495 ; RV32-NEXT: vluxei32.v v10, (zero), v8
496 ; RV32-NEXT: vmv.v.v v8, v10
499 ; RV64-LABEL: vpgather_truemask_nxv4i16:
501 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
502 ; RV64-NEXT: vluxei64.v v12, (zero), v8
503 ; RV64-NEXT: vmv.v.v v8, v12
505 %v = call <vscale x 4 x i16> @llvm.vp.gather.nxv4i16.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
506 ret <vscale x 4 x i16> %v
509 declare <vscale x 8 x i16> @llvm.vp.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
511 define <vscale x 8 x i16> @vpgather_nxv8i16(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
512 ; RV32-LABEL: vpgather_nxv8i16:
514 ; RV32-NEXT: vsetvli zero, a0, e16, m2, ta, ma
515 ; RV32-NEXT: vluxei32.v v12, (zero), v8, v0.t
516 ; RV32-NEXT: vmv.v.v v8, v12
519 ; RV64-LABEL: vpgather_nxv8i16:
521 ; RV64-NEXT: vsetvli zero, a0, e16, m2, ta, ma
522 ; RV64-NEXT: vluxei64.v v16, (zero), v8, v0.t
523 ; RV64-NEXT: vmv.v.v v8, v16
525 %v = call <vscale x 8 x i16> @llvm.vp.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
526 ret <vscale x 8 x i16> %v
529 define <vscale x 8 x i16> @vpgather_baseidx_nxv8i8_nxv8i16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
530 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8i16:
532 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
533 ; RV32-NEXT: vsext.vf4 v12, v8
534 ; RV32-NEXT: vadd.vv v12, v12, v12
535 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
536 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
539 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8i16:
541 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
542 ; RV64-NEXT: vsext.vf8 v16, v8
543 ; RV64-NEXT: vadd.vv v16, v16, v16
544 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
545 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
547 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i8> %idxs
548 %v = call <vscale x 8 x i16> @llvm.vp.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
549 ret <vscale x 8 x i16> %v
552 define <vscale x 8 x i16> @vpgather_baseidx_sext_nxv8i8_nxv8i16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
553 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i16:
555 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
556 ; RV32-NEXT: vsext.vf4 v12, v8
557 ; RV32-NEXT: vadd.vv v12, v12, v12
558 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
559 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
562 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i16:
564 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
565 ; RV64-NEXT: vsext.vf8 v16, v8
566 ; RV64-NEXT: vadd.vv v16, v16, v16
567 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
568 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
570 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
571 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %eidxs
572 %v = call <vscale x 8 x i16> @llvm.vp.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
573 ret <vscale x 8 x i16> %v
576 define <vscale x 8 x i16> @vpgather_baseidx_zext_nxv8i8_nxv8i16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
577 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i16:
579 ; RV32-NEXT: vsetvli a2, zero, e8, m1, ta, ma
580 ; RV32-NEXT: vwaddu.vv v10, v8, v8
581 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
582 ; RV32-NEXT: vluxei16.v v8, (a0), v10, v0.t
585 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i16:
587 ; RV64-NEXT: vsetvli a2, zero, e8, m1, ta, ma
588 ; RV64-NEXT: vwaddu.vv v10, v8, v8
589 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
590 ; RV64-NEXT: vluxei16.v v8, (a0), v10, v0.t
592 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
593 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %eidxs
594 %v = call <vscale x 8 x i16> @llvm.vp.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
595 ret <vscale x 8 x i16> %v
598 define <vscale x 8 x i16> @vpgather_baseidx_nxv8i16(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
599 ; RV32-LABEL: vpgather_baseidx_nxv8i16:
601 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
602 ; RV32-NEXT: vwadd.vv v12, v8, v8
603 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
604 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
607 ; RV64-LABEL: vpgather_baseidx_nxv8i16:
609 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
610 ; RV64-NEXT: vsext.vf4 v16, v8
611 ; RV64-NEXT: vadd.vv v16, v16, v16
612 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
613 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
615 %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %idxs
616 %v = call <vscale x 8 x i16> @llvm.vp.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
617 ret <vscale x 8 x i16> %v
620 declare <vscale x 1 x i32> @llvm.vp.gather.nxv1i32.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
622 define <vscale x 1 x i32> @vpgather_nxv1i32(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
623 ; RV32-LABEL: vpgather_nxv1i32:
625 ; RV32-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
626 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
629 ; RV64-LABEL: vpgather_nxv1i32:
631 ; RV64-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
632 ; RV64-NEXT: vluxei64.v v9, (zero), v8, v0.t
633 ; RV64-NEXT: vmv1r.v v8, v9
635 %v = call <vscale x 1 x i32> @llvm.vp.gather.nxv1i32.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
636 ret <vscale x 1 x i32> %v
639 declare <vscale x 2 x i32> @llvm.vp.gather.nxv2i32.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
641 define <vscale x 2 x i32> @vpgather_nxv2i32(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
642 ; RV32-LABEL: vpgather_nxv2i32:
644 ; RV32-NEXT: vsetvli zero, a0, e32, m1, ta, ma
645 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
648 ; RV64-LABEL: vpgather_nxv2i32:
650 ; RV64-NEXT: vsetvli zero, a0, e32, m1, ta, ma
651 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
652 ; RV64-NEXT: vmv.v.v v8, v10
654 %v = call <vscale x 2 x i32> @llvm.vp.gather.nxv2i32.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
655 ret <vscale x 2 x i32> %v
658 define <vscale x 2 x i64> @vpgather_nxv2i32_sextload_nxv2i64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
659 ; RV32-LABEL: vpgather_nxv2i32_sextload_nxv2i64:
661 ; RV32-NEXT: vsetvli zero, a0, e32, m1, ta, ma
662 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
663 ; RV32-NEXT: vsetvli a0, zero, e64, m2, ta, ma
664 ; RV32-NEXT: vsext.vf2 v8, v10
667 ; RV64-LABEL: vpgather_nxv2i32_sextload_nxv2i64:
669 ; RV64-NEXT: vsetvli zero, a0, e32, m1, ta, ma
670 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
671 ; RV64-NEXT: vsetvli a0, zero, e64, m2, ta, ma
672 ; RV64-NEXT: vsext.vf2 v8, v10
674 %v = call <vscale x 2 x i32> @llvm.vp.gather.nxv2i32.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
675 %ev = sext <vscale x 2 x i32> %v to <vscale x 2 x i64>
676 ret <vscale x 2 x i64> %ev
679 define <vscale x 2 x i64> @vpgather_nxv2i32_zextload_nxv2i64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
680 ; RV32-LABEL: vpgather_nxv2i32_zextload_nxv2i64:
682 ; RV32-NEXT: vsetvli zero, a0, e32, m1, ta, ma
683 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
684 ; RV32-NEXT: vsetvli a0, zero, e64, m2, ta, ma
685 ; RV32-NEXT: vzext.vf2 v8, v10
688 ; RV64-LABEL: vpgather_nxv2i32_zextload_nxv2i64:
690 ; RV64-NEXT: vsetvli zero, a0, e32, m1, ta, ma
691 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
692 ; RV64-NEXT: vsetvli a0, zero, e64, m2, ta, ma
693 ; RV64-NEXT: vzext.vf2 v8, v10
695 %v = call <vscale x 2 x i32> @llvm.vp.gather.nxv2i32.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
696 %ev = zext <vscale x 2 x i32> %v to <vscale x 2 x i64>
697 ret <vscale x 2 x i64> %ev
700 declare <vscale x 4 x i32> @llvm.vp.gather.nxv4i32.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
702 define <vscale x 4 x i32> @vpgather_nxv4i32(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
703 ; RV32-LABEL: vpgather_nxv4i32:
705 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
706 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
709 ; RV64-LABEL: vpgather_nxv4i32:
711 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
712 ; RV64-NEXT: vluxei64.v v12, (zero), v8, v0.t
713 ; RV64-NEXT: vmv.v.v v8, v12
715 %v = call <vscale x 4 x i32> @llvm.vp.gather.nxv4i32.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
716 ret <vscale x 4 x i32> %v
719 define <vscale x 4 x i32> @vpgather_truemask_nxv4i32(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
720 ; RV32-LABEL: vpgather_truemask_nxv4i32:
722 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
723 ; RV32-NEXT: vluxei32.v v8, (zero), v8
726 ; RV64-LABEL: vpgather_truemask_nxv4i32:
728 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
729 ; RV64-NEXT: vluxei64.v v12, (zero), v8
730 ; RV64-NEXT: vmv.v.v v8, v12
732 %v = call <vscale x 4 x i32> @llvm.vp.gather.nxv4i32.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
733 ret <vscale x 4 x i32> %v
736 declare <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
738 define <vscale x 8 x i32> @vpgather_nxv8i32(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
739 ; RV32-LABEL: vpgather_nxv8i32:
741 ; RV32-NEXT: vsetvli zero, a0, e32, m4, ta, ma
742 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
745 ; RV64-LABEL: vpgather_nxv8i32:
747 ; RV64-NEXT: vsetvli zero, a0, e32, m4, ta, ma
748 ; RV64-NEXT: vluxei64.v v16, (zero), v8, v0.t
749 ; RV64-NEXT: vmv.v.v v8, v16
751 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
752 ret <vscale x 8 x i32> %v
755 define <vscale x 8 x i32> @vpgather_baseidx_nxv8i8_nxv8i32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
756 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8i32:
758 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
759 ; RV32-NEXT: vsext.vf4 v12, v8
760 ; RV32-NEXT: vsll.vi v8, v12, 2
761 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
762 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
765 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8i32:
767 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
768 ; RV64-NEXT: vsext.vf8 v16, v8
769 ; RV64-NEXT: vsll.vi v16, v16, 2
770 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
771 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
773 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i8> %idxs
774 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
775 ret <vscale x 8 x i32> %v
778 define <vscale x 8 x i32> @vpgather_baseidx_sext_nxv8i8_nxv8i32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
779 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i32:
781 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
782 ; RV32-NEXT: vsext.vf4 v12, v8
783 ; RV32-NEXT: vsll.vi v8, v12, 2
784 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
785 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
788 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i32:
790 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
791 ; RV64-NEXT: vsext.vf8 v16, v8
792 ; RV64-NEXT: vsll.vi v16, v16, 2
793 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
794 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
796 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
797 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
798 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
799 ret <vscale x 8 x i32> %v
802 define <vscale x 8 x i32> @vpgather_baseidx_zext_nxv8i8_nxv8i32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
803 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i32:
805 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
806 ; RV32-NEXT: vzext.vf2 v10, v8
807 ; RV32-NEXT: vsll.vi v12, v10, 2
808 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
809 ; RV32-NEXT: vluxei16.v v8, (a0), v12, v0.t
812 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i32:
814 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
815 ; RV64-NEXT: vzext.vf2 v10, v8
816 ; RV64-NEXT: vsll.vi v12, v10, 2
817 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
818 ; RV64-NEXT: vluxei16.v v8, (a0), v12, v0.t
820 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
821 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
822 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
823 ret <vscale x 8 x i32> %v
826 define <vscale x 8 x i32> @vpgather_baseidx_nxv8i16_nxv8i32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
827 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8i32:
829 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
830 ; RV32-NEXT: vsext.vf2 v12, v8
831 ; RV32-NEXT: vsll.vi v8, v12, 2
832 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
833 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
836 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8i32:
838 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
839 ; RV64-NEXT: vsext.vf4 v16, v8
840 ; RV64-NEXT: vsll.vi v16, v16, 2
841 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
842 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
844 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i16> %idxs
845 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
846 ret <vscale x 8 x i32> %v
849 define <vscale x 8 x i32> @vpgather_baseidx_sext_nxv8i16_nxv8i32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
850 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i32:
852 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
853 ; RV32-NEXT: vsext.vf2 v12, v8
854 ; RV32-NEXT: vsll.vi v8, v12, 2
855 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
856 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
859 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i32:
861 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
862 ; RV64-NEXT: vsext.vf4 v16, v8
863 ; RV64-NEXT: vsll.vi v16, v16, 2
864 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
865 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
867 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
868 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
869 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
870 ret <vscale x 8 x i32> %v
873 define <vscale x 8 x i32> @vpgather_baseidx_zext_nxv8i16_nxv8i32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
874 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i32:
876 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
877 ; RV32-NEXT: vzext.vf2 v12, v8
878 ; RV32-NEXT: vsll.vi v8, v12, 2
879 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
880 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
883 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i32:
885 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
886 ; RV64-NEXT: vzext.vf2 v12, v8
887 ; RV64-NEXT: vsll.vi v8, v12, 2
888 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
889 ; RV64-NEXT: vluxei32.v v8, (a0), v8, v0.t
891 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
892 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %eidxs
893 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
894 ret <vscale x 8 x i32> %v
897 define <vscale x 8 x i32> @vpgather_baseidx_nxv8i32(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
898 ; RV32-LABEL: vpgather_baseidx_nxv8i32:
900 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
901 ; RV32-NEXT: vsll.vi v8, v8, 2
902 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
903 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
906 ; RV64-LABEL: vpgather_baseidx_nxv8i32:
908 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
909 ; RV64-NEXT: vsext.vf2 v16, v8
910 ; RV64-NEXT: vsll.vi v16, v16, 2
911 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
912 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
914 %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %idxs
915 %v = call <vscale x 8 x i32> @llvm.vp.gather.nxv8i32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
916 ret <vscale x 8 x i32> %v
919 declare <vscale x 1 x i64> @llvm.vp.gather.nxv1i64.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
921 define <vscale x 1 x i64> @vpgather_nxv1i64(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
922 ; RV32-LABEL: vpgather_nxv1i64:
924 ; RV32-NEXT: vsetvli zero, a0, e64, m1, ta, ma
925 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
926 ; RV32-NEXT: vmv.v.v v8, v9
929 ; RV64-LABEL: vpgather_nxv1i64:
931 ; RV64-NEXT: vsetvli zero, a0, e64, m1, ta, ma
932 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
934 %v = call <vscale x 1 x i64> @llvm.vp.gather.nxv1i64.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
935 ret <vscale x 1 x i64> %v
938 declare <vscale x 2 x i64> @llvm.vp.gather.nxv2i64.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
940 define <vscale x 2 x i64> @vpgather_nxv2i64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
941 ; RV32-LABEL: vpgather_nxv2i64:
943 ; RV32-NEXT: vsetvli zero, a0, e64, m2, ta, ma
944 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
945 ; RV32-NEXT: vmv.v.v v8, v10
948 ; RV64-LABEL: vpgather_nxv2i64:
950 ; RV64-NEXT: vsetvli zero, a0, e64, m2, ta, ma
951 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
953 %v = call <vscale x 2 x i64> @llvm.vp.gather.nxv2i64.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
954 ret <vscale x 2 x i64> %v
957 declare <vscale x 4 x i64> @llvm.vp.gather.nxv4i64.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
959 define <vscale x 4 x i64> @vpgather_nxv4i64(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
960 ; RV32-LABEL: vpgather_nxv4i64:
962 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
963 ; RV32-NEXT: vluxei32.v v12, (zero), v8, v0.t
964 ; RV32-NEXT: vmv.v.v v8, v12
967 ; RV64-LABEL: vpgather_nxv4i64:
969 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
970 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
972 %v = call <vscale x 4 x i64> @llvm.vp.gather.nxv4i64.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
973 ret <vscale x 4 x i64> %v
976 define <vscale x 4 x i64> @vpgather_truemask_nxv4i64(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
977 ; RV32-LABEL: vpgather_truemask_nxv4i64:
979 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
980 ; RV32-NEXT: vluxei32.v v12, (zero), v8
981 ; RV32-NEXT: vmv.v.v v8, v12
984 ; RV64-LABEL: vpgather_truemask_nxv4i64:
986 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
987 ; RV64-NEXT: vluxei64.v v8, (zero), v8
989 %v = call <vscale x 4 x i64> @llvm.vp.gather.nxv4i64.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
990 ret <vscale x 4 x i64> %v
993 declare <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
995 define <vscale x 8 x i64> @vpgather_nxv8i64(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
996 ; RV32-LABEL: vpgather_nxv8i64:
998 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma
999 ; RV32-NEXT: vluxei32.v v16, (zero), v8, v0.t
1000 ; RV32-NEXT: vmv.v.v v8, v16
1003 ; RV64-LABEL: vpgather_nxv8i64:
1005 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1006 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
1008 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1009 ret <vscale x 8 x i64> %v
1012 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i8_nxv8i64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1013 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8i64:
1015 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1016 ; RV32-NEXT: vsext.vf4 v12, v8
1017 ; RV32-NEXT: vsll.vi v16, v12, 3
1018 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1019 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1022 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8i64:
1024 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1025 ; RV64-NEXT: vsext.vf8 v16, v8
1026 ; RV64-NEXT: vsll.vi v8, v16, 3
1027 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1028 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1030 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i8> %idxs
1031 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1032 ret <vscale x 8 x i64> %v
1035 define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i8_nxv8i64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1036 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i64:
1038 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1039 ; RV32-NEXT: vsext.vf4 v12, v8
1040 ; RV32-NEXT: vsll.vi v16, v12, 3
1041 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1042 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1045 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i64:
1047 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1048 ; RV64-NEXT: vsext.vf8 v16, v8
1049 ; RV64-NEXT: vsll.vi v8, v16, 3
1050 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1051 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1053 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
1054 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
1055 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1056 ret <vscale x 8 x i64> %v
1059 define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i8_nxv8i64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1060 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i64:
1062 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1063 ; RV32-NEXT: vzext.vf2 v10, v8
1064 ; RV32-NEXT: vsll.vi v16, v10, 3
1065 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1066 ; RV32-NEXT: vluxei16.v v8, (a0), v16, v0.t
1069 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i64:
1071 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1072 ; RV64-NEXT: vzext.vf2 v10, v8
1073 ; RV64-NEXT: vsll.vi v16, v10, 3
1074 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1075 ; RV64-NEXT: vluxei16.v v8, (a0), v16, v0.t
1077 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
1078 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
1079 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1080 ret <vscale x 8 x i64> %v
1083 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i16_nxv8i64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1084 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8i64:
1086 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1087 ; RV32-NEXT: vsext.vf2 v12, v8
1088 ; RV32-NEXT: vsll.vi v16, v12, 3
1089 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1090 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1093 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8i64:
1095 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1096 ; RV64-NEXT: vsext.vf4 v16, v8
1097 ; RV64-NEXT: vsll.vi v8, v16, 3
1098 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1099 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1101 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i16> %idxs
1102 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1103 ret <vscale x 8 x i64> %v
1106 define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i16_nxv8i64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1107 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i64:
1109 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1110 ; RV32-NEXT: vsext.vf2 v12, v8
1111 ; RV32-NEXT: vsll.vi v16, v12, 3
1112 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1113 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1116 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i64:
1118 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1119 ; RV64-NEXT: vsext.vf4 v16, v8
1120 ; RV64-NEXT: vsll.vi v8, v16, 3
1121 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1122 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1124 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
1125 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
1126 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1127 ret <vscale x 8 x i64> %v
1130 define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i16_nxv8i64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1131 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i64:
1133 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1134 ; RV32-NEXT: vzext.vf2 v12, v8
1135 ; RV32-NEXT: vsll.vi v16, v12, 3
1136 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1137 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1140 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i64:
1142 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1143 ; RV64-NEXT: vzext.vf2 v12, v8
1144 ; RV64-NEXT: vsll.vi v16, v12, 3
1145 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1146 ; RV64-NEXT: vluxei32.v v8, (a0), v16, v0.t
1148 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
1149 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
1150 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1151 ret <vscale x 8 x i64> %v
1154 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i32_nxv8i64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1155 ; RV32-LABEL: vpgather_baseidx_nxv8i32_nxv8i64:
1157 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1158 ; RV32-NEXT: vsll.vi v16, v8, 3
1159 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1160 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1163 ; RV64-LABEL: vpgather_baseidx_nxv8i32_nxv8i64:
1165 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1166 ; RV64-NEXT: vsext.vf2 v16, v8
1167 ; RV64-NEXT: vsll.vi v8, v16, 3
1168 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1169 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1171 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i32> %idxs
1172 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1173 ret <vscale x 8 x i64> %v
1176 define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i32_nxv8i64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1177 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8i64:
1179 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1180 ; RV32-NEXT: vsll.vi v16, v8, 3
1181 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1182 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1185 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8i64:
1187 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1188 ; RV64-NEXT: vsext.vf2 v16, v8
1189 ; RV64-NEXT: vsll.vi v8, v16, 3
1190 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1191 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1193 %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
1194 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
1195 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1196 ret <vscale x 8 x i64> %v
1199 define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i32_nxv8i64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1200 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8i64:
1202 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1203 ; RV32-NEXT: vsll.vi v16, v8, 3
1204 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1205 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1208 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8i64:
1210 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1211 ; RV64-NEXT: vzext.vf2 v16, v8
1212 ; RV64-NEXT: vsll.vi v8, v16, 3
1213 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1214 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1216 %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
1217 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %eidxs
1218 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1219 ret <vscale x 8 x i64> %v
1222 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i64(ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1223 ; RV32-LABEL: vpgather_baseidx_nxv8i64:
1225 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1226 ; RV32-NEXT: vnsrl.wi v16, v8, 0
1227 ; RV32-NEXT: vsll.vi v16, v16, 3
1228 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1229 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1232 ; RV64-LABEL: vpgather_baseidx_nxv8i64:
1234 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1235 ; RV64-NEXT: vsll.vi v8, v8, 3
1236 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1237 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1239 %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %idxs
1240 %v = call <vscale x 8 x i64> @llvm.vp.gather.nxv8i64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1241 ret <vscale x 8 x i64> %v
1244 declare <vscale x 1 x bfloat> @llvm.vp.gather.nxv1bf16.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
1246 define <vscale x 1 x bfloat> @vpgather_nxv1bf16(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1247 ; RV32-LABEL: vpgather_nxv1bf16:
1249 ; RV32-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1250 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
1251 ; RV32-NEXT: vmv1r.v v8, v9
1254 ; RV64-LABEL: vpgather_nxv1bf16:
1256 ; RV64-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1257 ; RV64-NEXT: vluxei64.v v9, (zero), v8, v0.t
1258 ; RV64-NEXT: vmv1r.v v8, v9
1260 %v = call <vscale x 1 x bfloat> @llvm.vp.gather.nxv1bf16.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
1261 ret <vscale x 1 x bfloat> %v
1264 declare <vscale x 2 x bfloat> @llvm.vp.gather.nxv2bf16.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
1266 define <vscale x 2 x bfloat> @vpgather_nxv2bf16(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1267 ; RV32-LABEL: vpgather_nxv2bf16:
1269 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1270 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
1271 ; RV32-NEXT: vmv1r.v v8, v9
1274 ; RV64-LABEL: vpgather_nxv2bf16:
1276 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1277 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
1278 ; RV64-NEXT: vmv1r.v v8, v10
1280 %v = call <vscale x 2 x bfloat> @llvm.vp.gather.nxv2bf16.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
1281 ret <vscale x 2 x bfloat> %v
1284 declare <vscale x 4 x bfloat> @llvm.vp.gather.nxv4bf16.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
1286 define <vscale x 4 x bfloat> @vpgather_nxv4bf16(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1287 ; RV32-LABEL: vpgather_nxv4bf16:
1289 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1290 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
1291 ; RV32-NEXT: vmv.v.v v8, v10
1294 ; RV64-LABEL: vpgather_nxv4bf16:
1296 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1297 ; RV64-NEXT: vluxei64.v v12, (zero), v8, v0.t
1298 ; RV64-NEXT: vmv.v.v v8, v12
1300 %v = call <vscale x 4 x bfloat> @llvm.vp.gather.nxv4bf16.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
1301 ret <vscale x 4 x bfloat> %v
1304 define <vscale x 4 x bfloat> @vpgather_truemask_nxv4bf16(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
1305 ; RV32-LABEL: vpgather_truemask_nxv4bf16:
1307 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1308 ; RV32-NEXT: vluxei32.v v10, (zero), v8
1309 ; RV32-NEXT: vmv.v.v v8, v10
1312 ; RV64-LABEL: vpgather_truemask_nxv4bf16:
1314 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1315 ; RV64-NEXT: vluxei64.v v12, (zero), v8
1316 ; RV64-NEXT: vmv.v.v v8, v12
1318 %v = call <vscale x 4 x bfloat> @llvm.vp.gather.nxv4bf16.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
1319 ret <vscale x 4 x bfloat> %v
1322 declare <vscale x 8 x bfloat> @llvm.vp.gather.nxv8bf16.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
1324 define <vscale x 8 x bfloat> @vpgather_nxv8bf16(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1325 ; RV32-LABEL: vpgather_nxv8bf16:
1327 ; RV32-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1328 ; RV32-NEXT: vluxei32.v v12, (zero), v8, v0.t
1329 ; RV32-NEXT: vmv.v.v v8, v12
1332 ; RV64-LABEL: vpgather_nxv8bf16:
1334 ; RV64-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1335 ; RV64-NEXT: vluxei64.v v16, (zero), v8, v0.t
1336 ; RV64-NEXT: vmv.v.v v8, v16
1338 %v = call <vscale x 8 x bfloat> @llvm.vp.gather.nxv8bf16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1339 ret <vscale x 8 x bfloat> %v
1342 define <vscale x 8 x bfloat> @vpgather_baseidx_nxv8i8_nxv8bf16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1343 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8bf16:
1345 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1346 ; RV32-NEXT: vsext.vf4 v12, v8
1347 ; RV32-NEXT: vadd.vv v12, v12, v12
1348 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1349 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
1352 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8bf16:
1354 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1355 ; RV64-NEXT: vsext.vf8 v16, v8
1356 ; RV64-NEXT: vadd.vv v16, v16, v16
1357 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1358 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1360 %ptrs = getelementptr inbounds bfloat, ptr %base, <vscale x 8 x i8> %idxs
1361 %v = call <vscale x 8 x bfloat> @llvm.vp.gather.nxv8bf16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1362 ret <vscale x 8 x bfloat> %v
1365 define <vscale x 8 x bfloat> @vpgather_baseidx_sext_nxv8i8_nxv8bf16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1366 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8bf16:
1368 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1369 ; RV32-NEXT: vsext.vf4 v12, v8
1370 ; RV32-NEXT: vadd.vv v12, v12, v12
1371 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1372 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
1375 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8bf16:
1377 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1378 ; RV64-NEXT: vsext.vf8 v16, v8
1379 ; RV64-NEXT: vadd.vv v16, v16, v16
1380 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1381 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1383 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
1384 %ptrs = getelementptr inbounds bfloat, ptr %base, <vscale x 8 x i16> %eidxs
1385 %v = call <vscale x 8 x bfloat> @llvm.vp.gather.nxv8bf16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1386 ret <vscale x 8 x bfloat> %v
1389 define <vscale x 8 x bfloat> @vpgather_baseidx_zext_nxv8i8_nxv8bf16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1390 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8bf16:
1392 ; RV32-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1393 ; RV32-NEXT: vwaddu.vv v10, v8, v8
1394 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1395 ; RV32-NEXT: vluxei16.v v8, (a0), v10, v0.t
1398 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8bf16:
1400 ; RV64-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1401 ; RV64-NEXT: vwaddu.vv v10, v8, v8
1402 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1403 ; RV64-NEXT: vluxei16.v v8, (a0), v10, v0.t
1405 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
1406 %ptrs = getelementptr inbounds bfloat, ptr %base, <vscale x 8 x i16> %eidxs
1407 %v = call <vscale x 8 x bfloat> @llvm.vp.gather.nxv8bf16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1408 ret <vscale x 8 x bfloat> %v
1411 define <vscale x 8 x bfloat> @vpgather_baseidx_nxv8bf16(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1412 ; RV32-LABEL: vpgather_baseidx_nxv8bf16:
1414 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1415 ; RV32-NEXT: vwadd.vv v12, v8, v8
1416 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1417 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
1420 ; RV64-LABEL: vpgather_baseidx_nxv8bf16:
1422 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1423 ; RV64-NEXT: vsext.vf4 v16, v8
1424 ; RV64-NEXT: vadd.vv v16, v16, v16
1425 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1426 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1428 %ptrs = getelementptr inbounds bfloat, ptr %base, <vscale x 8 x i16> %idxs
1429 %v = call <vscale x 8 x bfloat> @llvm.vp.gather.nxv8bf16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1430 ret <vscale x 8 x bfloat> %v
1433 declare <vscale x 1 x half> @llvm.vp.gather.nxv1f16.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
1435 define <vscale x 1 x half> @vpgather_nxv1f16(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1436 ; RV32-LABEL: vpgather_nxv1f16:
1438 ; RV32-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1439 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
1440 ; RV32-NEXT: vmv1r.v v8, v9
1443 ; RV64-LABEL: vpgather_nxv1f16:
1445 ; RV64-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1446 ; RV64-NEXT: vluxei64.v v9, (zero), v8, v0.t
1447 ; RV64-NEXT: vmv1r.v v8, v9
1449 %v = call <vscale x 1 x half> @llvm.vp.gather.nxv1f16.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
1450 ret <vscale x 1 x half> %v
1453 declare <vscale x 2 x half> @llvm.vp.gather.nxv2f16.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
1455 define <vscale x 2 x half> @vpgather_nxv2f16(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1456 ; RV32-LABEL: vpgather_nxv2f16:
1458 ; RV32-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1459 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
1460 ; RV32-NEXT: vmv1r.v v8, v9
1463 ; RV64-LABEL: vpgather_nxv2f16:
1465 ; RV64-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1466 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
1467 ; RV64-NEXT: vmv1r.v v8, v10
1469 %v = call <vscale x 2 x half> @llvm.vp.gather.nxv2f16.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
1470 ret <vscale x 2 x half> %v
1473 declare <vscale x 4 x half> @llvm.vp.gather.nxv4f16.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
1475 define <vscale x 4 x half> @vpgather_nxv4f16(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1476 ; RV32-LABEL: vpgather_nxv4f16:
1478 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1479 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
1480 ; RV32-NEXT: vmv.v.v v8, v10
1483 ; RV64-LABEL: vpgather_nxv4f16:
1485 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1486 ; RV64-NEXT: vluxei64.v v12, (zero), v8, v0.t
1487 ; RV64-NEXT: vmv.v.v v8, v12
1489 %v = call <vscale x 4 x half> @llvm.vp.gather.nxv4f16.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
1490 ret <vscale x 4 x half> %v
1493 define <vscale x 4 x half> @vpgather_truemask_nxv4f16(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
1494 ; RV32-LABEL: vpgather_truemask_nxv4f16:
1496 ; RV32-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1497 ; RV32-NEXT: vluxei32.v v10, (zero), v8
1498 ; RV32-NEXT: vmv.v.v v8, v10
1501 ; RV64-LABEL: vpgather_truemask_nxv4f16:
1503 ; RV64-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1504 ; RV64-NEXT: vluxei64.v v12, (zero), v8
1505 ; RV64-NEXT: vmv.v.v v8, v12
1507 %v = call <vscale x 4 x half> @llvm.vp.gather.nxv4f16.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
1508 ret <vscale x 4 x half> %v
1511 declare <vscale x 8 x half> @llvm.vp.gather.nxv8f16.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
1513 define <vscale x 8 x half> @vpgather_nxv8f16(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1514 ; RV32-LABEL: vpgather_nxv8f16:
1516 ; RV32-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1517 ; RV32-NEXT: vluxei32.v v12, (zero), v8, v0.t
1518 ; RV32-NEXT: vmv.v.v v8, v12
1521 ; RV64-LABEL: vpgather_nxv8f16:
1523 ; RV64-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1524 ; RV64-NEXT: vluxei64.v v16, (zero), v8, v0.t
1525 ; RV64-NEXT: vmv.v.v v8, v16
1527 %v = call <vscale x 8 x half> @llvm.vp.gather.nxv8f16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1528 ret <vscale x 8 x half> %v
1531 define <vscale x 8 x half> @vpgather_baseidx_nxv8i8_nxv8f16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1532 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8f16:
1534 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1535 ; RV32-NEXT: vsext.vf4 v12, v8
1536 ; RV32-NEXT: vadd.vv v12, v12, v12
1537 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1538 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
1541 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8f16:
1543 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1544 ; RV64-NEXT: vsext.vf8 v16, v8
1545 ; RV64-NEXT: vadd.vv v16, v16, v16
1546 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1547 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1549 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i8> %idxs
1550 %v = call <vscale x 8 x half> @llvm.vp.gather.nxv8f16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1551 ret <vscale x 8 x half> %v
1554 define <vscale x 8 x half> @vpgather_baseidx_sext_nxv8i8_nxv8f16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1555 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f16:
1557 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1558 ; RV32-NEXT: vsext.vf4 v12, v8
1559 ; RV32-NEXT: vadd.vv v12, v12, v12
1560 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1561 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
1564 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f16:
1566 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1567 ; RV64-NEXT: vsext.vf8 v16, v8
1568 ; RV64-NEXT: vadd.vv v16, v16, v16
1569 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1570 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1572 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
1573 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %eidxs
1574 %v = call <vscale x 8 x half> @llvm.vp.gather.nxv8f16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1575 ret <vscale x 8 x half> %v
1578 define <vscale x 8 x half> @vpgather_baseidx_zext_nxv8i8_nxv8f16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1579 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f16:
1581 ; RV32-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1582 ; RV32-NEXT: vwaddu.vv v10, v8, v8
1583 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1584 ; RV32-NEXT: vluxei16.v v8, (a0), v10, v0.t
1587 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f16:
1589 ; RV64-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1590 ; RV64-NEXT: vwaddu.vv v10, v8, v8
1591 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1592 ; RV64-NEXT: vluxei16.v v8, (a0), v10, v0.t
1594 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
1595 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %eidxs
1596 %v = call <vscale x 8 x half> @llvm.vp.gather.nxv8f16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1597 ret <vscale x 8 x half> %v
1600 define <vscale x 8 x half> @vpgather_baseidx_nxv8f16(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1601 ; RV32-LABEL: vpgather_baseidx_nxv8f16:
1603 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1604 ; RV32-NEXT: vwadd.vv v12, v8, v8
1605 ; RV32-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1606 ; RV32-NEXT: vluxei32.v v8, (a0), v12, v0.t
1609 ; RV64-LABEL: vpgather_baseidx_nxv8f16:
1611 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1612 ; RV64-NEXT: vsext.vf4 v16, v8
1613 ; RV64-NEXT: vadd.vv v16, v16, v16
1614 ; RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
1615 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1617 %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %idxs
1618 %v = call <vscale x 8 x half> @llvm.vp.gather.nxv8f16.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1619 ret <vscale x 8 x half> %v
1622 declare <vscale x 1 x float> @llvm.vp.gather.nxv1f32.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
1624 define <vscale x 1 x float> @vpgather_nxv1f32(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1625 ; RV32-LABEL: vpgather_nxv1f32:
1627 ; RV32-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1628 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
1631 ; RV64-LABEL: vpgather_nxv1f32:
1633 ; RV64-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1634 ; RV64-NEXT: vluxei64.v v9, (zero), v8, v0.t
1635 ; RV64-NEXT: vmv1r.v v8, v9
1637 %v = call <vscale x 1 x float> @llvm.vp.gather.nxv1f32.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
1638 ret <vscale x 1 x float> %v
1641 declare <vscale x 2 x float> @llvm.vp.gather.nxv2f32.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
1643 define <vscale x 2 x float> @vpgather_nxv2f32(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1644 ; RV32-LABEL: vpgather_nxv2f32:
1646 ; RV32-NEXT: vsetvli zero, a0, e32, m1, ta, ma
1647 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
1650 ; RV64-LABEL: vpgather_nxv2f32:
1652 ; RV64-NEXT: vsetvli zero, a0, e32, m1, ta, ma
1653 ; RV64-NEXT: vluxei64.v v10, (zero), v8, v0.t
1654 ; RV64-NEXT: vmv.v.v v8, v10
1656 %v = call <vscale x 2 x float> @llvm.vp.gather.nxv2f32.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
1657 ret <vscale x 2 x float> %v
1660 declare <vscale x 4 x float> @llvm.vp.gather.nxv4f32.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
1662 define <vscale x 4 x float> @vpgather_nxv4f32(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1663 ; RV32-LABEL: vpgather_nxv4f32:
1665 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1666 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
1669 ; RV64-LABEL: vpgather_nxv4f32:
1671 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1672 ; RV64-NEXT: vluxei64.v v12, (zero), v8, v0.t
1673 ; RV64-NEXT: vmv.v.v v8, v12
1675 %v = call <vscale x 4 x float> @llvm.vp.gather.nxv4f32.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
1676 ret <vscale x 4 x float> %v
1679 define <vscale x 4 x float> @vpgather_truemask_nxv4f32(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
1680 ; RV32-LABEL: vpgather_truemask_nxv4f32:
1682 ; RV32-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1683 ; RV32-NEXT: vluxei32.v v8, (zero), v8
1686 ; RV64-LABEL: vpgather_truemask_nxv4f32:
1688 ; RV64-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1689 ; RV64-NEXT: vluxei64.v v12, (zero), v8
1690 ; RV64-NEXT: vmv.v.v v8, v12
1692 %v = call <vscale x 4 x float> @llvm.vp.gather.nxv4f32.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
1693 ret <vscale x 4 x float> %v
1696 declare <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
1698 define <vscale x 8 x float> @vpgather_nxv8f32(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1699 ; RV32-LABEL: vpgather_nxv8f32:
1701 ; RV32-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1702 ; RV32-NEXT: vluxei32.v v8, (zero), v8, v0.t
1705 ; RV64-LABEL: vpgather_nxv8f32:
1707 ; RV64-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1708 ; RV64-NEXT: vluxei64.v v16, (zero), v8, v0.t
1709 ; RV64-NEXT: vmv.v.v v8, v16
1711 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1712 ret <vscale x 8 x float> %v
1715 define <vscale x 8 x float> @vpgather_baseidx_nxv8i8_nxv8f32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1716 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8f32:
1718 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1719 ; RV32-NEXT: vsext.vf4 v12, v8
1720 ; RV32-NEXT: vsll.vi v8, v12, 2
1721 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1722 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
1725 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8f32:
1727 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1728 ; RV64-NEXT: vsext.vf8 v16, v8
1729 ; RV64-NEXT: vsll.vi v16, v16, 2
1730 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1731 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1733 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i8> %idxs
1734 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1735 ret <vscale x 8 x float> %v
1738 define <vscale x 8 x float> @vpgather_baseidx_sext_nxv8i8_nxv8f32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1739 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f32:
1741 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1742 ; RV32-NEXT: vsext.vf4 v12, v8
1743 ; RV32-NEXT: vsll.vi v8, v12, 2
1744 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1745 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
1748 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f32:
1750 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1751 ; RV64-NEXT: vsext.vf8 v16, v8
1752 ; RV64-NEXT: vsll.vi v16, v16, 2
1753 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1754 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1756 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
1757 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1758 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1759 ret <vscale x 8 x float> %v
1762 define <vscale x 8 x float> @vpgather_baseidx_zext_nxv8i8_nxv8f32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1763 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f32:
1765 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1766 ; RV32-NEXT: vzext.vf2 v10, v8
1767 ; RV32-NEXT: vsll.vi v12, v10, 2
1768 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1769 ; RV32-NEXT: vluxei16.v v8, (a0), v12, v0.t
1772 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f32:
1774 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
1775 ; RV64-NEXT: vzext.vf2 v10, v8
1776 ; RV64-NEXT: vsll.vi v12, v10, 2
1777 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1778 ; RV64-NEXT: vluxei16.v v8, (a0), v12, v0.t
1780 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
1781 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1782 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1783 ret <vscale x 8 x float> %v
1786 define <vscale x 8 x float> @vpgather_baseidx_nxv8i16_nxv8f32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1787 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8f32:
1789 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1790 ; RV32-NEXT: vsext.vf2 v12, v8
1791 ; RV32-NEXT: vsll.vi v8, v12, 2
1792 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1793 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
1796 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8f32:
1798 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1799 ; RV64-NEXT: vsext.vf4 v16, v8
1800 ; RV64-NEXT: vsll.vi v16, v16, 2
1801 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1802 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1804 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i16> %idxs
1805 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1806 ret <vscale x 8 x float> %v
1809 define <vscale x 8 x float> @vpgather_baseidx_sext_nxv8i16_nxv8f32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1810 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f32:
1812 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1813 ; RV32-NEXT: vsext.vf2 v12, v8
1814 ; RV32-NEXT: vsll.vi v8, v12, 2
1815 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1816 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
1819 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f32:
1821 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1822 ; RV64-NEXT: vsext.vf4 v16, v8
1823 ; RV64-NEXT: vsll.vi v16, v16, 2
1824 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1825 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1827 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
1828 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1829 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1830 ret <vscale x 8 x float> %v
1833 define <vscale x 8 x float> @vpgather_baseidx_zext_nxv8i16_nxv8f32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1834 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f32:
1836 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1837 ; RV32-NEXT: vzext.vf2 v12, v8
1838 ; RV32-NEXT: vsll.vi v8, v12, 2
1839 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1840 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
1843 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f32:
1845 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1846 ; RV64-NEXT: vzext.vf2 v12, v8
1847 ; RV64-NEXT: vsll.vi v8, v12, 2
1848 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1849 ; RV64-NEXT: vluxei32.v v8, (a0), v8, v0.t
1851 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
1852 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %eidxs
1853 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1854 ret <vscale x 8 x float> %v
1857 define <vscale x 8 x float> @vpgather_baseidx_nxv8f32(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1858 ; RV32-LABEL: vpgather_baseidx_nxv8f32:
1860 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1861 ; RV32-NEXT: vsll.vi v8, v8, 2
1862 ; RV32-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1863 ; RV32-NEXT: vluxei32.v v8, (a0), v8, v0.t
1866 ; RV64-LABEL: vpgather_baseidx_nxv8f32:
1868 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1869 ; RV64-NEXT: vsext.vf2 v16, v8
1870 ; RV64-NEXT: vsll.vi v16, v16, 2
1871 ; RV64-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1872 ; RV64-NEXT: vluxei64.v v8, (a0), v16, v0.t
1874 %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %idxs
1875 %v = call <vscale x 8 x float> @llvm.vp.gather.nxv8f32.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
1876 ret <vscale x 8 x float> %v
1879 declare <vscale x 1 x double> @llvm.vp.gather.nxv1f64.nxv1p0(<vscale x 1 x ptr>, <vscale x 1 x i1>, i32)
1881 define <vscale x 1 x double> @vpgather_nxv1f64(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1882 ; RV32-LABEL: vpgather_nxv1f64:
1884 ; RV32-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1885 ; RV32-NEXT: vluxei32.v v9, (zero), v8, v0.t
1886 ; RV32-NEXT: vmv.v.v v8, v9
1889 ; RV64-LABEL: vpgather_nxv1f64:
1891 ; RV64-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1892 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
1894 %v = call <vscale x 1 x double> @llvm.vp.gather.nxv1f64.nxv1p0(<vscale x 1 x ptr> %ptrs, <vscale x 1 x i1> %m, i32 %evl)
1895 ret <vscale x 1 x double> %v
1898 declare <vscale x 2 x double> @llvm.vp.gather.nxv2f64.nxv2p0(<vscale x 2 x ptr>, <vscale x 2 x i1>, i32)
1900 define <vscale x 2 x double> @vpgather_nxv2f64(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1901 ; RV32-LABEL: vpgather_nxv2f64:
1903 ; RV32-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1904 ; RV32-NEXT: vluxei32.v v10, (zero), v8, v0.t
1905 ; RV32-NEXT: vmv.v.v v8, v10
1908 ; RV64-LABEL: vpgather_nxv2f64:
1910 ; RV64-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1911 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
1913 %v = call <vscale x 2 x double> @llvm.vp.gather.nxv2f64.nxv2p0(<vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 %evl)
1914 ret <vscale x 2 x double> %v
1917 declare <vscale x 4 x double> @llvm.vp.gather.nxv4f64.nxv4p0(<vscale x 4 x ptr>, <vscale x 4 x i1>, i32)
1919 define <vscale x 4 x double> @vpgather_nxv4f64(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1920 ; RV32-LABEL: vpgather_nxv4f64:
1922 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1923 ; RV32-NEXT: vluxei32.v v12, (zero), v8, v0.t
1924 ; RV32-NEXT: vmv.v.v v8, v12
1927 ; RV64-LABEL: vpgather_nxv4f64:
1929 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1930 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
1932 %v = call <vscale x 4 x double> @llvm.vp.gather.nxv4f64.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> %m, i32 %evl)
1933 ret <vscale x 4 x double> %v
1936 define <vscale x 4 x double> @vpgather_truemask_nxv4f64(<vscale x 4 x ptr> %ptrs, i32 zeroext %evl) {
1937 ; RV32-LABEL: vpgather_truemask_nxv4f64:
1939 ; RV32-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1940 ; RV32-NEXT: vluxei32.v v12, (zero), v8
1941 ; RV32-NEXT: vmv.v.v v8, v12
1944 ; RV64-LABEL: vpgather_truemask_nxv4f64:
1946 ; RV64-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1947 ; RV64-NEXT: vluxei64.v v8, (zero), v8
1949 %v = call <vscale x 4 x double> @llvm.vp.gather.nxv4f64.nxv4p0(<vscale x 4 x ptr> %ptrs, <vscale x 4 x i1> splat (i1 1), i32 %evl)
1950 ret <vscale x 4 x double> %v
1953 declare <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr>, <vscale x 6 x i1>, i32)
1955 define <vscale x 6 x double> @vpgather_nxv6f64(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1956 ; RV32-LABEL: vpgather_nxv6f64:
1958 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1959 ; RV32-NEXT: vluxei32.v v16, (zero), v8, v0.t
1960 ; RV32-NEXT: vmv.v.v v8, v16
1963 ; RV64-LABEL: vpgather_nxv6f64:
1965 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1966 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
1968 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1969 ret <vscale x 6 x double> %v
1972 define <vscale x 6 x double> @vpgather_baseidx_nxv6i8_nxv6f64(ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1973 ; RV32-LABEL: vpgather_baseidx_nxv6i8_nxv6f64:
1975 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1976 ; RV32-NEXT: vsext.vf4 v12, v8
1977 ; RV32-NEXT: vsll.vi v16, v12, 3
1978 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1979 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
1982 ; RV64-LABEL: vpgather_baseidx_nxv6i8_nxv6f64:
1984 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
1985 ; RV64-NEXT: vsext.vf8 v16, v8
1986 ; RV64-NEXT: vsll.vi v8, v16, 3
1987 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1988 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
1990 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i8> %idxs
1991 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
1992 ret <vscale x 6 x double> %v
1995 define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i8_nxv6f64(ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
1996 ; RV32-LABEL: vpgather_baseidx_sext_nxv6i8_nxv6f64:
1998 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1999 ; RV32-NEXT: vsext.vf4 v12, v8
2000 ; RV32-NEXT: vsll.vi v16, v12, 3
2001 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2002 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2005 ; RV64-LABEL: vpgather_baseidx_sext_nxv6i8_nxv6f64:
2007 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2008 ; RV64-NEXT: vsext.vf8 v16, v8
2009 ; RV64-NEXT: vsll.vi v8, v16, 3
2010 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2011 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2013 %eidxs = sext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
2014 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
2015 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2016 ret <vscale x 6 x double> %v
2019 define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i8_nxv6f64(ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2020 ; RV32-LABEL: vpgather_baseidx_zext_nxv6i8_nxv6f64:
2022 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
2023 ; RV32-NEXT: vzext.vf2 v10, v8
2024 ; RV32-NEXT: vsll.vi v16, v10, 3
2025 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2026 ; RV32-NEXT: vluxei16.v v8, (a0), v16, v0.t
2029 ; RV64-LABEL: vpgather_baseidx_zext_nxv6i8_nxv6f64:
2031 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
2032 ; RV64-NEXT: vzext.vf2 v10, v8
2033 ; RV64-NEXT: vsll.vi v16, v10, 3
2034 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2035 ; RV64-NEXT: vluxei16.v v8, (a0), v16, v0.t
2037 %eidxs = zext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
2038 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
2039 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2040 ret <vscale x 6 x double> %v
2043 define <vscale x 6 x double> @vpgather_baseidx_nxv6i16_nxv6f64(ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2044 ; RV32-LABEL: vpgather_baseidx_nxv6i16_nxv6f64:
2046 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2047 ; RV32-NEXT: vsext.vf2 v12, v8
2048 ; RV32-NEXT: vsll.vi v16, v12, 3
2049 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2050 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2053 ; RV64-LABEL: vpgather_baseidx_nxv6i16_nxv6f64:
2055 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2056 ; RV64-NEXT: vsext.vf4 v16, v8
2057 ; RV64-NEXT: vsll.vi v8, v16, 3
2058 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2059 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2061 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i16> %idxs
2062 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2063 ret <vscale x 6 x double> %v
2066 define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i16_nxv6f64(ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2067 ; RV32-LABEL: vpgather_baseidx_sext_nxv6i16_nxv6f64:
2069 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2070 ; RV32-NEXT: vsext.vf2 v12, v8
2071 ; RV32-NEXT: vsll.vi v16, v12, 3
2072 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2073 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2076 ; RV64-LABEL: vpgather_baseidx_sext_nxv6i16_nxv6f64:
2078 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2079 ; RV64-NEXT: vsext.vf4 v16, v8
2080 ; RV64-NEXT: vsll.vi v8, v16, 3
2081 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2082 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2084 %eidxs = sext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
2085 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
2086 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2087 ret <vscale x 6 x double> %v
2090 define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i16_nxv6f64(ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2091 ; RV32-LABEL: vpgather_baseidx_zext_nxv6i16_nxv6f64:
2093 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2094 ; RV32-NEXT: vzext.vf2 v12, v8
2095 ; RV32-NEXT: vsll.vi v16, v12, 3
2096 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2097 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2100 ; RV64-LABEL: vpgather_baseidx_zext_nxv6i16_nxv6f64:
2102 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2103 ; RV64-NEXT: vzext.vf2 v12, v8
2104 ; RV64-NEXT: vsll.vi v16, v12, 3
2105 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2106 ; RV64-NEXT: vluxei32.v v8, (a0), v16, v0.t
2108 %eidxs = zext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
2109 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
2110 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2111 ret <vscale x 6 x double> %v
2114 define <vscale x 6 x double> @vpgather_baseidx_nxv6i32_nxv6f64(ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2115 ; RV32-LABEL: vpgather_baseidx_nxv6i32_nxv6f64:
2117 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2118 ; RV32-NEXT: vsll.vi v16, v8, 3
2119 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2120 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2123 ; RV64-LABEL: vpgather_baseidx_nxv6i32_nxv6f64:
2125 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2126 ; RV64-NEXT: vsext.vf2 v16, v8
2127 ; RV64-NEXT: vsll.vi v8, v16, 3
2128 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2129 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2131 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i32> %idxs
2132 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2133 ret <vscale x 6 x double> %v
2136 define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i32_nxv6f64(ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2137 ; RV32-LABEL: vpgather_baseidx_sext_nxv6i32_nxv6f64:
2139 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2140 ; RV32-NEXT: vsll.vi v16, v8, 3
2141 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2142 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2145 ; RV64-LABEL: vpgather_baseidx_sext_nxv6i32_nxv6f64:
2147 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2148 ; RV64-NEXT: vsext.vf2 v16, v8
2149 ; RV64-NEXT: vsll.vi v8, v16, 3
2150 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2151 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2153 %eidxs = sext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
2154 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
2155 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2156 ret <vscale x 6 x double> %v
2159 define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i32_nxv6f64(ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2160 ; RV32-LABEL: vpgather_baseidx_zext_nxv6i32_nxv6f64:
2162 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2163 ; RV32-NEXT: vsll.vi v16, v8, 3
2164 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2165 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2168 ; RV64-LABEL: vpgather_baseidx_zext_nxv6i32_nxv6f64:
2170 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2171 ; RV64-NEXT: vzext.vf2 v16, v8
2172 ; RV64-NEXT: vsll.vi v8, v16, 3
2173 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2174 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2176 %eidxs = zext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
2177 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %eidxs
2178 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2179 ret <vscale x 6 x double> %v
2182 define <vscale x 6 x double> @vpgather_baseidx_nxv6f64(ptr %base, <vscale x 6 x i64> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
2183 ; RV32-LABEL: vpgather_baseidx_nxv6f64:
2185 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2186 ; RV32-NEXT: vnsrl.wi v16, v8, 0
2187 ; RV32-NEXT: vsll.vi v16, v16, 3
2188 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2189 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2192 ; RV64-LABEL: vpgather_baseidx_nxv6f64:
2194 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2195 ; RV64-NEXT: vsll.vi v8, v8, 3
2196 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2197 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2199 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %idxs
2200 %v = call <vscale x 6 x double> @llvm.vp.gather.nxv6f64.nxv6p0(<vscale x 6 x ptr> %ptrs, <vscale x 6 x i1> %m, i32 %evl)
2201 ret <vscale x 6 x double> %v
2204 declare <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr>, <vscale x 8 x i1>, i32)
2206 define <vscale x 8 x double> @vpgather_nxv8f64(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2207 ; RV32-LABEL: vpgather_nxv8f64:
2209 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma
2210 ; RV32-NEXT: vluxei32.v v16, (zero), v8, v0.t
2211 ; RV32-NEXT: vmv.v.v v8, v16
2214 ; RV64-LABEL: vpgather_nxv8f64:
2216 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
2217 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
2219 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2220 ret <vscale x 8 x double> %v
2223 define <vscale x 8 x double> @vpgather_baseidx_nxv8i8_nxv8f64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2224 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8f64:
2226 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2227 ; RV32-NEXT: vsext.vf4 v12, v8
2228 ; RV32-NEXT: vsll.vi v16, v12, 3
2229 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2230 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2233 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8f64:
2235 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2236 ; RV64-NEXT: vsext.vf8 v16, v8
2237 ; RV64-NEXT: vsll.vi v8, v16, 3
2238 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2239 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2241 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i8> %idxs
2242 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2243 ret <vscale x 8 x double> %v
2246 define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i8_nxv8f64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2247 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f64:
2249 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2250 ; RV32-NEXT: vsext.vf4 v12, v8
2251 ; RV32-NEXT: vsll.vi v16, v12, 3
2252 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2253 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2256 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f64:
2258 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2259 ; RV64-NEXT: vsext.vf8 v16, v8
2260 ; RV64-NEXT: vsll.vi v8, v16, 3
2261 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2262 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2264 %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
2265 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
2266 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2267 ret <vscale x 8 x double> %v
2270 define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i8_nxv8f64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2271 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f64:
2273 ; RV32-NEXT: vsetvli a2, zero, e16, m2, ta, ma
2274 ; RV32-NEXT: vzext.vf2 v10, v8
2275 ; RV32-NEXT: vsll.vi v16, v10, 3
2276 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2277 ; RV32-NEXT: vluxei16.v v8, (a0), v16, v0.t
2280 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f64:
2282 ; RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
2283 ; RV64-NEXT: vzext.vf2 v10, v8
2284 ; RV64-NEXT: vsll.vi v16, v10, 3
2285 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2286 ; RV64-NEXT: vluxei16.v v8, (a0), v16, v0.t
2288 %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
2289 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
2290 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2291 ret <vscale x 8 x double> %v
2294 define <vscale x 8 x double> @vpgather_baseidx_nxv8i16_nxv8f64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2295 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8f64:
2297 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2298 ; RV32-NEXT: vsext.vf2 v12, v8
2299 ; RV32-NEXT: vsll.vi v16, v12, 3
2300 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2301 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2304 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8f64:
2306 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2307 ; RV64-NEXT: vsext.vf4 v16, v8
2308 ; RV64-NEXT: vsll.vi v8, v16, 3
2309 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2310 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2312 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i16> %idxs
2313 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2314 ret <vscale x 8 x double> %v
2317 define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i16_nxv8f64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2318 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f64:
2320 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2321 ; RV32-NEXT: vsext.vf2 v12, v8
2322 ; RV32-NEXT: vsll.vi v16, v12, 3
2323 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2324 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2327 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f64:
2329 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2330 ; RV64-NEXT: vsext.vf4 v16, v8
2331 ; RV64-NEXT: vsll.vi v8, v16, 3
2332 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2333 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2335 %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
2336 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
2337 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2338 ret <vscale x 8 x double> %v
2341 define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i16_nxv8f64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2342 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f64:
2344 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2345 ; RV32-NEXT: vzext.vf2 v12, v8
2346 ; RV32-NEXT: vsll.vi v16, v12, 3
2347 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2348 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2351 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f64:
2353 ; RV64-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2354 ; RV64-NEXT: vzext.vf2 v12, v8
2355 ; RV64-NEXT: vsll.vi v16, v12, 3
2356 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2357 ; RV64-NEXT: vluxei32.v v8, (a0), v16, v0.t
2359 %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
2360 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
2361 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2362 ret <vscale x 8 x double> %v
2365 define <vscale x 8 x double> @vpgather_baseidx_nxv8i32_nxv8f64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2366 ; RV32-LABEL: vpgather_baseidx_nxv8i32_nxv8f64:
2368 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2369 ; RV32-NEXT: vsll.vi v16, v8, 3
2370 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2371 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2374 ; RV64-LABEL: vpgather_baseidx_nxv8i32_nxv8f64:
2376 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2377 ; RV64-NEXT: vsext.vf2 v16, v8
2378 ; RV64-NEXT: vsll.vi v8, v16, 3
2379 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2380 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2382 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i32> %idxs
2383 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2384 ret <vscale x 8 x double> %v
2387 define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i32_nxv8f64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2388 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8f64:
2390 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2391 ; RV32-NEXT: vsll.vi v16, v8, 3
2392 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2393 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2396 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8f64:
2398 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2399 ; RV64-NEXT: vsext.vf2 v16, v8
2400 ; RV64-NEXT: vsll.vi v8, v16, 3
2401 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2402 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2404 %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
2405 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
2406 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2407 ret <vscale x 8 x double> %v
2410 define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i32_nxv8f64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2411 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8f64:
2413 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2414 ; RV32-NEXT: vsll.vi v16, v8, 3
2415 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2416 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2419 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8f64:
2421 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2422 ; RV64-NEXT: vzext.vf2 v16, v8
2423 ; RV64-NEXT: vsll.vi v8, v16, 3
2424 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2425 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2427 %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
2428 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %eidxs
2429 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2430 ret <vscale x 8 x double> %v
2433 define <vscale x 8 x double> @vpgather_baseidx_nxv8f64(ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2434 ; RV32-LABEL: vpgather_baseidx_nxv8f64:
2436 ; RV32-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2437 ; RV32-NEXT: vnsrl.wi v16, v8, 0
2438 ; RV32-NEXT: vsll.vi v16, v16, 3
2439 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2440 ; RV32-NEXT: vluxei32.v v8, (a0), v16, v0.t
2443 ; RV64-LABEL: vpgather_baseidx_nxv8f64:
2445 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2446 ; RV64-NEXT: vsll.vi v8, v8, 3
2447 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2448 ; RV64-NEXT: vluxei64.v v8, (a0), v8, v0.t
2450 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %idxs
2451 %v = call <vscale x 8 x double> @llvm.vp.gather.nxv8f64.nxv8p0(<vscale x 8 x ptr> %ptrs, <vscale x 8 x i1> %m, i32 %evl)
2452 ret <vscale x 8 x double> %v
2455 declare <vscale x 16 x double> @llvm.vp.gather.nxv16f64.nxv16p0(<vscale x 16 x ptr>, <vscale x 16 x i1>, i32)
2457 define <vscale x 16 x double> @vpgather_nxv16f64(<vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2458 ; RV32-LABEL: vpgather_nxv16f64:
2460 ; RV32-NEXT: vmv1r.v v24, v0
2461 ; RV32-NEXT: csrr a1, vlenb
2462 ; RV32-NEXT: sub a2, a0, a1
2463 ; RV32-NEXT: srli a3, a1, 3
2464 ; RV32-NEXT: vsetvli a4, zero, e8, mf4, ta, ma
2465 ; RV32-NEXT: vslidedown.vx v0, v0, a3
2466 ; RV32-NEXT: sltu a3, a0, a2
2467 ; RV32-NEXT: addi a3, a3, -1
2468 ; RV32-NEXT: and a2, a3, a2
2469 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2470 ; RV32-NEXT: vluxei32.v v16, (zero), v12, v0.t
2471 ; RV32-NEXT: bltu a0, a1, .LBB111_2
2472 ; RV32-NEXT: # %bb.1:
2473 ; RV32-NEXT: mv a0, a1
2474 ; RV32-NEXT: .LBB111_2:
2475 ; RV32-NEXT: vmv1r.v v0, v24
2476 ; RV32-NEXT: vsetvli zero, a0, e64, m8, ta, ma
2477 ; RV32-NEXT: vluxei32.v v24, (zero), v8, v0.t
2478 ; RV32-NEXT: vmv.v.v v8, v24
2481 ; RV64-LABEL: vpgather_nxv16f64:
2483 ; RV64-NEXT: vmv1r.v v24, v0
2484 ; RV64-NEXT: csrr a1, vlenb
2485 ; RV64-NEXT: sub a2, a0, a1
2486 ; RV64-NEXT: srli a3, a1, 3
2487 ; RV64-NEXT: vsetvli a4, zero, e8, mf4, ta, ma
2488 ; RV64-NEXT: vslidedown.vx v0, v0, a3
2489 ; RV64-NEXT: sltu a3, a0, a2
2490 ; RV64-NEXT: addi a3, a3, -1
2491 ; RV64-NEXT: and a2, a3, a2
2492 ; RV64-NEXT: vsetvli zero, a2, e64, m8, ta, ma
2493 ; RV64-NEXT: vluxei64.v v16, (zero), v16, v0.t
2494 ; RV64-NEXT: bltu a0, a1, .LBB111_2
2495 ; RV64-NEXT: # %bb.1:
2496 ; RV64-NEXT: mv a0, a1
2497 ; RV64-NEXT: .LBB111_2:
2498 ; RV64-NEXT: vmv1r.v v0, v24
2499 ; RV64-NEXT: vsetvli zero, a0, e64, m8, ta, ma
2500 ; RV64-NEXT: vluxei64.v v8, (zero), v8, v0.t
2502 %v = call <vscale x 16 x double> @llvm.vp.gather.nxv16f64.nxv16p0(<vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)
2503 ret <vscale x 16 x double> %v
2506 define <vscale x 16 x double> @vpgather_baseidx_nxv16i16_nxv16f64(ptr %base, <vscale x 16 x i16> %idxs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2507 ; RV32-LABEL: vpgather_baseidx_nxv16i16_nxv16f64:
2509 ; RV32-NEXT: vmv1r.v v12, v0
2510 ; RV32-NEXT: vsetvli a2, zero, e32, m8, ta, ma
2511 ; RV32-NEXT: vsext.vf2 v16, v8
2512 ; RV32-NEXT: csrr a2, vlenb
2513 ; RV32-NEXT: vsll.vi v24, v16, 3
2514 ; RV32-NEXT: sub a3, a1, a2
2515 ; RV32-NEXT: srli a4, a2, 3
2516 ; RV32-NEXT: vsetvli a5, zero, e8, mf4, ta, ma
2517 ; RV32-NEXT: vslidedown.vx v0, v0, a4
2518 ; RV32-NEXT: sltu a4, a1, a3
2519 ; RV32-NEXT: addi a4, a4, -1
2520 ; RV32-NEXT: and a3, a4, a3
2521 ; RV32-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2522 ; RV32-NEXT: vluxei32.v v16, (a0), v28, v0.t
2523 ; RV32-NEXT: bltu a1, a2, .LBB112_2
2524 ; RV32-NEXT: # %bb.1:
2525 ; RV32-NEXT: mv a1, a2
2526 ; RV32-NEXT: .LBB112_2:
2527 ; RV32-NEXT: vmv1r.v v0, v12
2528 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2529 ; RV32-NEXT: vluxei32.v v8, (a0), v24, v0.t
2532 ; RV64-LABEL: vpgather_baseidx_nxv16i16_nxv16f64:
2534 ; RV64-NEXT: vmv1r.v v12, v0
2535 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2536 ; RV64-NEXT: vsext.vf4 v16, v10
2537 ; RV64-NEXT: csrr a2, vlenb
2538 ; RV64-NEXT: vsll.vi v16, v16, 3
2539 ; RV64-NEXT: sub a3, a1, a2
2540 ; RV64-NEXT: srli a4, a2, 3
2541 ; RV64-NEXT: vsetvli a5, zero, e8, mf4, ta, ma
2542 ; RV64-NEXT: vslidedown.vx v0, v0, a4
2543 ; RV64-NEXT: sltu a4, a1, a3
2544 ; RV64-NEXT: addi a4, a4, -1
2545 ; RV64-NEXT: and a3, a4, a3
2546 ; RV64-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2547 ; RV64-NEXT: vluxei64.v v16, (a0), v16, v0.t
2548 ; RV64-NEXT: vsetvli a3, zero, e64, m8, ta, ma
2549 ; RV64-NEXT: vsext.vf4 v24, v8
2550 ; RV64-NEXT: vsll.vi v24, v24, 3
2551 ; RV64-NEXT: bltu a1, a2, .LBB112_2
2552 ; RV64-NEXT: # %bb.1:
2553 ; RV64-NEXT: mv a1, a2
2554 ; RV64-NEXT: .LBB112_2:
2555 ; RV64-NEXT: vmv1r.v v0, v12
2556 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2557 ; RV64-NEXT: vluxei64.v v8, (a0), v24, v0.t
2559 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 16 x i16> %idxs
2560 %v = call <vscale x 16 x double> @llvm.vp.gather.nxv16f64.nxv16p0(<vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)
2561 ret <vscale x 16 x double> %v
2564 define <vscale x 16 x double> @vpgather_baseidx_sext_nxv16i16_nxv16f64(ptr %base, <vscale x 16 x i16> %idxs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2565 ; RV32-LABEL: vpgather_baseidx_sext_nxv16i16_nxv16f64:
2567 ; RV32-NEXT: vmv1r.v v12, v0
2568 ; RV32-NEXT: vsetvli a2, zero, e32, m8, ta, ma
2569 ; RV32-NEXT: vsext.vf2 v16, v8
2570 ; RV32-NEXT: csrr a2, vlenb
2571 ; RV32-NEXT: vsll.vi v24, v16, 3
2572 ; RV32-NEXT: sub a3, a1, a2
2573 ; RV32-NEXT: srli a4, a2, 3
2574 ; RV32-NEXT: vsetvli a5, zero, e8, mf4, ta, ma
2575 ; RV32-NEXT: vslidedown.vx v0, v0, a4
2576 ; RV32-NEXT: sltu a4, a1, a3
2577 ; RV32-NEXT: addi a4, a4, -1
2578 ; RV32-NEXT: and a3, a4, a3
2579 ; RV32-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2580 ; RV32-NEXT: vluxei32.v v16, (a0), v28, v0.t
2581 ; RV32-NEXT: bltu a1, a2, .LBB113_2
2582 ; RV32-NEXT: # %bb.1:
2583 ; RV32-NEXT: mv a1, a2
2584 ; RV32-NEXT: .LBB113_2:
2585 ; RV32-NEXT: vmv1r.v v0, v12
2586 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2587 ; RV32-NEXT: vluxei32.v v8, (a0), v24, v0.t
2590 ; RV64-LABEL: vpgather_baseidx_sext_nxv16i16_nxv16f64:
2592 ; RV64-NEXT: vmv1r.v v12, v0
2593 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
2594 ; RV64-NEXT: vsext.vf4 v16, v10
2595 ; RV64-NEXT: csrr a2, vlenb
2596 ; RV64-NEXT: vsll.vi v16, v16, 3
2597 ; RV64-NEXT: sub a3, a1, a2
2598 ; RV64-NEXT: srli a4, a2, 3
2599 ; RV64-NEXT: vsetvli a5, zero, e8, mf4, ta, ma
2600 ; RV64-NEXT: vslidedown.vx v0, v0, a4
2601 ; RV64-NEXT: sltu a4, a1, a3
2602 ; RV64-NEXT: addi a4, a4, -1
2603 ; RV64-NEXT: and a3, a4, a3
2604 ; RV64-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2605 ; RV64-NEXT: vluxei64.v v16, (a0), v16, v0.t
2606 ; RV64-NEXT: vsetvli a3, zero, e64, m8, ta, ma
2607 ; RV64-NEXT: vsext.vf4 v24, v8
2608 ; RV64-NEXT: vsll.vi v24, v24, 3
2609 ; RV64-NEXT: bltu a1, a2, .LBB113_2
2610 ; RV64-NEXT: # %bb.1:
2611 ; RV64-NEXT: mv a1, a2
2612 ; RV64-NEXT: .LBB113_2:
2613 ; RV64-NEXT: vmv1r.v v0, v12
2614 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2615 ; RV64-NEXT: vluxei64.v v8, (a0), v24, v0.t
2617 %eidxs = sext <vscale x 16 x i16> %idxs to <vscale x 16 x i64>
2618 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 16 x i64> %eidxs
2619 %v = call <vscale x 16 x double> @llvm.vp.gather.nxv16f64.nxv16p0(<vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)
2620 ret <vscale x 16 x double> %v
2623 define <vscale x 16 x double> @vpgather_baseidx_zext_nxv16i16_nxv16f64(ptr %base, <vscale x 16 x i16> %idxs, <vscale x 16 x i1> %m, i32 zeroext %evl) {
2624 ; RV32-LABEL: vpgather_baseidx_zext_nxv16i16_nxv16f64:
2626 ; RV32-NEXT: vmv1r.v v12, v0
2627 ; RV32-NEXT: vsetvli a2, zero, e32, m8, ta, ma
2628 ; RV32-NEXT: vzext.vf2 v16, v8
2629 ; RV32-NEXT: csrr a2, vlenb
2630 ; RV32-NEXT: vsll.vi v24, v16, 3
2631 ; RV32-NEXT: sub a3, a1, a2
2632 ; RV32-NEXT: srli a4, a2, 3
2633 ; RV32-NEXT: vsetvli a5, zero, e8, mf4, ta, ma
2634 ; RV32-NEXT: vslidedown.vx v0, v0, a4
2635 ; RV32-NEXT: sltu a4, a1, a3
2636 ; RV32-NEXT: addi a4, a4, -1
2637 ; RV32-NEXT: and a3, a4, a3
2638 ; RV32-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2639 ; RV32-NEXT: vluxei32.v v16, (a0), v28, v0.t
2640 ; RV32-NEXT: bltu a1, a2, .LBB114_2
2641 ; RV32-NEXT: # %bb.1:
2642 ; RV32-NEXT: mv a1, a2
2643 ; RV32-NEXT: .LBB114_2:
2644 ; RV32-NEXT: vmv1r.v v0, v12
2645 ; RV32-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2646 ; RV32-NEXT: vluxei32.v v8, (a0), v24, v0.t
2649 ; RV64-LABEL: vpgather_baseidx_zext_nxv16i16_nxv16f64:
2651 ; RV64-NEXT: vmv1r.v v12, v0
2652 ; RV64-NEXT: vsetvli a2, zero, e32, m8, ta, ma
2653 ; RV64-NEXT: vzext.vf2 v16, v8
2654 ; RV64-NEXT: csrr a2, vlenb
2655 ; RV64-NEXT: vsll.vi v24, v16, 3
2656 ; RV64-NEXT: sub a3, a1, a2
2657 ; RV64-NEXT: srli a4, a2, 3
2658 ; RV64-NEXT: vsetvli a5, zero, e8, mf4, ta, ma
2659 ; RV64-NEXT: vslidedown.vx v0, v0, a4
2660 ; RV64-NEXT: sltu a4, a1, a3
2661 ; RV64-NEXT: addi a4, a4, -1
2662 ; RV64-NEXT: and a3, a4, a3
2663 ; RV64-NEXT: vsetvli zero, a3, e64, m8, ta, ma
2664 ; RV64-NEXT: vluxei32.v v16, (a0), v28, v0.t
2665 ; RV64-NEXT: bltu a1, a2, .LBB114_2
2666 ; RV64-NEXT: # %bb.1:
2667 ; RV64-NEXT: mv a1, a2
2668 ; RV64-NEXT: .LBB114_2:
2669 ; RV64-NEXT: vmv1r.v v0, v12
2670 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
2671 ; RV64-NEXT: vluxei32.v v8, (a0), v24, v0.t
2673 %eidxs = zext <vscale x 16 x i16> %idxs to <vscale x 16 x i64>
2674 %ptrs = getelementptr inbounds double, ptr %base, <vscale x 16 x i64> %eidxs
2675 %v = call <vscale x 16 x double> @llvm.vp.gather.nxv16f64.nxv16p0(<vscale x 16 x ptr> %ptrs, <vscale x 16 x i1> %m, i32 %evl)
2676 ret <vscale x 16 x double> %v