1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple riscv32 -mattr=+m,+f,+d,+v,+zfh,+zvfh < %s | FileCheck %s
3 ; RUN: llc -mtriple riscv64 -mattr=+m,+f,+d,+v,+zfh,+zvfh < %s | FileCheck %s
5 ; Tests assume VLEN=128 or vscale_range_min=2.
7 declare <vscale x 1 x i1> @llvm.experimental.vector.splice.nxv1i1(<vscale x 1 x i1>, <vscale x 1 x i1>, i32)
9 define <vscale x 1 x i1> @splice_nxv1i1_offset_negone(<vscale x 1 x i1> %a, <vscale x 1 x i1> %b) #0 {
10 ; CHECK-LABEL: splice_nxv1i1_offset_negone:
12 ; CHECK-NEXT: vmv1r.v v9, v0
13 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
14 ; CHECK-NEXT: vmv.v.i v10, 0
15 ; CHECK-NEXT: vmv1r.v v0, v8
16 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
17 ; CHECK-NEXT: vmv1r.v v0, v9
18 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
19 ; CHECK-NEXT: csrr a0, vlenb
20 ; CHECK-NEXT: srli a0, a0, 3
21 ; CHECK-NEXT: addi a0, a0, -1
22 ; CHECK-NEXT: vslidedown.vx v9, v9, a0
23 ; CHECK-NEXT: vslideup.vi v9, v8, 1
24 ; CHECK-NEXT: vand.vi v8, v9, 1
25 ; CHECK-NEXT: vmsne.vi v0, v8, 0
27 %res = call <vscale x 1 x i1> @llvm.experimental.vector.splice.nxv1i1(<vscale x 1 x i1> %a, <vscale x 1 x i1> %b, i32 -1)
28 ret <vscale x 1 x i1> %res
31 define <vscale x 1 x i1> @splice_nxv1i1_offset_max(<vscale x 1 x i1> %a, <vscale x 1 x i1> %b) #0 {
32 ; CHECK-LABEL: splice_nxv1i1_offset_max:
34 ; CHECK-NEXT: vmv1r.v v9, v0
35 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
36 ; CHECK-NEXT: vmv.v.i v10, 0
37 ; CHECK-NEXT: vmv1r.v v0, v8
38 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
39 ; CHECK-NEXT: vmv1r.v v0, v9
40 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
41 ; CHECK-NEXT: csrr a0, vlenb
42 ; CHECK-NEXT: srli a0, a0, 3
43 ; CHECK-NEXT: addi a0, a0, -1
44 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
45 ; CHECK-NEXT: vslidedown.vi v9, v9, 1
46 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
47 ; CHECK-NEXT: vslideup.vx v9, v8, a0
48 ; CHECK-NEXT: vand.vi v8, v9, 1
49 ; CHECK-NEXT: vmsne.vi v0, v8, 0
51 %res = call <vscale x 1 x i1> @llvm.experimental.vector.splice.nxv1i1(<vscale x 1 x i1> %a, <vscale x 1 x i1> %b, i32 1)
52 ret <vscale x 1 x i1> %res
55 declare <vscale x 2 x i1> @llvm.experimental.vector.splice.nxv2i1(<vscale x 2 x i1>, <vscale x 2 x i1>, i32)
57 define <vscale x 2 x i1> @splice_nxv2i1_offset_negone(<vscale x 2 x i1> %a, <vscale x 2 x i1> %b) #0 {
58 ; CHECK-LABEL: splice_nxv2i1_offset_negone:
60 ; CHECK-NEXT: vmv1r.v v9, v0
61 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
62 ; CHECK-NEXT: vmv.v.i v10, 0
63 ; CHECK-NEXT: vmv1r.v v0, v8
64 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
65 ; CHECK-NEXT: vmv1r.v v0, v9
66 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
67 ; CHECK-NEXT: csrr a0, vlenb
68 ; CHECK-NEXT: srli a0, a0, 2
69 ; CHECK-NEXT: addi a0, a0, -1
70 ; CHECK-NEXT: vslidedown.vx v9, v9, a0
71 ; CHECK-NEXT: vslideup.vi v9, v8, 1
72 ; CHECK-NEXT: vand.vi v8, v9, 1
73 ; CHECK-NEXT: vmsne.vi v0, v8, 0
75 %res = call <vscale x 2 x i1> @llvm.experimental.vector.splice.nxv2i1(<vscale x 2 x i1> %a, <vscale x 2 x i1> %b, i32 -1)
76 ret <vscale x 2 x i1> %res
79 define <vscale x 2 x i1> @splice_nxv2i1_offset_max(<vscale x 2 x i1> %a, <vscale x 2 x i1> %b) #0 {
80 ; CHECK-LABEL: splice_nxv2i1_offset_max:
82 ; CHECK-NEXT: vmv1r.v v9, v0
83 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
84 ; CHECK-NEXT: vmv.v.i v10, 0
85 ; CHECK-NEXT: vmv1r.v v0, v8
86 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
87 ; CHECK-NEXT: vmv1r.v v0, v9
88 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
89 ; CHECK-NEXT: csrr a0, vlenb
90 ; CHECK-NEXT: srli a0, a0, 2
91 ; CHECK-NEXT: addi a0, a0, -3
92 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
93 ; CHECK-NEXT: vslidedown.vi v9, v9, 3
94 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
95 ; CHECK-NEXT: vslideup.vx v9, v8, a0
96 ; CHECK-NEXT: vand.vi v8, v9, 1
97 ; CHECK-NEXT: vmsne.vi v0, v8, 0
99 %res = call <vscale x 2 x i1> @llvm.experimental.vector.splice.nxv2i1(<vscale x 2 x i1> %a, <vscale x 2 x i1> %b, i32 3)
100 ret <vscale x 2 x i1> %res
103 declare <vscale x 4 x i1> @llvm.experimental.vector.splice.nxv4i1(<vscale x 4 x i1>, <vscale x 4 x i1>, i32)
105 define <vscale x 4 x i1> @splice_nxv4i1_offset_negone(<vscale x 4 x i1> %a, <vscale x 4 x i1> %b) #0 {
106 ; CHECK-LABEL: splice_nxv4i1_offset_negone:
108 ; CHECK-NEXT: vmv1r.v v9, v0
109 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
110 ; CHECK-NEXT: vmv.v.i v10, 0
111 ; CHECK-NEXT: vmv1r.v v0, v8
112 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
113 ; CHECK-NEXT: vmv1r.v v0, v9
114 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
115 ; CHECK-NEXT: csrr a0, vlenb
116 ; CHECK-NEXT: srli a0, a0, 1
117 ; CHECK-NEXT: addi a0, a0, -1
118 ; CHECK-NEXT: vslidedown.vx v9, v9, a0
119 ; CHECK-NEXT: vslideup.vi v9, v8, 1
120 ; CHECK-NEXT: vand.vi v8, v9, 1
121 ; CHECK-NEXT: vmsne.vi v0, v8, 0
123 %res = call <vscale x 4 x i1> @llvm.experimental.vector.splice.nxv4i1(<vscale x 4 x i1> %a, <vscale x 4 x i1> %b, i32 -1)
124 ret <vscale x 4 x i1> %res
127 define <vscale x 4 x i1> @splice_nxv4i1_offset_max(<vscale x 4 x i1> %a, <vscale x 4 x i1> %b) #0 {
128 ; CHECK-LABEL: splice_nxv4i1_offset_max:
130 ; CHECK-NEXT: vmv1r.v v9, v0
131 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
132 ; CHECK-NEXT: vmv.v.i v10, 0
133 ; CHECK-NEXT: vmv1r.v v0, v8
134 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
135 ; CHECK-NEXT: vmv1r.v v0, v9
136 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
137 ; CHECK-NEXT: csrr a0, vlenb
138 ; CHECK-NEXT: srli a0, a0, 1
139 ; CHECK-NEXT: addi a0, a0, -7
140 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
141 ; CHECK-NEXT: vslidedown.vi v9, v9, 7
142 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
143 ; CHECK-NEXT: vslideup.vx v9, v8, a0
144 ; CHECK-NEXT: vand.vi v8, v9, 1
145 ; CHECK-NEXT: vmsne.vi v0, v8, 0
147 %res = call <vscale x 4 x i1> @llvm.experimental.vector.splice.nxv4i1(<vscale x 4 x i1> %a, <vscale x 4 x i1> %b, i32 7)
148 ret <vscale x 4 x i1> %res
151 declare <vscale x 8 x i1> @llvm.experimental.vector.splice.nxv8i1(<vscale x 8 x i1>, <vscale x 8 x i1>, i32)
153 define <vscale x 8 x i1> @splice_nxv8i1_offset_negone(<vscale x 8 x i1> %a, <vscale x 8 x i1> %b) #0 {
154 ; CHECK-LABEL: splice_nxv8i1_offset_negone:
156 ; CHECK-NEXT: vmv1r.v v9, v0
157 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
158 ; CHECK-NEXT: vmv.v.i v10, 0
159 ; CHECK-NEXT: vmv1r.v v0, v8
160 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
161 ; CHECK-NEXT: vmv1r.v v0, v9
162 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
163 ; CHECK-NEXT: csrr a0, vlenb
164 ; CHECK-NEXT: addi a0, a0, -1
165 ; CHECK-NEXT: vslidedown.vx v9, v9, a0
166 ; CHECK-NEXT: vslideup.vi v9, v8, 1
167 ; CHECK-NEXT: vand.vi v8, v9, 1
168 ; CHECK-NEXT: vmsne.vi v0, v8, 0
170 %res = call <vscale x 8 x i1> @llvm.experimental.vector.splice.nxv8i1(<vscale x 8 x i1> %a, <vscale x 8 x i1> %b, i32 -1)
171 ret <vscale x 8 x i1> %res
174 define <vscale x 8 x i1> @splice_nxv8i1_offset_max(<vscale x 8 x i1> %a, <vscale x 8 x i1> %b) #0 {
175 ; CHECK-LABEL: splice_nxv8i1_offset_max:
177 ; CHECK-NEXT: vmv1r.v v9, v0
178 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
179 ; CHECK-NEXT: vmv.v.i v10, 0
180 ; CHECK-NEXT: vmv1r.v v0, v8
181 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
182 ; CHECK-NEXT: vmv1r.v v0, v9
183 ; CHECK-NEXT: vmerge.vim v9, v10, 1, v0
184 ; CHECK-NEXT: csrr a0, vlenb
185 ; CHECK-NEXT: addi a0, a0, -15
186 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
187 ; CHECK-NEXT: vslidedown.vi v9, v9, 15
188 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
189 ; CHECK-NEXT: vslideup.vx v9, v8, a0
190 ; CHECK-NEXT: vand.vi v8, v9, 1
191 ; CHECK-NEXT: vmsne.vi v0, v8, 0
193 %res = call <vscale x 8 x i1> @llvm.experimental.vector.splice.nxv8i1(<vscale x 8 x i1> %a, <vscale x 8 x i1> %b, i32 15)
194 ret <vscale x 8 x i1> %res
197 declare <vscale x 16 x i1> @llvm.experimental.vector.splice.nxv16i1(<vscale x 16 x i1>, <vscale x 16 x i1>, i32)
199 define <vscale x 16 x i1> @splice_nxv16i1_offset_negone(<vscale x 16 x i1> %a, <vscale x 16 x i1> %b) #0 {
200 ; CHECK-LABEL: splice_nxv16i1_offset_negone:
202 ; CHECK-NEXT: vmv1r.v v9, v0
203 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
204 ; CHECK-NEXT: vmv.v.i v10, 0
205 ; CHECK-NEXT: vmv1r.v v0, v8
206 ; CHECK-NEXT: vmerge.vim v12, v10, 1, v0
207 ; CHECK-NEXT: vmv1r.v v0, v9
208 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
209 ; CHECK-NEXT: csrr a0, vlenb
210 ; CHECK-NEXT: slli a0, a0, 1
211 ; CHECK-NEXT: addi a0, a0, -1
212 ; CHECK-NEXT: vsetivli zero, 1, e8, m2, ta, ma
213 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
214 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
215 ; CHECK-NEXT: vslideup.vi v8, v12, 1
216 ; CHECK-NEXT: vand.vi v8, v8, 1
217 ; CHECK-NEXT: vmsne.vi v0, v8, 0
219 %res = call <vscale x 16 x i1> @llvm.experimental.vector.splice.nxv16i1(<vscale x 16 x i1> %a, <vscale x 16 x i1> %b, i32 -1)
220 ret <vscale x 16 x i1> %res
223 define <vscale x 16 x i1> @splice_nxv16i1_offset_max(<vscale x 16 x i1> %a, <vscale x 16 x i1> %b) #0 {
224 ; CHECK-LABEL: splice_nxv16i1_offset_max:
226 ; CHECK-NEXT: vmv1r.v v9, v0
227 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
228 ; CHECK-NEXT: vmv.v.i v10, 0
229 ; CHECK-NEXT: vmv1r.v v0, v8
230 ; CHECK-NEXT: vmerge.vim v12, v10, 1, v0
231 ; CHECK-NEXT: vmv1r.v v0, v9
232 ; CHECK-NEXT: vmerge.vim v8, v10, 1, v0
233 ; CHECK-NEXT: csrr a0, vlenb
234 ; CHECK-NEXT: slli a0, a0, 1
235 ; CHECK-NEXT: addi a0, a0, -31
236 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
237 ; CHECK-NEXT: vslidedown.vi v8, v8, 31
238 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
239 ; CHECK-NEXT: vslideup.vx v8, v12, a0
240 ; CHECK-NEXT: vand.vi v8, v8, 1
241 ; CHECK-NEXT: vmsne.vi v0, v8, 0
243 %res = call <vscale x 16 x i1> @llvm.experimental.vector.splice.nxv16i1(<vscale x 16 x i1> %a, <vscale x 16 x i1> %b, i32 31)
244 ret <vscale x 16 x i1> %res
247 declare <vscale x 32 x i1> @llvm.experimental.vector.splice.nxv32i1(<vscale x 32 x i1>, <vscale x 32 x i1>, i32)
249 define <vscale x 32 x i1> @splice_nxv32i1_offset_negone(<vscale x 32 x i1> %a, <vscale x 32 x i1> %b) #0 {
250 ; CHECK-LABEL: splice_nxv32i1_offset_negone:
252 ; CHECK-NEXT: vmv1r.v v9, v0
253 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
254 ; CHECK-NEXT: vmv.v.i v12, 0
255 ; CHECK-NEXT: vmv1r.v v0, v8
256 ; CHECK-NEXT: vmerge.vim v16, v12, 1, v0
257 ; CHECK-NEXT: vmv1r.v v0, v9
258 ; CHECK-NEXT: vmerge.vim v8, v12, 1, v0
259 ; CHECK-NEXT: csrr a0, vlenb
260 ; CHECK-NEXT: slli a0, a0, 2
261 ; CHECK-NEXT: addi a0, a0, -1
262 ; CHECK-NEXT: vsetivli zero, 1, e8, m4, ta, ma
263 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
264 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
265 ; CHECK-NEXT: vslideup.vi v8, v16, 1
266 ; CHECK-NEXT: vand.vi v8, v8, 1
267 ; CHECK-NEXT: vmsne.vi v0, v8, 0
269 %res = call <vscale x 32 x i1> @llvm.experimental.vector.splice.nxv32i1(<vscale x 32 x i1> %a, <vscale x 32 x i1> %b, i32 -1)
270 ret <vscale x 32 x i1> %res
273 define <vscale x 32 x i1> @splice_nxv32i1_offset_max(<vscale x 32 x i1> %a, <vscale x 32 x i1> %b) #0 {
274 ; CHECK-LABEL: splice_nxv32i1_offset_max:
276 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
277 ; CHECK-NEXT: vmv.v.i v12, 0
278 ; CHECK-NEXT: vmerge.vim v16, v12, 1, v0
279 ; CHECK-NEXT: csrr a0, vlenb
280 ; CHECK-NEXT: slli a0, a0, 2
281 ; CHECK-NEXT: addi a0, a0, -63
282 ; CHECK-NEXT: li a1, 63
283 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
284 ; CHECK-NEXT: vslidedown.vx v16, v16, a1
285 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
286 ; CHECK-NEXT: vmv1r.v v0, v8
287 ; CHECK-NEXT: vmerge.vim v8, v12, 1, v0
288 ; CHECK-NEXT: vslideup.vx v16, v8, a0
289 ; CHECK-NEXT: vand.vi v8, v16, 1
290 ; CHECK-NEXT: vmsne.vi v0, v8, 0
292 %res = call <vscale x 32 x i1> @llvm.experimental.vector.splice.nxv32i1(<vscale x 32 x i1> %a, <vscale x 32 x i1> %b, i32 63)
293 ret <vscale x 32 x i1> %res
296 declare <vscale x 64 x i1> @llvm.experimental.vector.splice.nxv64i1(<vscale x 64 x i1>, <vscale x 64 x i1>, i32)
298 define <vscale x 64 x i1> @splice_nxv64i1_offset_negone(<vscale x 64 x i1> %a, <vscale x 64 x i1> %b) #0 {
299 ; CHECK-LABEL: splice_nxv64i1_offset_negone:
301 ; CHECK-NEXT: vmv1r.v v9, v0
302 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
303 ; CHECK-NEXT: vmv.v.i v24, 0
304 ; CHECK-NEXT: vmv1r.v v0, v8
305 ; CHECK-NEXT: vmerge.vim v16, v24, 1, v0
306 ; CHECK-NEXT: vmv1r.v v0, v9
307 ; CHECK-NEXT: vmerge.vim v8, v24, 1, v0
308 ; CHECK-NEXT: csrr a0, vlenb
309 ; CHECK-NEXT: slli a0, a0, 3
310 ; CHECK-NEXT: addi a0, a0, -1
311 ; CHECK-NEXT: vsetivli zero, 1, e8, m8, ta, ma
312 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
313 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
314 ; CHECK-NEXT: vslideup.vi v8, v16, 1
315 ; CHECK-NEXT: vand.vi v8, v8, 1
316 ; CHECK-NEXT: vmsne.vi v0, v8, 0
318 %res = call <vscale x 64 x i1> @llvm.experimental.vector.splice.nxv64i1(<vscale x 64 x i1> %a, <vscale x 64 x i1> %b, i32 -1)
319 ret <vscale x 64 x i1> %res
322 define <vscale x 64 x i1> @splice_nxv64i1_offset_max(<vscale x 64 x i1> %a, <vscale x 64 x i1> %b) #0 {
323 ; CHECK-LABEL: splice_nxv64i1_offset_max:
325 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
326 ; CHECK-NEXT: vmv.v.i v16, 0
327 ; CHECK-NEXT: vmerge.vim v24, v16, 1, v0
328 ; CHECK-NEXT: csrr a0, vlenb
329 ; CHECK-NEXT: slli a0, a0, 3
330 ; CHECK-NEXT: addi a0, a0, -127
331 ; CHECK-NEXT: li a1, 127
332 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
333 ; CHECK-NEXT: vslidedown.vx v24, v24, a1
334 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
335 ; CHECK-NEXT: vmv1r.v v0, v8
336 ; CHECK-NEXT: vmerge.vim v8, v16, 1, v0
337 ; CHECK-NEXT: vslideup.vx v24, v8, a0
338 ; CHECK-NEXT: vand.vi v8, v24, 1
339 ; CHECK-NEXT: vmsne.vi v0, v8, 0
341 %res = call <vscale x 64 x i1> @llvm.experimental.vector.splice.nxv64i1(<vscale x 64 x i1> %a, <vscale x 64 x i1> %b, i32 127)
342 ret <vscale x 64 x i1> %res
345 declare <vscale x 1 x i8> @llvm.experimental.vector.splice.nxv1i8(<vscale x 1 x i8>, <vscale x 1 x i8>, i32)
347 define <vscale x 1 x i8> @splice_nxv1i8_offset_zero(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b) #0 {
348 ; CHECK-LABEL: splice_nxv1i8_offset_zero:
351 %res = call <vscale x 1 x i8> @llvm.experimental.vector.splice.nxv1i8(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b, i32 0)
352 ret <vscale x 1 x i8> %res
355 define <vscale x 1 x i8> @splice_nxv1i8_offset_negone(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b) #0 {
356 ; CHECK-LABEL: splice_nxv1i8_offset_negone:
358 ; CHECK-NEXT: csrr a0, vlenb
359 ; CHECK-NEXT: srli a0, a0, 3
360 ; CHECK-NEXT: addi a0, a0, -1
361 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
362 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
363 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
364 ; CHECK-NEXT: vslideup.vi v8, v9, 1
366 %res = call <vscale x 1 x i8> @llvm.experimental.vector.splice.nxv1i8(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b, i32 -1)
367 ret <vscale x 1 x i8> %res
370 define <vscale x 1 x i8> @splice_nxv1i8_offset_min(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b) #0 {
371 ; CHECK-LABEL: splice_nxv1i8_offset_min:
373 ; CHECK-NEXT: csrr a0, vlenb
374 ; CHECK-NEXT: srli a0, a0, 3
375 ; CHECK-NEXT: addi a0, a0, -2
376 ; CHECK-NEXT: vsetivli zero, 2, e8, mf8, ta, ma
377 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
378 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
379 ; CHECK-NEXT: vslideup.vi v8, v9, 2
381 %res = call <vscale x 1 x i8> @llvm.experimental.vector.splice.nxv1i8(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b, i32 -2)
382 ret <vscale x 1 x i8> %res
385 define <vscale x 1 x i8> @splice_nxv1i8_offset_max(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b) #0 {
386 ; CHECK-LABEL: splice_nxv1i8_offset_max:
388 ; CHECK-NEXT: csrr a0, vlenb
389 ; CHECK-NEXT: srli a0, a0, 3
390 ; CHECK-NEXT: addi a0, a0, -1
391 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
392 ; CHECK-NEXT: vslidedown.vi v8, v8, 1
393 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
394 ; CHECK-NEXT: vslideup.vx v8, v9, a0
396 %res = call <vscale x 1 x i8> @llvm.experimental.vector.splice.nxv1i8(<vscale x 1 x i8> %a, <vscale x 1 x i8> %b, i32 1)
397 ret <vscale x 1 x i8> %res
400 declare <vscale x 2 x i8> @llvm.experimental.vector.splice.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i8>, i32)
402 define <vscale x 2 x i8> @splice_nxv2i8_offset_zero(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b) #0 {
403 ; CHECK-LABEL: splice_nxv2i8_offset_zero:
406 %res = call <vscale x 2 x i8> @llvm.experimental.vector.splice.nxv2i8(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b, i32 0)
407 ret <vscale x 2 x i8> %res
410 define <vscale x 2 x i8> @splice_nxv2i8_offset_negone(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b) #0 {
411 ; CHECK-LABEL: splice_nxv2i8_offset_negone:
413 ; CHECK-NEXT: csrr a0, vlenb
414 ; CHECK-NEXT: srli a0, a0, 2
415 ; CHECK-NEXT: addi a0, a0, -1
416 ; CHECK-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
417 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
418 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
419 ; CHECK-NEXT: vslideup.vi v8, v9, 1
421 %res = call <vscale x 2 x i8> @llvm.experimental.vector.splice.nxv2i8(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b, i32 -1)
422 ret <vscale x 2 x i8> %res
425 define <vscale x 2 x i8> @splice_nxv2i8_offset_min(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b) #0 {
426 ; CHECK-LABEL: splice_nxv2i8_offset_min:
428 ; CHECK-NEXT: csrr a0, vlenb
429 ; CHECK-NEXT: srli a0, a0, 2
430 ; CHECK-NEXT: addi a0, a0, -4
431 ; CHECK-NEXT: vsetivli zero, 4, e8, mf4, ta, ma
432 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
433 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
434 ; CHECK-NEXT: vslideup.vi v8, v9, 4
436 %res = call <vscale x 2 x i8> @llvm.experimental.vector.splice.nxv2i8(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b, i32 -4)
437 ret <vscale x 2 x i8> %res
440 define <vscale x 2 x i8> @splice_nxv2i8_offset_max(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b) #0 {
441 ; CHECK-LABEL: splice_nxv2i8_offset_max:
443 ; CHECK-NEXT: csrr a0, vlenb
444 ; CHECK-NEXT: srli a0, a0, 2
445 ; CHECK-NEXT: addi a0, a0, -3
446 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
447 ; CHECK-NEXT: vslidedown.vi v8, v8, 3
448 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
449 ; CHECK-NEXT: vslideup.vx v8, v9, a0
451 %res = call <vscale x 2 x i8> @llvm.experimental.vector.splice.nxv2i8(<vscale x 2 x i8> %a, <vscale x 2 x i8> %b, i32 3)
452 ret <vscale x 2 x i8> %res
455 declare <vscale x 4 x i8> @llvm.experimental.vector.splice.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i8>, i32)
457 define <vscale x 4 x i8> @splice_nxv4i8_offset_zero(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b) #0 {
458 ; CHECK-LABEL: splice_nxv4i8_offset_zero:
461 %res = call <vscale x 4 x i8> @llvm.experimental.vector.splice.nxv4i8(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b, i32 0)
462 ret <vscale x 4 x i8> %res
465 define <vscale x 4 x i8> @splice_nxv4i8_offset_negone(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b) #0 {
466 ; CHECK-LABEL: splice_nxv4i8_offset_negone:
468 ; CHECK-NEXT: csrr a0, vlenb
469 ; CHECK-NEXT: srli a0, a0, 1
470 ; CHECK-NEXT: addi a0, a0, -1
471 ; CHECK-NEXT: vsetivli zero, 1, e8, mf2, ta, ma
472 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
473 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
474 ; CHECK-NEXT: vslideup.vi v8, v9, 1
476 %res = call <vscale x 4 x i8> @llvm.experimental.vector.splice.nxv4i8(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b, i32 -1)
477 ret <vscale x 4 x i8> %res
480 define <vscale x 4 x i8> @splice_nxv4i8_offset_min(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b) #0 {
481 ; CHECK-LABEL: splice_nxv4i8_offset_min:
483 ; CHECK-NEXT: csrr a0, vlenb
484 ; CHECK-NEXT: srli a0, a0, 1
485 ; CHECK-NEXT: addi a0, a0, -8
486 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
487 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
488 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
489 ; CHECK-NEXT: vslideup.vi v8, v9, 8
491 %res = call <vscale x 4 x i8> @llvm.experimental.vector.splice.nxv4i8(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b, i32 -8)
492 ret <vscale x 4 x i8> %res
495 define <vscale x 4 x i8> @splice_nxv4i8_offset_max(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b) #0 {
496 ; CHECK-LABEL: splice_nxv4i8_offset_max:
498 ; CHECK-NEXT: csrr a0, vlenb
499 ; CHECK-NEXT: srli a0, a0, 1
500 ; CHECK-NEXT: addi a0, a0, -7
501 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
502 ; CHECK-NEXT: vslidedown.vi v8, v8, 7
503 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
504 ; CHECK-NEXT: vslideup.vx v8, v9, a0
506 %res = call <vscale x 4 x i8> @llvm.experimental.vector.splice.nxv4i8(<vscale x 4 x i8> %a, <vscale x 4 x i8> %b, i32 7)
507 ret <vscale x 4 x i8> %res
510 declare <vscale x 8 x i8> @llvm.experimental.vector.splice.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i8>, i32)
512 define <vscale x 8 x i8> @splice_nxv8i8_offset_zero(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b) #0 {
513 ; CHECK-LABEL: splice_nxv8i8_offset_zero:
516 %res = call <vscale x 8 x i8> @llvm.experimental.vector.splice.nxv8i8(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, i32 0)
517 ret <vscale x 8 x i8> %res
520 define <vscale x 8 x i8> @splice_nxv8i8_offset_negone(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b) #0 {
521 ; CHECK-LABEL: splice_nxv8i8_offset_negone:
523 ; CHECK-NEXT: csrr a0, vlenb
524 ; CHECK-NEXT: addi a0, a0, -1
525 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
526 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
527 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
528 ; CHECK-NEXT: vslideup.vi v8, v9, 1
530 %res = call <vscale x 8 x i8> @llvm.experimental.vector.splice.nxv8i8(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, i32 -1)
531 ret <vscale x 8 x i8> %res
534 define <vscale x 8 x i8> @splice_nxv8i8_offset_min(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b) #0 {
535 ; CHECK-LABEL: splice_nxv8i8_offset_min:
537 ; CHECK-NEXT: csrr a0, vlenb
538 ; CHECK-NEXT: addi a0, a0, -16
539 ; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma
540 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
541 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
542 ; CHECK-NEXT: vslideup.vi v8, v9, 16
544 %res = call <vscale x 8 x i8> @llvm.experimental.vector.splice.nxv8i8(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, i32 -16)
545 ret <vscale x 8 x i8> %res
548 define <vscale x 8 x i8> @splice_nxv8i8_offset_max(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b) #0 {
549 ; CHECK-LABEL: splice_nxv8i8_offset_max:
551 ; CHECK-NEXT: csrr a0, vlenb
552 ; CHECK-NEXT: addi a0, a0, -15
553 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
554 ; CHECK-NEXT: vslidedown.vi v8, v8, 15
555 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
556 ; CHECK-NEXT: vslideup.vx v8, v9, a0
558 %res = call <vscale x 8 x i8> @llvm.experimental.vector.splice.nxv8i8(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, i32 15)
559 ret <vscale x 8 x i8> %res
562 declare <vscale x 16 x i8> @llvm.experimental.vector.splice.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, i32)
564 define <vscale x 16 x i8> @splice_nxv16i8_offset_zero(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) #0 {
565 ; CHECK-LABEL: splice_nxv16i8_offset_zero:
568 %res = call <vscale x 16 x i8> @llvm.experimental.vector.splice.nxv16i8(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, i32 0)
569 ret <vscale x 16 x i8> %res
572 define <vscale x 16 x i8> @splice_nxv16i8_offset_negone(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) #0 {
573 ; CHECK-LABEL: splice_nxv16i8_offset_negone:
575 ; CHECK-NEXT: csrr a0, vlenb
576 ; CHECK-NEXT: slli a0, a0, 1
577 ; CHECK-NEXT: addi a0, a0, -1
578 ; CHECK-NEXT: vsetivli zero, 1, e8, m2, ta, ma
579 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
580 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
581 ; CHECK-NEXT: vslideup.vi v8, v10, 1
583 %res = call <vscale x 16 x i8> @llvm.experimental.vector.splice.nxv16i8(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, i32 -1)
584 ret <vscale x 16 x i8> %res
587 define <vscale x 16 x i8> @splice_nxv16i8_offset_min(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) #0 {
588 ; CHECK-LABEL: splice_nxv16i8_offset_min:
590 ; CHECK-NEXT: csrr a0, vlenb
591 ; CHECK-NEXT: slli a0, a0, 1
592 ; CHECK-NEXT: addi a0, a0, -32
593 ; CHECK-NEXT: li a1, 32
594 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
595 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
596 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
597 ; CHECK-NEXT: vslideup.vx v8, v10, a1
599 %res = call <vscale x 16 x i8> @llvm.experimental.vector.splice.nxv16i8(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, i32 -32)
600 ret <vscale x 16 x i8> %res
603 define <vscale x 16 x i8> @splice_nxv16i8_offset_max(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) #0 {
604 ; CHECK-LABEL: splice_nxv16i8_offset_max:
606 ; CHECK-NEXT: csrr a0, vlenb
607 ; CHECK-NEXT: slli a0, a0, 1
608 ; CHECK-NEXT: addi a0, a0, -31
609 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
610 ; CHECK-NEXT: vslidedown.vi v8, v8, 31
611 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
612 ; CHECK-NEXT: vslideup.vx v8, v10, a0
614 %res = call <vscale x 16 x i8> @llvm.experimental.vector.splice.nxv16i8(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, i32 31)
615 ret <vscale x 16 x i8> %res
618 declare <vscale x 32 x i8> @llvm.experimental.vector.splice.nxv32i8(<vscale x 32 x i8>, <vscale x 32 x i8>, i32)
620 define <vscale x 32 x i8> @splice_nxv32i8_offset_zero(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b) #0 {
621 ; CHECK-LABEL: splice_nxv32i8_offset_zero:
624 %res = call <vscale x 32 x i8> @llvm.experimental.vector.splice.nxv32i8(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b, i32 0)
625 ret <vscale x 32 x i8> %res
628 define <vscale x 32 x i8> @splice_nxv32i8_offset_negone(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b) #0 {
629 ; CHECK-LABEL: splice_nxv32i8_offset_negone:
631 ; CHECK-NEXT: csrr a0, vlenb
632 ; CHECK-NEXT: slli a0, a0, 2
633 ; CHECK-NEXT: addi a0, a0, -1
634 ; CHECK-NEXT: vsetivli zero, 1, e8, m4, ta, ma
635 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
636 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
637 ; CHECK-NEXT: vslideup.vi v8, v12, 1
639 %res = call <vscale x 32 x i8> @llvm.experimental.vector.splice.nxv32i8(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b, i32 -1)
640 ret <vscale x 32 x i8> %res
643 define <vscale x 32 x i8> @splice_nxv32i8_offset_min(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b) #0 {
644 ; CHECK-LABEL: splice_nxv32i8_offset_min:
646 ; CHECK-NEXT: csrr a0, vlenb
647 ; CHECK-NEXT: slli a0, a0, 2
648 ; CHECK-NEXT: addi a0, a0, -64
649 ; CHECK-NEXT: li a1, 64
650 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
651 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
652 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
653 ; CHECK-NEXT: vslideup.vx v8, v12, a1
655 %res = call <vscale x 32 x i8> @llvm.experimental.vector.splice.nxv32i8(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b, i32 -64)
656 ret <vscale x 32 x i8> %res
659 define <vscale x 32 x i8> @splice_nxv32i8_offset_max(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b) #0 {
660 ; CHECK-LABEL: splice_nxv32i8_offset_max:
662 ; CHECK-NEXT: csrr a0, vlenb
663 ; CHECK-NEXT: slli a0, a0, 2
664 ; CHECK-NEXT: addi a0, a0, -63
665 ; CHECK-NEXT: li a1, 63
666 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
667 ; CHECK-NEXT: vslidedown.vx v8, v8, a1
668 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
669 ; CHECK-NEXT: vslideup.vx v8, v12, a0
671 %res = call <vscale x 32 x i8> @llvm.experimental.vector.splice.nxv32i8(<vscale x 32 x i8> %a, <vscale x 32 x i8> %b, i32 63)
672 ret <vscale x 32 x i8> %res
675 declare <vscale x 64 x i8> @llvm.experimental.vector.splice.nxv64i8(<vscale x 64 x i8>, <vscale x 64 x i8>, i32)
677 define <vscale x 64 x i8> @splice_nxv64i8_offset_zero(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b) #0 {
678 ; CHECK-LABEL: splice_nxv64i8_offset_zero:
681 %res = call <vscale x 64 x i8> @llvm.experimental.vector.splice.nxv64i8(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b, i32 0)
682 ret <vscale x 64 x i8> %res
685 define <vscale x 64 x i8> @splice_nxv64i8_offset_negone(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b) #0 {
686 ; CHECK-LABEL: splice_nxv64i8_offset_negone:
688 ; CHECK-NEXT: csrr a0, vlenb
689 ; CHECK-NEXT: slli a0, a0, 3
690 ; CHECK-NEXT: addi a0, a0, -1
691 ; CHECK-NEXT: vsetivli zero, 1, e8, m8, ta, ma
692 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
693 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
694 ; CHECK-NEXT: vslideup.vi v8, v16, 1
696 %res = call <vscale x 64 x i8> @llvm.experimental.vector.splice.nxv64i8(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b, i32 -1)
697 ret <vscale x 64 x i8> %res
700 define <vscale x 64 x i8> @splice_nxv64i8_offset_min(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b) #0 {
701 ; CHECK-LABEL: splice_nxv64i8_offset_min:
703 ; CHECK-NEXT: csrr a0, vlenb
704 ; CHECK-NEXT: slli a0, a0, 3
705 ; CHECK-NEXT: addi a0, a0, -128
706 ; CHECK-NEXT: li a1, 128
707 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
708 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
709 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
710 ; CHECK-NEXT: vslideup.vx v8, v16, a1
712 %res = call <vscale x 64 x i8> @llvm.experimental.vector.splice.nxv64i8(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b, i32 -128)
713 ret <vscale x 64 x i8> %res
716 define <vscale x 64 x i8> @splice_nxv64i8_offset_max(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b) #0 {
717 ; CHECK-LABEL: splice_nxv64i8_offset_max:
719 ; CHECK-NEXT: csrr a0, vlenb
720 ; CHECK-NEXT: slli a0, a0, 3
721 ; CHECK-NEXT: addi a0, a0, -127
722 ; CHECK-NEXT: li a1, 127
723 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
724 ; CHECK-NEXT: vslidedown.vx v8, v8, a1
725 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
726 ; CHECK-NEXT: vslideup.vx v8, v16, a0
728 %res = call <vscale x 64 x i8> @llvm.experimental.vector.splice.nxv64i8(<vscale x 64 x i8> %a, <vscale x 64 x i8> %b, i32 127)
729 ret <vscale x 64 x i8> %res
732 declare <vscale x 1 x i16> @llvm.experimental.vector.splice.nxv1i16(<vscale x 1 x i16>, <vscale x 1 x i16>, i32)
734 define <vscale x 1 x i16> @splice_nxv1i16_offset_zero(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b) #0 {
735 ; CHECK-LABEL: splice_nxv1i16_offset_zero:
738 %res = call <vscale x 1 x i16> @llvm.experimental.vector.splice.nxv1i16(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b, i32 0)
739 ret <vscale x 1 x i16> %res
742 define <vscale x 1 x i16> @splice_nxv1i16_offset_negone(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b) #0 {
743 ; CHECK-LABEL: splice_nxv1i16_offset_negone:
745 ; CHECK-NEXT: csrr a0, vlenb
746 ; CHECK-NEXT: srli a0, a0, 3
747 ; CHECK-NEXT: addi a0, a0, -1
748 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
749 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
750 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
751 ; CHECK-NEXT: vslideup.vi v8, v9, 1
753 %res = call <vscale x 1 x i16> @llvm.experimental.vector.splice.nxv1i16(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b, i32 -1)
754 ret <vscale x 1 x i16> %res
757 define <vscale x 1 x i16> @splice_nxv1i16_offset_min(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b) #0 {
758 ; CHECK-LABEL: splice_nxv1i16_offset_min:
760 ; CHECK-NEXT: csrr a0, vlenb
761 ; CHECK-NEXT: srli a0, a0, 3
762 ; CHECK-NEXT: addi a0, a0, -2
763 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
764 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
765 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
766 ; CHECK-NEXT: vslideup.vi v8, v9, 2
768 %res = call <vscale x 1 x i16> @llvm.experimental.vector.splice.nxv1i16(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b, i32 -2)
769 ret <vscale x 1 x i16> %res
772 define <vscale x 1 x i16> @splice_nxv1i16_offset_max(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b) #0 {
773 ; CHECK-LABEL: splice_nxv1i16_offset_max:
775 ; CHECK-NEXT: csrr a0, vlenb
776 ; CHECK-NEXT: srli a0, a0, 3
777 ; CHECK-NEXT: addi a0, a0, -1
778 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
779 ; CHECK-NEXT: vslidedown.vi v8, v8, 1
780 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
781 ; CHECK-NEXT: vslideup.vx v8, v9, a0
783 %res = call <vscale x 1 x i16> @llvm.experimental.vector.splice.nxv1i16(<vscale x 1 x i16> %a, <vscale x 1 x i16> %b, i32 1)
784 ret <vscale x 1 x i16> %res
787 declare <vscale x 2 x i16> @llvm.experimental.vector.splice.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i16>, i32)
789 define <vscale x 2 x i16> @splice_nxv2i16_offset_zero(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b) #0 {
790 ; CHECK-LABEL: splice_nxv2i16_offset_zero:
793 %res = call <vscale x 2 x i16> @llvm.experimental.vector.splice.nxv2i16(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b, i32 0)
794 ret <vscale x 2 x i16> %res
797 define <vscale x 2 x i16> @splice_nxv2i16_offset_negone(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b) #0 {
798 ; CHECK-LABEL: splice_nxv2i16_offset_negone:
800 ; CHECK-NEXT: csrr a0, vlenb
801 ; CHECK-NEXT: srli a0, a0, 2
802 ; CHECK-NEXT: addi a0, a0, -1
803 ; CHECK-NEXT: vsetivli zero, 1, e16, mf2, ta, ma
804 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
805 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
806 ; CHECK-NEXT: vslideup.vi v8, v9, 1
808 %res = call <vscale x 2 x i16> @llvm.experimental.vector.splice.nxv2i16(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b, i32 -1)
809 ret <vscale x 2 x i16> %res
812 define <vscale x 2 x i16> @splice_nxv2i16_offset_min(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b) #0 {
813 ; CHECK-LABEL: splice_nxv2i16_offset_min:
815 ; CHECK-NEXT: csrr a0, vlenb
816 ; CHECK-NEXT: srli a0, a0, 2
817 ; CHECK-NEXT: addi a0, a0, -4
818 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
819 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
820 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
821 ; CHECK-NEXT: vslideup.vi v8, v9, 4
823 %res = call <vscale x 2 x i16> @llvm.experimental.vector.splice.nxv2i16(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b, i32 -4)
824 ret <vscale x 2 x i16> %res
827 define <vscale x 2 x i16> @splice_nxv2i16_offset_max(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b) #0 {
828 ; CHECK-LABEL: splice_nxv2i16_offset_max:
830 ; CHECK-NEXT: csrr a0, vlenb
831 ; CHECK-NEXT: srli a0, a0, 2
832 ; CHECK-NEXT: addi a0, a0, -3
833 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
834 ; CHECK-NEXT: vslidedown.vi v8, v8, 3
835 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
836 ; CHECK-NEXT: vslideup.vx v8, v9, a0
838 %res = call <vscale x 2 x i16> @llvm.experimental.vector.splice.nxv2i16(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b, i32 3)
839 ret <vscale x 2 x i16> %res
842 declare <vscale x 4 x i16> @llvm.experimental.vector.splice.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i16>, i32)
844 define <vscale x 4 x i16> @splice_nxv4i16_offset_zero(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b) #0 {
845 ; CHECK-LABEL: splice_nxv4i16_offset_zero:
848 %res = call <vscale x 4 x i16> @llvm.experimental.vector.splice.nxv4i16(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, i32 0)
849 ret <vscale x 4 x i16> %res
852 define <vscale x 4 x i16> @splice_nxv4i16_offset_negone(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b) #0 {
853 ; CHECK-LABEL: splice_nxv4i16_offset_negone:
855 ; CHECK-NEXT: csrr a0, vlenb
856 ; CHECK-NEXT: srli a0, a0, 1
857 ; CHECK-NEXT: addi a0, a0, -1
858 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
859 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
860 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
861 ; CHECK-NEXT: vslideup.vi v8, v9, 1
863 %res = call <vscale x 4 x i16> @llvm.experimental.vector.splice.nxv4i16(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, i32 -1)
864 ret <vscale x 4 x i16> %res
867 define <vscale x 4 x i16> @splice_nxv4i16_offset_min(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b) #0 {
868 ; CHECK-LABEL: splice_nxv4i16_offset_min:
870 ; CHECK-NEXT: csrr a0, vlenb
871 ; CHECK-NEXT: srli a0, a0, 1
872 ; CHECK-NEXT: addi a0, a0, -8
873 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
874 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
875 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
876 ; CHECK-NEXT: vslideup.vi v8, v9, 8
878 %res = call <vscale x 4 x i16> @llvm.experimental.vector.splice.nxv4i16(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, i32 -8)
879 ret <vscale x 4 x i16> %res
882 define <vscale x 4 x i16> @splice_nxv4i16_offset_max(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b) #0 {
883 ; CHECK-LABEL: splice_nxv4i16_offset_max:
885 ; CHECK-NEXT: csrr a0, vlenb
886 ; CHECK-NEXT: srli a0, a0, 1
887 ; CHECK-NEXT: addi a0, a0, -7
888 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
889 ; CHECK-NEXT: vslidedown.vi v8, v8, 7
890 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
891 ; CHECK-NEXT: vslideup.vx v8, v9, a0
893 %res = call <vscale x 4 x i16> @llvm.experimental.vector.splice.nxv4i16(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, i32 7)
894 ret <vscale x 4 x i16> %res
897 declare <vscale x 8 x i16> @llvm.experimental.vector.splice.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, i32)
899 define <vscale x 8 x i16> @splice_nxv8i16_offset_zero(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) #0 {
900 ; CHECK-LABEL: splice_nxv8i16_offset_zero:
903 %res = call <vscale x 8 x i16> @llvm.experimental.vector.splice.nxv8i16(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, i32 0)
904 ret <vscale x 8 x i16> %res
907 define <vscale x 8 x i16> @splice_nxv8i16_offset_negone(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) #0 {
908 ; CHECK-LABEL: splice_nxv8i16_offset_negone:
910 ; CHECK-NEXT: csrr a0, vlenb
911 ; CHECK-NEXT: addi a0, a0, -1
912 ; CHECK-NEXT: vsetivli zero, 1, e16, m2, ta, ma
913 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
914 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
915 ; CHECK-NEXT: vslideup.vi v8, v10, 1
917 %res = call <vscale x 8 x i16> @llvm.experimental.vector.splice.nxv8i16(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, i32 -1)
918 ret <vscale x 8 x i16> %res
921 define <vscale x 8 x i16> @splice_nxv8i16_offset_min(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) #0 {
922 ; CHECK-LABEL: splice_nxv8i16_offset_min:
924 ; CHECK-NEXT: csrr a0, vlenb
925 ; CHECK-NEXT: addi a0, a0, -16
926 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
927 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
928 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
929 ; CHECK-NEXT: vslideup.vi v8, v10, 16
931 %res = call <vscale x 8 x i16> @llvm.experimental.vector.splice.nxv8i16(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, i32 -16)
932 ret <vscale x 8 x i16> %res
935 define <vscale x 8 x i16> @splice_nxv8i16_offset_max(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) #0 {
936 ; CHECK-LABEL: splice_nxv8i16_offset_max:
938 ; CHECK-NEXT: csrr a0, vlenb
939 ; CHECK-NEXT: addi a0, a0, -15
940 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
941 ; CHECK-NEXT: vslidedown.vi v8, v8, 15
942 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
943 ; CHECK-NEXT: vslideup.vx v8, v10, a0
945 %res = call <vscale x 8 x i16> @llvm.experimental.vector.splice.nxv8i16(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b, i32 15)
946 ret <vscale x 8 x i16> %res
949 declare <vscale x 16 x i16> @llvm.experimental.vector.splice.nxv16i16(<vscale x 16 x i16>, <vscale x 16 x i16>, i32)
951 define <vscale x 16 x i16> @splice_nxv16i16_offset_zero(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b) #0 {
952 ; CHECK-LABEL: splice_nxv16i16_offset_zero:
955 %res = call <vscale x 16 x i16> @llvm.experimental.vector.splice.nxv16i16(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b, i32 0)
956 ret <vscale x 16 x i16> %res
959 define <vscale x 16 x i16> @splice_nxv16i16_offset_negone(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b) #0 {
960 ; CHECK-LABEL: splice_nxv16i16_offset_negone:
962 ; CHECK-NEXT: csrr a0, vlenb
963 ; CHECK-NEXT: slli a0, a0, 1
964 ; CHECK-NEXT: addi a0, a0, -1
965 ; CHECK-NEXT: vsetivli zero, 1, e16, m4, ta, ma
966 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
967 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
968 ; CHECK-NEXT: vslideup.vi v8, v12, 1
970 %res = call <vscale x 16 x i16> @llvm.experimental.vector.splice.nxv16i16(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b, i32 -1)
971 ret <vscale x 16 x i16> %res
974 define <vscale x 16 x i16> @splice_nxv16i16_offset_min(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b) #0 {
975 ; CHECK-LABEL: splice_nxv16i16_offset_min:
977 ; CHECK-NEXT: csrr a0, vlenb
978 ; CHECK-NEXT: slli a0, a0, 1
979 ; CHECK-NEXT: addi a0, a0, -32
980 ; CHECK-NEXT: li a1, 32
981 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
982 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
983 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
984 ; CHECK-NEXT: vslideup.vx v8, v12, a1
986 %res = call <vscale x 16 x i16> @llvm.experimental.vector.splice.nxv16i16(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b, i32 -32)
987 ret <vscale x 16 x i16> %res
990 define <vscale x 16 x i16> @splice_nxv16i16_offset_max(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b) #0 {
991 ; CHECK-LABEL: splice_nxv16i16_offset_max:
993 ; CHECK-NEXT: csrr a0, vlenb
994 ; CHECK-NEXT: slli a0, a0, 1
995 ; CHECK-NEXT: addi a0, a0, -31
996 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
997 ; CHECK-NEXT: vslidedown.vi v8, v8, 31
998 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
999 ; CHECK-NEXT: vslideup.vx v8, v12, a0
1001 %res = call <vscale x 16 x i16> @llvm.experimental.vector.splice.nxv16i16(<vscale x 16 x i16> %a, <vscale x 16 x i16> %b, i32 31)
1002 ret <vscale x 16 x i16> %res
1005 declare <vscale x 32 x i16> @llvm.experimental.vector.splice.nxv32i16(<vscale x 32 x i16>, <vscale x 32 x i16>, i32)
1007 define <vscale x 32 x i16> @splice_nxv32i16_offset_zero(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b) #0 {
1008 ; CHECK-LABEL: splice_nxv32i16_offset_zero:
1011 %res = call <vscale x 32 x i16> @llvm.experimental.vector.splice.nxv32i16(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b, i32 0)
1012 ret <vscale x 32 x i16> %res
1015 define <vscale x 32 x i16> @splice_nxv32i16_offset_negone(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b) #0 {
1016 ; CHECK-LABEL: splice_nxv32i16_offset_negone:
1018 ; CHECK-NEXT: csrr a0, vlenb
1019 ; CHECK-NEXT: slli a0, a0, 2
1020 ; CHECK-NEXT: addi a0, a0, -1
1021 ; CHECK-NEXT: vsetivli zero, 1, e16, m8, ta, ma
1022 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1023 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1024 ; CHECK-NEXT: vslideup.vi v8, v16, 1
1026 %res = call <vscale x 32 x i16> @llvm.experimental.vector.splice.nxv32i16(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b, i32 -1)
1027 ret <vscale x 32 x i16> %res
1030 define <vscale x 32 x i16> @splice_nxv32i16_offset_min(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b) #0 {
1031 ; CHECK-LABEL: splice_nxv32i16_offset_min:
1033 ; CHECK-NEXT: csrr a0, vlenb
1034 ; CHECK-NEXT: slli a0, a0, 2
1035 ; CHECK-NEXT: addi a0, a0, -64
1036 ; CHECK-NEXT: li a1, 64
1037 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
1038 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1039 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1040 ; CHECK-NEXT: vslideup.vx v8, v16, a1
1042 %res = call <vscale x 32 x i16> @llvm.experimental.vector.splice.nxv32i16(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b, i32 -64)
1043 ret <vscale x 32 x i16> %res
1046 define <vscale x 32 x i16> @splice_nxv32i16_offset_max(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b) #0 {
1047 ; CHECK-LABEL: splice_nxv32i16_offset_max:
1049 ; CHECK-NEXT: csrr a0, vlenb
1050 ; CHECK-NEXT: slli a0, a0, 2
1051 ; CHECK-NEXT: addi a0, a0, -63
1052 ; CHECK-NEXT: li a1, 63
1053 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
1054 ; CHECK-NEXT: vslidedown.vx v8, v8, a1
1055 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
1056 ; CHECK-NEXT: vslideup.vx v8, v16, a0
1058 %res = call <vscale x 32 x i16> @llvm.experimental.vector.splice.nxv32i16(<vscale x 32 x i16> %a, <vscale x 32 x i16> %b, i32 63)
1059 ret <vscale x 32 x i16> %res
1062 declare <vscale x 1 x i32> @llvm.experimental.vector.splice.nxv1i32(<vscale x 1 x i32>, <vscale x 1 x i32>, i32)
1064 define <vscale x 1 x i32> @splice_nxv1i32_offset_zero(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b) #0 {
1065 ; CHECK-LABEL: splice_nxv1i32_offset_zero:
1068 %res = call <vscale x 1 x i32> @llvm.experimental.vector.splice.nxv1i32(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b, i32 0)
1069 ret <vscale x 1 x i32> %res
1072 define <vscale x 1 x i32> @splice_nxv1i32_offset_negone(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b) #0 {
1073 ; CHECK-LABEL: splice_nxv1i32_offset_negone:
1075 ; CHECK-NEXT: csrr a0, vlenb
1076 ; CHECK-NEXT: srli a0, a0, 3
1077 ; CHECK-NEXT: addi a0, a0, -1
1078 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
1079 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1080 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1081 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1083 %res = call <vscale x 1 x i32> @llvm.experimental.vector.splice.nxv1i32(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b, i32 -1)
1084 ret <vscale x 1 x i32> %res
1087 define <vscale x 1 x i32> @splice_nxv1i32_offset_min(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b) #0 {
1088 ; CHECK-LABEL: splice_nxv1i32_offset_min:
1090 ; CHECK-NEXT: csrr a0, vlenb
1091 ; CHECK-NEXT: srli a0, a0, 3
1092 ; CHECK-NEXT: addi a0, a0, -2
1093 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
1094 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1095 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1096 ; CHECK-NEXT: vslideup.vi v8, v9, 2
1098 %res = call <vscale x 1 x i32> @llvm.experimental.vector.splice.nxv1i32(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b, i32 -2)
1099 ret <vscale x 1 x i32> %res
1102 define <vscale x 1 x i32> @splice_nxv1i32_offset_max(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b) #0 {
1103 ; CHECK-LABEL: splice_nxv1i32_offset_max:
1105 ; CHECK-NEXT: csrr a0, vlenb
1106 ; CHECK-NEXT: srli a0, a0, 3
1107 ; CHECK-NEXT: addi a0, a0, -1
1108 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1109 ; CHECK-NEXT: vslidedown.vi v8, v8, 1
1110 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
1111 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1113 %res = call <vscale x 1 x i32> @llvm.experimental.vector.splice.nxv1i32(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b, i32 1)
1114 ret <vscale x 1 x i32> %res
1117 declare <vscale x 2 x i32> @llvm.experimental.vector.splice.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>, i32)
1119 define <vscale x 2 x i32> @splice_nxv2i32_offset_zero(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b) #0 {
1120 ; CHECK-LABEL: splice_nxv2i32_offset_zero:
1123 %res = call <vscale x 2 x i32> @llvm.experimental.vector.splice.nxv2i32(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, i32 0)
1124 ret <vscale x 2 x i32> %res
1127 define <vscale x 2 x i32> @splice_nxv2i32_offset_negone(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b) #0 {
1128 ; CHECK-LABEL: splice_nxv2i32_offset_negone:
1130 ; CHECK-NEXT: csrr a0, vlenb
1131 ; CHECK-NEXT: srli a0, a0, 2
1132 ; CHECK-NEXT: addi a0, a0, -1
1133 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
1134 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1135 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1136 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1138 %res = call <vscale x 2 x i32> @llvm.experimental.vector.splice.nxv2i32(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, i32 -1)
1139 ret <vscale x 2 x i32> %res
1142 define <vscale x 2 x i32> @splice_nxv2i32_offset_min(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b) #0 {
1143 ; CHECK-LABEL: splice_nxv2i32_offset_min:
1145 ; CHECK-NEXT: csrr a0, vlenb
1146 ; CHECK-NEXT: srli a0, a0, 2
1147 ; CHECK-NEXT: addi a0, a0, -4
1148 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1149 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1150 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1151 ; CHECK-NEXT: vslideup.vi v8, v9, 4
1153 %res = call <vscale x 2 x i32> @llvm.experimental.vector.splice.nxv2i32(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, i32 -4)
1154 ret <vscale x 2 x i32> %res
1157 define <vscale x 2 x i32> @splice_nxv2i32_offset_max(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b) #0 {
1158 ; CHECK-LABEL: splice_nxv2i32_offset_max:
1160 ; CHECK-NEXT: csrr a0, vlenb
1161 ; CHECK-NEXT: srli a0, a0, 2
1162 ; CHECK-NEXT: addi a0, a0, -3
1163 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
1164 ; CHECK-NEXT: vslidedown.vi v8, v8, 3
1165 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
1166 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1168 %res = call <vscale x 2 x i32> @llvm.experimental.vector.splice.nxv2i32(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, i32 3)
1169 ret <vscale x 2 x i32> %res
1172 declare <vscale x 4 x i32> @llvm.experimental.vector.splice.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, i32)
1174 define <vscale x 4 x i32> @splice_nxv4i32_offset_zero(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) #0 {
1175 ; CHECK-LABEL: splice_nxv4i32_offset_zero:
1178 %res = call <vscale x 4 x i32> @llvm.experimental.vector.splice.nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, i32 0)
1179 ret <vscale x 4 x i32> %res
1182 define <vscale x 4 x i32> @splice_nxv4i32_offset_negone(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) #0 {
1183 ; CHECK-LABEL: splice_nxv4i32_offset_negone:
1185 ; CHECK-NEXT: csrr a0, vlenb
1186 ; CHECK-NEXT: srli a0, a0, 1
1187 ; CHECK-NEXT: addi a0, a0, -1
1188 ; CHECK-NEXT: vsetivli zero, 1, e32, m2, ta, ma
1189 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1190 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1191 ; CHECK-NEXT: vslideup.vi v8, v10, 1
1193 %res = call <vscale x 4 x i32> @llvm.experimental.vector.splice.nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, i32 -1)
1194 ret <vscale x 4 x i32> %res
1197 define <vscale x 4 x i32> @splice_nxv4i32_offset_min(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) #0 {
1198 ; CHECK-LABEL: splice_nxv4i32_offset_min:
1200 ; CHECK-NEXT: csrr a0, vlenb
1201 ; CHECK-NEXT: srli a0, a0, 1
1202 ; CHECK-NEXT: addi a0, a0, -8
1203 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1204 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1205 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1206 ; CHECK-NEXT: vslideup.vi v8, v10, 8
1208 %res = call <vscale x 4 x i32> @llvm.experimental.vector.splice.nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, i32 -8)
1209 ret <vscale x 4 x i32> %res
1212 define <vscale x 4 x i32> @splice_nxv4i32_offset_max(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) #0 {
1213 ; CHECK-LABEL: splice_nxv4i32_offset_max:
1215 ; CHECK-NEXT: csrr a0, vlenb
1216 ; CHECK-NEXT: srli a0, a0, 1
1217 ; CHECK-NEXT: addi a0, a0, -7
1218 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1219 ; CHECK-NEXT: vslidedown.vi v8, v8, 7
1220 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
1221 ; CHECK-NEXT: vslideup.vx v8, v10, a0
1223 %res = call <vscale x 4 x i32> @llvm.experimental.vector.splice.nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, i32 7)
1224 ret <vscale x 4 x i32> %res
1227 declare <vscale x 8 x i32> @llvm.experimental.vector.splice.nxv8i32(<vscale x 8 x i32>, <vscale x 8 x i32>, i32)
1229 define <vscale x 8 x i32> @splice_nxv8i32_offset_zero(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b) #0 {
1230 ; CHECK-LABEL: splice_nxv8i32_offset_zero:
1233 %res = call <vscale x 8 x i32> @llvm.experimental.vector.splice.nxv8i32(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b, i32 0)
1234 ret <vscale x 8 x i32> %res
1237 define <vscale x 8 x i32> @splice_nxv8i32_offset_negone(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b) #0 {
1238 ; CHECK-LABEL: splice_nxv8i32_offset_negone:
1240 ; CHECK-NEXT: csrr a0, vlenb
1241 ; CHECK-NEXT: addi a0, a0, -1
1242 ; CHECK-NEXT: vsetivli zero, 1, e32, m4, ta, ma
1243 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1244 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1245 ; CHECK-NEXT: vslideup.vi v8, v12, 1
1247 %res = call <vscale x 8 x i32> @llvm.experimental.vector.splice.nxv8i32(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b, i32 -1)
1248 ret <vscale x 8 x i32> %res
1251 define <vscale x 8 x i32> @splice_nxv8i32_offset_min(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b) #0 {
1252 ; CHECK-LABEL: splice_nxv8i32_offset_min:
1254 ; CHECK-NEXT: csrr a0, vlenb
1255 ; CHECK-NEXT: addi a0, a0, -16
1256 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
1257 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1258 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1259 ; CHECK-NEXT: vslideup.vi v8, v12, 16
1261 %res = call <vscale x 8 x i32> @llvm.experimental.vector.splice.nxv8i32(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b, i32 -16)
1262 ret <vscale x 8 x i32> %res
1265 define <vscale x 8 x i32> @splice_nxv8i32_offset_max(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b) #0 {
1266 ; CHECK-LABEL: splice_nxv8i32_offset_max:
1268 ; CHECK-NEXT: csrr a0, vlenb
1269 ; CHECK-NEXT: addi a0, a0, -15
1270 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1271 ; CHECK-NEXT: vslidedown.vi v8, v8, 15
1272 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1273 ; CHECK-NEXT: vslideup.vx v8, v12, a0
1275 %res = call <vscale x 8 x i32> @llvm.experimental.vector.splice.nxv8i32(<vscale x 8 x i32> %a, <vscale x 8 x i32> %b, i32 15)
1276 ret <vscale x 8 x i32> %res
1279 declare <vscale x 16 x i32> @llvm.experimental.vector.splice.nxv16i32(<vscale x 16 x i32>, <vscale x 16 x i32>, i32)
1281 define <vscale x 16 x i32> @splice_nxv16i32_offset_zero(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b) #0 {
1282 ; CHECK-LABEL: splice_nxv16i32_offset_zero:
1285 %res = call <vscale x 16 x i32> @llvm.experimental.vector.splice.nxv16i32(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b, i32 0)
1286 ret <vscale x 16 x i32> %res
1289 define <vscale x 16 x i32> @splice_nxv16i32_offset_negone(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b) #0 {
1290 ; CHECK-LABEL: splice_nxv16i32_offset_negone:
1292 ; CHECK-NEXT: csrr a0, vlenb
1293 ; CHECK-NEXT: slli a0, a0, 1
1294 ; CHECK-NEXT: addi a0, a0, -1
1295 ; CHECK-NEXT: vsetivli zero, 1, e32, m8, ta, ma
1296 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1297 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1298 ; CHECK-NEXT: vslideup.vi v8, v16, 1
1300 %res = call <vscale x 16 x i32> @llvm.experimental.vector.splice.nxv16i32(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b, i32 -1)
1301 ret <vscale x 16 x i32> %res
1304 define <vscale x 16 x i32> @splice_nxv16i32_offset_min(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b) #0 {
1305 ; CHECK-LABEL: splice_nxv16i32_offset_min:
1307 ; CHECK-NEXT: csrr a0, vlenb
1308 ; CHECK-NEXT: slli a0, a0, 1
1309 ; CHECK-NEXT: addi a0, a0, -32
1310 ; CHECK-NEXT: li a1, 32
1311 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
1312 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1313 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
1314 ; CHECK-NEXT: vslideup.vx v8, v16, a1
1316 %res = call <vscale x 16 x i32> @llvm.experimental.vector.splice.nxv16i32(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b, i32 -32)
1317 ret <vscale x 16 x i32> %res
1320 define <vscale x 16 x i32> @splice_nxv16i32_offset_max(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b) #0 {
1321 ; CHECK-LABEL: splice_nxv16i32_offset_max:
1323 ; CHECK-NEXT: csrr a0, vlenb
1324 ; CHECK-NEXT: slli a0, a0, 1
1325 ; CHECK-NEXT: addi a0, a0, -31
1326 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1327 ; CHECK-NEXT: vslidedown.vi v8, v8, 31
1328 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
1329 ; CHECK-NEXT: vslideup.vx v8, v16, a0
1331 %res = call <vscale x 16 x i32> @llvm.experimental.vector.splice.nxv16i32(<vscale x 16 x i32> %a, <vscale x 16 x i32> %b, i32 31)
1332 ret <vscale x 16 x i32> %res
1335 declare <vscale x 1 x i64> @llvm.experimental.vector.splice.nxv1i64(<vscale x 1 x i64>, <vscale x 1 x i64>, i32)
1337 define <vscale x 1 x i64> @splice_nxv1i64_offset_zero(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b) #0 {
1338 ; CHECK-LABEL: splice_nxv1i64_offset_zero:
1341 %res = call <vscale x 1 x i64> @llvm.experimental.vector.splice.nxv1i64(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b, i32 0)
1342 ret <vscale x 1 x i64> %res
1345 define <vscale x 1 x i64> @splice_nxv1i64_offset_negone(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b) #0 {
1346 ; CHECK-LABEL: splice_nxv1i64_offset_negone:
1348 ; CHECK-NEXT: csrr a0, vlenb
1349 ; CHECK-NEXT: srli a0, a0, 3
1350 ; CHECK-NEXT: addi a0, a0, -1
1351 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
1352 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1353 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1354 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1356 %res = call <vscale x 1 x i64> @llvm.experimental.vector.splice.nxv1i64(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b, i32 -1)
1357 ret <vscale x 1 x i64> %res
1360 define <vscale x 1 x i64> @splice_nxv1i64_offset_min(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b) #0 {
1361 ; CHECK-LABEL: splice_nxv1i64_offset_min:
1363 ; CHECK-NEXT: csrr a0, vlenb
1364 ; CHECK-NEXT: srli a0, a0, 3
1365 ; CHECK-NEXT: addi a0, a0, -2
1366 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
1367 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1368 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
1369 ; CHECK-NEXT: vslideup.vi v8, v9, 2
1371 %res = call <vscale x 1 x i64> @llvm.experimental.vector.splice.nxv1i64(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b, i32 -2)
1372 ret <vscale x 1 x i64> %res
1375 define <vscale x 1 x i64> @splice_nxv1i64_offset_max(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b) #0 {
1376 ; CHECK-LABEL: splice_nxv1i64_offset_max:
1378 ; CHECK-NEXT: csrr a0, vlenb
1379 ; CHECK-NEXT: srli a0, a0, 3
1380 ; CHECK-NEXT: addi a0, a0, -1
1381 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1382 ; CHECK-NEXT: vslidedown.vi v8, v8, 1
1383 ; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1384 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1386 %res = call <vscale x 1 x i64> @llvm.experimental.vector.splice.nxv1i64(<vscale x 1 x i64> %a, <vscale x 1 x i64> %b, i32 1)
1387 ret <vscale x 1 x i64> %res
1390 declare <vscale x 2 x i64> @llvm.experimental.vector.splice.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, i32)
1392 define <vscale x 2 x i64> @splice_nxv2i64_offset_zero(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) #0 {
1393 ; CHECK-LABEL: splice_nxv2i64_offset_zero:
1396 %res = call <vscale x 2 x i64> @llvm.experimental.vector.splice.nxv2i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b, i32 0)
1397 ret <vscale x 2 x i64> %res
1400 define <vscale x 2 x i64> @splice_nxv2i64_offset_negone(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) #0 {
1401 ; CHECK-LABEL: splice_nxv2i64_offset_negone:
1403 ; CHECK-NEXT: csrr a0, vlenb
1404 ; CHECK-NEXT: srli a0, a0, 2
1405 ; CHECK-NEXT: addi a0, a0, -1
1406 ; CHECK-NEXT: vsetivli zero, 1, e64, m2, ta, ma
1407 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1408 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1409 ; CHECK-NEXT: vslideup.vi v8, v10, 1
1411 %res = call <vscale x 2 x i64> @llvm.experimental.vector.splice.nxv2i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b, i32 -1)
1412 ret <vscale x 2 x i64> %res
1415 define <vscale x 2 x i64> @splice_nxv2i64_offset_min(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) #0 {
1416 ; CHECK-LABEL: splice_nxv2i64_offset_min:
1418 ; CHECK-NEXT: csrr a0, vlenb
1419 ; CHECK-NEXT: srli a0, a0, 2
1420 ; CHECK-NEXT: addi a0, a0, -4
1421 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1422 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1423 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
1424 ; CHECK-NEXT: vslideup.vi v8, v10, 4
1426 %res = call <vscale x 2 x i64> @llvm.experimental.vector.splice.nxv2i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b, i32 -4)
1427 ret <vscale x 2 x i64> %res
1430 define <vscale x 2 x i64> @splice_nxv2i64_offset_max(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b) #0 {
1431 ; CHECK-LABEL: splice_nxv2i64_offset_max:
1433 ; CHECK-NEXT: csrr a0, vlenb
1434 ; CHECK-NEXT: srli a0, a0, 2
1435 ; CHECK-NEXT: addi a0, a0, -3
1436 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1437 ; CHECK-NEXT: vslidedown.vi v8, v8, 3
1438 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1439 ; CHECK-NEXT: vslideup.vx v8, v10, a0
1441 %res = call <vscale x 2 x i64> @llvm.experimental.vector.splice.nxv2i64(<vscale x 2 x i64> %a, <vscale x 2 x i64> %b, i32 3)
1442 ret <vscale x 2 x i64> %res
1445 declare <vscale x 4 x i64> @llvm.experimental.vector.splice.nxv4i64(<vscale x 4 x i64>, <vscale x 4 x i64>, i32)
1447 define <vscale x 4 x i64> @splice_nxv4i64_offset_zero(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b) #0 {
1448 ; CHECK-LABEL: splice_nxv4i64_offset_zero:
1451 %res = call <vscale x 4 x i64> @llvm.experimental.vector.splice.nxv4i64(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b, i32 0)
1452 ret <vscale x 4 x i64> %res
1455 define <vscale x 4 x i64> @splice_nxv4i64_offset_negone(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b) #0 {
1456 ; CHECK-LABEL: splice_nxv4i64_offset_negone:
1458 ; CHECK-NEXT: csrr a0, vlenb
1459 ; CHECK-NEXT: srli a0, a0, 1
1460 ; CHECK-NEXT: addi a0, a0, -1
1461 ; CHECK-NEXT: vsetivli zero, 1, e64, m4, ta, ma
1462 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1463 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1464 ; CHECK-NEXT: vslideup.vi v8, v12, 1
1466 %res = call <vscale x 4 x i64> @llvm.experimental.vector.splice.nxv4i64(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b, i32 -1)
1467 ret <vscale x 4 x i64> %res
1470 define <vscale x 4 x i64> @splice_nxv4i64_offset_min(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b) #0 {
1471 ; CHECK-LABEL: splice_nxv4i64_offset_min:
1473 ; CHECK-NEXT: csrr a0, vlenb
1474 ; CHECK-NEXT: srli a0, a0, 1
1475 ; CHECK-NEXT: addi a0, a0, -8
1476 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1477 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1478 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
1479 ; CHECK-NEXT: vslideup.vi v8, v12, 8
1481 %res = call <vscale x 4 x i64> @llvm.experimental.vector.splice.nxv4i64(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b, i32 -8)
1482 ret <vscale x 4 x i64> %res
1485 define <vscale x 4 x i64> @splice_nxv4i64_offset_max(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b) #0 {
1486 ; CHECK-LABEL: splice_nxv4i64_offset_max:
1488 ; CHECK-NEXT: csrr a0, vlenb
1489 ; CHECK-NEXT: srli a0, a0, 1
1490 ; CHECK-NEXT: addi a0, a0, -7
1491 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1492 ; CHECK-NEXT: vslidedown.vi v8, v8, 7
1493 ; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1494 ; CHECK-NEXT: vslideup.vx v8, v12, a0
1496 %res = call <vscale x 4 x i64> @llvm.experimental.vector.splice.nxv4i64(<vscale x 4 x i64> %a, <vscale x 4 x i64> %b, i32 7)
1497 ret <vscale x 4 x i64> %res
1500 declare <vscale x 8 x i64> @llvm.experimental.vector.splice.nxv8i64(<vscale x 8 x i64>, <vscale x 8 x i64>, i32)
1502 define <vscale x 8 x i64> @splice_nxv8i64_offset_zero(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b) #0 {
1503 ; CHECK-LABEL: splice_nxv8i64_offset_zero:
1506 %res = call <vscale x 8 x i64> @llvm.experimental.vector.splice.nxv8i64(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b, i32 0)
1507 ret <vscale x 8 x i64> %res
1510 define <vscale x 8 x i64> @splice_nxv8i64_offset_negone(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b) #0 {
1511 ; CHECK-LABEL: splice_nxv8i64_offset_negone:
1513 ; CHECK-NEXT: csrr a0, vlenb
1514 ; CHECK-NEXT: addi a0, a0, -1
1515 ; CHECK-NEXT: vsetivli zero, 1, e64, m8, ta, ma
1516 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1517 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1518 ; CHECK-NEXT: vslideup.vi v8, v16, 1
1520 %res = call <vscale x 8 x i64> @llvm.experimental.vector.splice.nxv8i64(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b, i32 -1)
1521 ret <vscale x 8 x i64> %res
1524 define <vscale x 8 x i64> @splice_nxv8i64_offset_min(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b) #0 {
1525 ; CHECK-LABEL: splice_nxv8i64_offset_min:
1527 ; CHECK-NEXT: csrr a0, vlenb
1528 ; CHECK-NEXT: addi a0, a0, -16
1529 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1530 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1531 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
1532 ; CHECK-NEXT: vslideup.vi v8, v16, 16
1534 %res = call <vscale x 8 x i64> @llvm.experimental.vector.splice.nxv8i64(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b, i32 -16)
1535 ret <vscale x 8 x i64> %res
1538 define <vscale x 8 x i64> @splice_nxv8i64_offset_max(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b) #0 {
1539 ; CHECK-LABEL: splice_nxv8i64_offset_max:
1541 ; CHECK-NEXT: csrr a0, vlenb
1542 ; CHECK-NEXT: addi a0, a0, -15
1543 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1544 ; CHECK-NEXT: vslidedown.vi v8, v8, 15
1545 ; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1546 ; CHECK-NEXT: vslideup.vx v8, v16, a0
1548 %res = call <vscale x 8 x i64> @llvm.experimental.vector.splice.nxv8i64(<vscale x 8 x i64> %a, <vscale x 8 x i64> %b, i32 15)
1549 ret <vscale x 8 x i64> %res
1552 declare <vscale x 1 x half> @llvm.experimental.vector.splice.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, i32)
1554 define <vscale x 1 x half> @splice_nxv1f16_offset_zero(<vscale x 1 x half> %a, <vscale x 1 x half> %b) #0 {
1555 ; CHECK-LABEL: splice_nxv1f16_offset_zero:
1558 %res = call <vscale x 1 x half> @llvm.experimental.vector.splice.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, i32 0)
1559 ret <vscale x 1 x half> %res
1562 define <vscale x 1 x half> @splice_nxv1f16_offset_negone(<vscale x 1 x half> %a, <vscale x 1 x half> %b) #0 {
1563 ; CHECK-LABEL: splice_nxv1f16_offset_negone:
1565 ; CHECK-NEXT: csrr a0, vlenb
1566 ; CHECK-NEXT: srli a0, a0, 3
1567 ; CHECK-NEXT: addi a0, a0, -1
1568 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1569 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1570 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1571 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1573 %res = call <vscale x 1 x half> @llvm.experimental.vector.splice.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, i32 -1)
1574 ret <vscale x 1 x half> %res
1577 define <vscale x 1 x half> @splice_nxv1f16_offset_min(<vscale x 1 x half> %a, <vscale x 1 x half> %b) #0 {
1578 ; CHECK-LABEL: splice_nxv1f16_offset_min:
1580 ; CHECK-NEXT: csrr a0, vlenb
1581 ; CHECK-NEXT: srli a0, a0, 3
1582 ; CHECK-NEXT: addi a0, a0, -2
1583 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1584 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1585 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
1586 ; CHECK-NEXT: vslideup.vi v8, v9, 2
1588 %res = call <vscale x 1 x half> @llvm.experimental.vector.splice.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, i32 -2)
1589 ret <vscale x 1 x half> %res
1592 define <vscale x 1 x half> @splice_nxv1f16_offset_max(<vscale x 1 x half> %a, <vscale x 1 x half> %b) #0 {
1593 ; CHECK-LABEL: splice_nxv1f16_offset_max:
1595 ; CHECK-NEXT: csrr a0, vlenb
1596 ; CHECK-NEXT: srli a0, a0, 3
1597 ; CHECK-NEXT: addi a0, a0, -1
1598 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1599 ; CHECK-NEXT: vslidedown.vi v8, v8, 1
1600 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
1601 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1603 %res = call <vscale x 1 x half> @llvm.experimental.vector.splice.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, i32 1)
1604 ret <vscale x 1 x half> %res
1607 declare <vscale x 2 x half> @llvm.experimental.vector.splice.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, i32)
1609 define <vscale x 2 x half> @splice_nxv2f16_offset_zero(<vscale x 2 x half> %a, <vscale x 2 x half> %b) #0 {
1610 ; CHECK-LABEL: splice_nxv2f16_offset_zero:
1613 %res = call <vscale x 2 x half> @llvm.experimental.vector.splice.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, i32 0)
1614 ret <vscale x 2 x half> %res
1617 define <vscale x 2 x half> @splice_nxv2f16_offset_negone(<vscale x 2 x half> %a, <vscale x 2 x half> %b) #0 {
1618 ; CHECK-LABEL: splice_nxv2f16_offset_negone:
1620 ; CHECK-NEXT: csrr a0, vlenb
1621 ; CHECK-NEXT: srli a0, a0, 2
1622 ; CHECK-NEXT: addi a0, a0, -1
1623 ; CHECK-NEXT: vsetivli zero, 1, e16, mf2, ta, ma
1624 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1625 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1626 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1628 %res = call <vscale x 2 x half> @llvm.experimental.vector.splice.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, i32 -1)
1629 ret <vscale x 2 x half> %res
1632 define <vscale x 2 x half> @splice_nxv2f16_offset_min(<vscale x 2 x half> %a, <vscale x 2 x half> %b) #0 {
1633 ; CHECK-LABEL: splice_nxv2f16_offset_min:
1635 ; CHECK-NEXT: csrr a0, vlenb
1636 ; CHECK-NEXT: srli a0, a0, 2
1637 ; CHECK-NEXT: addi a0, a0, -4
1638 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1639 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1640 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1641 ; CHECK-NEXT: vslideup.vi v8, v9, 4
1643 %res = call <vscale x 2 x half> @llvm.experimental.vector.splice.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, i32 -4)
1644 ret <vscale x 2 x half> %res
1647 define <vscale x 2 x half> @splice_nxv2f16_offset_max(<vscale x 2 x half> %a, <vscale x 2 x half> %b) #0 {
1648 ; CHECK-LABEL: splice_nxv2f16_offset_max:
1650 ; CHECK-NEXT: csrr a0, vlenb
1651 ; CHECK-NEXT: srli a0, a0, 2
1652 ; CHECK-NEXT: addi a0, a0, -3
1653 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1654 ; CHECK-NEXT: vslidedown.vi v8, v8, 3
1655 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
1656 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1658 %res = call <vscale x 2 x half> @llvm.experimental.vector.splice.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, i32 3)
1659 ret <vscale x 2 x half> %res
1662 declare <vscale x 4 x half> @llvm.experimental.vector.splice.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, i32)
1664 define <vscale x 4 x half> @splice_nxv4f16_offset_zero(<vscale x 4 x half> %a, <vscale x 4 x half> %b) #0 {
1665 ; CHECK-LABEL: splice_nxv4f16_offset_zero:
1668 %res = call <vscale x 4 x half> @llvm.experimental.vector.splice.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, i32 0)
1669 ret <vscale x 4 x half> %res
1672 define <vscale x 4 x half> @splice_nxv4f16_offset_negone(<vscale x 4 x half> %a, <vscale x 4 x half> %b) #0 {
1673 ; CHECK-LABEL: splice_nxv4f16_offset_negone:
1675 ; CHECK-NEXT: csrr a0, vlenb
1676 ; CHECK-NEXT: srli a0, a0, 1
1677 ; CHECK-NEXT: addi a0, a0, -1
1678 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
1679 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1680 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1681 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1683 %res = call <vscale x 4 x half> @llvm.experimental.vector.splice.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, i32 -1)
1684 ret <vscale x 4 x half> %res
1687 define <vscale x 4 x half> @splice_nxv4f16_offset_min(<vscale x 4 x half> %a, <vscale x 4 x half> %b) #0 {
1688 ; CHECK-LABEL: splice_nxv4f16_offset_min:
1690 ; CHECK-NEXT: csrr a0, vlenb
1691 ; CHECK-NEXT: srli a0, a0, 1
1692 ; CHECK-NEXT: addi a0, a0, -8
1693 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1694 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1695 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
1696 ; CHECK-NEXT: vslideup.vi v8, v9, 8
1698 %res = call <vscale x 4 x half> @llvm.experimental.vector.splice.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, i32 -8)
1699 ret <vscale x 4 x half> %res
1702 define <vscale x 4 x half> @splice_nxv4f16_offset_max(<vscale x 4 x half> %a, <vscale x 4 x half> %b) #0 {
1703 ; CHECK-LABEL: splice_nxv4f16_offset_max:
1705 ; CHECK-NEXT: csrr a0, vlenb
1706 ; CHECK-NEXT: srli a0, a0, 1
1707 ; CHECK-NEXT: addi a0, a0, -7
1708 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1709 ; CHECK-NEXT: vslidedown.vi v8, v8, 7
1710 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
1711 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1713 %res = call <vscale x 4 x half> @llvm.experimental.vector.splice.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, i32 7)
1714 ret <vscale x 4 x half> %res
1717 declare <vscale x 8 x half> @llvm.experimental.vector.splice.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, i32)
1719 define <vscale x 8 x half> @splice_nxv8f16_offset_zero(<vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
1720 ; CHECK-LABEL: splice_nxv8f16_offset_zero:
1723 %res = call <vscale x 8 x half> @llvm.experimental.vector.splice.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, i32 0)
1724 ret <vscale x 8 x half> %res
1727 define <vscale x 8 x half> @splice_nxv8f16_offset_negone(<vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
1728 ; CHECK-LABEL: splice_nxv8f16_offset_negone:
1730 ; CHECK-NEXT: csrr a0, vlenb
1731 ; CHECK-NEXT: addi a0, a0, -1
1732 ; CHECK-NEXT: vsetivli zero, 1, e16, m2, ta, ma
1733 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1734 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1735 ; CHECK-NEXT: vslideup.vi v8, v10, 1
1737 %res = call <vscale x 8 x half> @llvm.experimental.vector.splice.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, i32 -1)
1738 ret <vscale x 8 x half> %res
1741 define <vscale x 8 x half> @splice_nxv8f16_offset_min(<vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
1742 ; CHECK-LABEL: splice_nxv8f16_offset_min:
1744 ; CHECK-NEXT: csrr a0, vlenb
1745 ; CHECK-NEXT: addi a0, a0, -16
1746 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
1747 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1748 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1749 ; CHECK-NEXT: vslideup.vi v8, v10, 16
1751 %res = call <vscale x 8 x half> @llvm.experimental.vector.splice.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, i32 -16)
1752 ret <vscale x 8 x half> %res
1755 define <vscale x 8 x half> @splice_nxv8f16_offset_max(<vscale x 8 x half> %a, <vscale x 8 x half> %b) #0 {
1756 ; CHECK-LABEL: splice_nxv8f16_offset_max:
1758 ; CHECK-NEXT: csrr a0, vlenb
1759 ; CHECK-NEXT: addi a0, a0, -15
1760 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1761 ; CHECK-NEXT: vslidedown.vi v8, v8, 15
1762 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1763 ; CHECK-NEXT: vslideup.vx v8, v10, a0
1765 %res = call <vscale x 8 x half> @llvm.experimental.vector.splice.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, i32 15)
1766 ret <vscale x 8 x half> %res
1769 declare <vscale x 16 x half> @llvm.experimental.vector.splice.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, i32)
1771 define <vscale x 16 x half> @splice_nxv16f16_offset_zero(<vscale x 16 x half> %a, <vscale x 16 x half> %b) #0 {
1772 ; CHECK-LABEL: splice_nxv16f16_offset_zero:
1775 %res = call <vscale x 16 x half> @llvm.experimental.vector.splice.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, i32 0)
1776 ret <vscale x 16 x half> %res
1779 define <vscale x 16 x half> @splice_nxv16f16_offset_negone(<vscale x 16 x half> %a, <vscale x 16 x half> %b) #0 {
1780 ; CHECK-LABEL: splice_nxv16f16_offset_negone:
1782 ; CHECK-NEXT: csrr a0, vlenb
1783 ; CHECK-NEXT: slli a0, a0, 1
1784 ; CHECK-NEXT: addi a0, a0, -1
1785 ; CHECK-NEXT: vsetivli zero, 1, e16, m4, ta, ma
1786 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1787 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1788 ; CHECK-NEXT: vslideup.vi v8, v12, 1
1790 %res = call <vscale x 16 x half> @llvm.experimental.vector.splice.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, i32 -1)
1791 ret <vscale x 16 x half> %res
1794 define <vscale x 16 x half> @splice_nxv16f16_offset_min(<vscale x 16 x half> %a, <vscale x 16 x half> %b) #0 {
1795 ; CHECK-LABEL: splice_nxv16f16_offset_min:
1797 ; CHECK-NEXT: csrr a0, vlenb
1798 ; CHECK-NEXT: slli a0, a0, 1
1799 ; CHECK-NEXT: addi a0, a0, -32
1800 ; CHECK-NEXT: li a1, 32
1801 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
1802 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1803 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1804 ; CHECK-NEXT: vslideup.vx v8, v12, a1
1806 %res = call <vscale x 16 x half> @llvm.experimental.vector.splice.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, i32 -32)
1807 ret <vscale x 16 x half> %res
1810 define <vscale x 16 x half> @splice_nxv16f16_offset_max(<vscale x 16 x half> %a, <vscale x 16 x half> %b) #0 {
1811 ; CHECK-LABEL: splice_nxv16f16_offset_max:
1813 ; CHECK-NEXT: csrr a0, vlenb
1814 ; CHECK-NEXT: slli a0, a0, 1
1815 ; CHECK-NEXT: addi a0, a0, -31
1816 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
1817 ; CHECK-NEXT: vslidedown.vi v8, v8, 31
1818 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
1819 ; CHECK-NEXT: vslideup.vx v8, v12, a0
1821 %res = call <vscale x 16 x half> @llvm.experimental.vector.splice.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, i32 31)
1822 ret <vscale x 16 x half> %res
1825 declare <vscale x 32 x half> @llvm.experimental.vector.splice.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, i32)
1827 define <vscale x 32 x half> @splice_nxv32f16_offset_zero(<vscale x 32 x half> %a, <vscale x 32 x half> %b) #0 {
1828 ; CHECK-LABEL: splice_nxv32f16_offset_zero:
1831 %res = call <vscale x 32 x half> @llvm.experimental.vector.splice.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, i32 0)
1832 ret <vscale x 32 x half> %res
1835 define <vscale x 32 x half> @splice_nxv32f16_offset_negone(<vscale x 32 x half> %a, <vscale x 32 x half> %b) #0 {
1836 ; CHECK-LABEL: splice_nxv32f16_offset_negone:
1838 ; CHECK-NEXT: csrr a0, vlenb
1839 ; CHECK-NEXT: slli a0, a0, 2
1840 ; CHECK-NEXT: addi a0, a0, -1
1841 ; CHECK-NEXT: vsetivli zero, 1, e16, m8, ta, ma
1842 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1843 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1844 ; CHECK-NEXT: vslideup.vi v8, v16, 1
1846 %res = call <vscale x 32 x half> @llvm.experimental.vector.splice.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, i32 -1)
1847 ret <vscale x 32 x half> %res
1850 define <vscale x 32 x half> @splice_nxv32f16_offset_min(<vscale x 32 x half> %a, <vscale x 32 x half> %b) #0 {
1851 ; CHECK-LABEL: splice_nxv32f16_offset_min:
1853 ; CHECK-NEXT: csrr a0, vlenb
1854 ; CHECK-NEXT: slli a0, a0, 2
1855 ; CHECK-NEXT: addi a0, a0, -64
1856 ; CHECK-NEXT: li a1, 64
1857 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
1858 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1859 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
1860 ; CHECK-NEXT: vslideup.vx v8, v16, a1
1862 %res = call <vscale x 32 x half> @llvm.experimental.vector.splice.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, i32 -64)
1863 ret <vscale x 32 x half> %res
1866 define <vscale x 32 x half> @splice_nxv32f16_offset_max(<vscale x 32 x half> %a, <vscale x 32 x half> %b) #0 {
1867 ; CHECK-LABEL: splice_nxv32f16_offset_max:
1869 ; CHECK-NEXT: csrr a0, vlenb
1870 ; CHECK-NEXT: slli a0, a0, 2
1871 ; CHECK-NEXT: addi a0, a0, -63
1872 ; CHECK-NEXT: li a1, 63
1873 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
1874 ; CHECK-NEXT: vslidedown.vx v8, v8, a1
1875 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
1876 ; CHECK-NEXT: vslideup.vx v8, v16, a0
1878 %res = call <vscale x 32 x half> @llvm.experimental.vector.splice.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, i32 63)
1879 ret <vscale x 32 x half> %res
1882 declare <vscale x 1 x float> @llvm.experimental.vector.splice.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, i32)
1884 define <vscale x 1 x float> @splice_nxv1f32_offset_zero(<vscale x 1 x float> %a, <vscale x 1 x float> %b) #0 {
1885 ; CHECK-LABEL: splice_nxv1f32_offset_zero:
1888 %res = call <vscale x 1 x float> @llvm.experimental.vector.splice.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, i32 0)
1889 ret <vscale x 1 x float> %res
1892 define <vscale x 1 x float> @splice_nxv1f32_offset_negone(<vscale x 1 x float> %a, <vscale x 1 x float> %b) #0 {
1893 ; CHECK-LABEL: splice_nxv1f32_offset_negone:
1895 ; CHECK-NEXT: csrr a0, vlenb
1896 ; CHECK-NEXT: srli a0, a0, 3
1897 ; CHECK-NEXT: addi a0, a0, -1
1898 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
1899 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1900 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1901 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1903 %res = call <vscale x 1 x float> @llvm.experimental.vector.splice.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, i32 -1)
1904 ret <vscale x 1 x float> %res
1907 define <vscale x 1 x float> @splice_nxv1f32_offset_min(<vscale x 1 x float> %a, <vscale x 1 x float> %b) #0 {
1908 ; CHECK-LABEL: splice_nxv1f32_offset_min:
1910 ; CHECK-NEXT: csrr a0, vlenb
1911 ; CHECK-NEXT: srli a0, a0, 3
1912 ; CHECK-NEXT: addi a0, a0, -2
1913 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
1914 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1915 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1916 ; CHECK-NEXT: vslideup.vi v8, v9, 2
1918 %res = call <vscale x 1 x float> @llvm.experimental.vector.splice.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, i32 -2)
1919 ret <vscale x 1 x float> %res
1922 define <vscale x 1 x float> @splice_nxv1f32_offset_max(<vscale x 1 x float> %a, <vscale x 1 x float> %b) #0 {
1923 ; CHECK-LABEL: splice_nxv1f32_offset_max:
1925 ; CHECK-NEXT: csrr a0, vlenb
1926 ; CHECK-NEXT: srli a0, a0, 3
1927 ; CHECK-NEXT: addi a0, a0, -1
1928 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1929 ; CHECK-NEXT: vslidedown.vi v8, v8, 1
1930 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
1931 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1933 %res = call <vscale x 1 x float> @llvm.experimental.vector.splice.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, i32 1)
1934 ret <vscale x 1 x float> %res
1937 declare <vscale x 2 x float> @llvm.experimental.vector.splice.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, i32)
1939 define <vscale x 2 x float> @splice_nxv2f32_offset_zero(<vscale x 2 x float> %a, <vscale x 2 x float> %b) #0 {
1940 ; CHECK-LABEL: splice_nxv2f32_offset_zero:
1943 %res = call <vscale x 2 x float> @llvm.experimental.vector.splice.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, i32 0)
1944 ret <vscale x 2 x float> %res
1947 define <vscale x 2 x float> @splice_nxv2f32_offset_negone(<vscale x 2 x float> %a, <vscale x 2 x float> %b) #0 {
1948 ; CHECK-LABEL: splice_nxv2f32_offset_negone:
1950 ; CHECK-NEXT: csrr a0, vlenb
1951 ; CHECK-NEXT: srli a0, a0, 2
1952 ; CHECK-NEXT: addi a0, a0, -1
1953 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
1954 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1955 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1956 ; CHECK-NEXT: vslideup.vi v8, v9, 1
1958 %res = call <vscale x 2 x float> @llvm.experimental.vector.splice.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, i32 -1)
1959 ret <vscale x 2 x float> %res
1962 define <vscale x 2 x float> @splice_nxv2f32_offset_min(<vscale x 2 x float> %a, <vscale x 2 x float> %b) #0 {
1963 ; CHECK-LABEL: splice_nxv2f32_offset_min:
1965 ; CHECK-NEXT: csrr a0, vlenb
1966 ; CHECK-NEXT: srli a0, a0, 2
1967 ; CHECK-NEXT: addi a0, a0, -4
1968 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1969 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
1970 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1971 ; CHECK-NEXT: vslideup.vi v8, v9, 4
1973 %res = call <vscale x 2 x float> @llvm.experimental.vector.splice.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, i32 -4)
1974 ret <vscale x 2 x float> %res
1977 define <vscale x 2 x float> @splice_nxv2f32_offset_max(<vscale x 2 x float> %a, <vscale x 2 x float> %b) #0 {
1978 ; CHECK-LABEL: splice_nxv2f32_offset_max:
1980 ; CHECK-NEXT: csrr a0, vlenb
1981 ; CHECK-NEXT: srli a0, a0, 2
1982 ; CHECK-NEXT: addi a0, a0, -3
1983 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
1984 ; CHECK-NEXT: vslidedown.vi v8, v8, 3
1985 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
1986 ; CHECK-NEXT: vslideup.vx v8, v9, a0
1988 %res = call <vscale x 2 x float> @llvm.experimental.vector.splice.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, i32 3)
1989 ret <vscale x 2 x float> %res
1992 declare <vscale x 4 x float> @llvm.experimental.vector.splice.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, i32)
1994 define <vscale x 4 x float> @splice_nxv4f32_offset_zero(<vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
1995 ; CHECK-LABEL: splice_nxv4f32_offset_zero:
1998 %res = call <vscale x 4 x float> @llvm.experimental.vector.splice.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, i32 0)
1999 ret <vscale x 4 x float> %res
2002 define <vscale x 4 x float> @splice_nxv4f32_offset_negone(<vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
2003 ; CHECK-LABEL: splice_nxv4f32_offset_negone:
2005 ; CHECK-NEXT: csrr a0, vlenb
2006 ; CHECK-NEXT: srli a0, a0, 1
2007 ; CHECK-NEXT: addi a0, a0, -1
2008 ; CHECK-NEXT: vsetivli zero, 1, e32, m2, ta, ma
2009 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2010 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
2011 ; CHECK-NEXT: vslideup.vi v8, v10, 1
2013 %res = call <vscale x 4 x float> @llvm.experimental.vector.splice.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, i32 -1)
2014 ret <vscale x 4 x float> %res
2017 define <vscale x 4 x float> @splice_nxv4f32_offset_min(<vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
2018 ; CHECK-LABEL: splice_nxv4f32_offset_min:
2020 ; CHECK-NEXT: csrr a0, vlenb
2021 ; CHECK-NEXT: srli a0, a0, 1
2022 ; CHECK-NEXT: addi a0, a0, -8
2023 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
2024 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2025 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
2026 ; CHECK-NEXT: vslideup.vi v8, v10, 8
2028 %res = call <vscale x 4 x float> @llvm.experimental.vector.splice.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, i32 -8)
2029 ret <vscale x 4 x float> %res
2032 define <vscale x 4 x float> @splice_nxv4f32_offset_max(<vscale x 4 x float> %a, <vscale x 4 x float> %b) #0 {
2033 ; CHECK-LABEL: splice_nxv4f32_offset_max:
2035 ; CHECK-NEXT: csrr a0, vlenb
2036 ; CHECK-NEXT: srli a0, a0, 1
2037 ; CHECK-NEXT: addi a0, a0, -7
2038 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
2039 ; CHECK-NEXT: vslidedown.vi v8, v8, 7
2040 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
2041 ; CHECK-NEXT: vslideup.vx v8, v10, a0
2043 %res = call <vscale x 4 x float> @llvm.experimental.vector.splice.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, i32 7)
2044 ret <vscale x 4 x float> %res
2047 declare <vscale x 8 x float> @llvm.experimental.vector.splice.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, i32)
2049 define <vscale x 8 x float> @splice_nxv8f32_offset_zero(<vscale x 8 x float> %a, <vscale x 8 x float> %b) #0 {
2050 ; CHECK-LABEL: splice_nxv8f32_offset_zero:
2053 %res = call <vscale x 8 x float> @llvm.experimental.vector.splice.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, i32 0)
2054 ret <vscale x 8 x float> %res
2057 define <vscale x 8 x float> @splice_nxv8f32_offset_negone(<vscale x 8 x float> %a, <vscale x 8 x float> %b) #0 {
2058 ; CHECK-LABEL: splice_nxv8f32_offset_negone:
2060 ; CHECK-NEXT: csrr a0, vlenb
2061 ; CHECK-NEXT: addi a0, a0, -1
2062 ; CHECK-NEXT: vsetivli zero, 1, e32, m4, ta, ma
2063 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2064 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2065 ; CHECK-NEXT: vslideup.vi v8, v12, 1
2067 %res = call <vscale x 8 x float> @llvm.experimental.vector.splice.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, i32 -1)
2068 ret <vscale x 8 x float> %res
2071 define <vscale x 8 x float> @splice_nxv8f32_offset_min(<vscale x 8 x float> %a, <vscale x 8 x float> %b) #0 {
2072 ; CHECK-LABEL: splice_nxv8f32_offset_min:
2074 ; CHECK-NEXT: csrr a0, vlenb
2075 ; CHECK-NEXT: addi a0, a0, -16
2076 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
2077 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2078 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2079 ; CHECK-NEXT: vslideup.vi v8, v12, 16
2081 %res = call <vscale x 8 x float> @llvm.experimental.vector.splice.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, i32 -16)
2082 ret <vscale x 8 x float> %res
2085 define <vscale x 8 x float> @splice_nxv8f32_offset_max(<vscale x 8 x float> %a, <vscale x 8 x float> %b) #0 {
2086 ; CHECK-LABEL: splice_nxv8f32_offset_max:
2088 ; CHECK-NEXT: csrr a0, vlenb
2089 ; CHECK-NEXT: addi a0, a0, -15
2090 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2091 ; CHECK-NEXT: vslidedown.vi v8, v8, 15
2092 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2093 ; CHECK-NEXT: vslideup.vx v8, v12, a0
2095 %res = call <vscale x 8 x float> @llvm.experimental.vector.splice.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, i32 15)
2096 ret <vscale x 8 x float> %res
2099 declare <vscale x 16 x float> @llvm.experimental.vector.splice.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, i32)
2101 define <vscale x 16 x float> @splice_nxv16f32_offset_zero(<vscale x 16 x float> %a, <vscale x 16 x float> %b) #0 {
2102 ; CHECK-LABEL: splice_nxv16f32_offset_zero:
2105 %res = call <vscale x 16 x float> @llvm.experimental.vector.splice.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, i32 0)
2106 ret <vscale x 16 x float> %res
2109 define <vscale x 16 x float> @splice_nxv16f32_offset_negone(<vscale x 16 x float> %a, <vscale x 16 x float> %b) #0 {
2110 ; CHECK-LABEL: splice_nxv16f32_offset_negone:
2112 ; CHECK-NEXT: csrr a0, vlenb
2113 ; CHECK-NEXT: slli a0, a0, 1
2114 ; CHECK-NEXT: addi a0, a0, -1
2115 ; CHECK-NEXT: vsetivli zero, 1, e32, m8, ta, ma
2116 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2117 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
2118 ; CHECK-NEXT: vslideup.vi v8, v16, 1
2120 %res = call <vscale x 16 x float> @llvm.experimental.vector.splice.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, i32 -1)
2121 ret <vscale x 16 x float> %res
2124 define <vscale x 16 x float> @splice_nxv16f32_offset_min(<vscale x 16 x float> %a, <vscale x 16 x float> %b) #0 {
2125 ; CHECK-LABEL: splice_nxv16f32_offset_min:
2127 ; CHECK-NEXT: csrr a0, vlenb
2128 ; CHECK-NEXT: slli a0, a0, 1
2129 ; CHECK-NEXT: addi a0, a0, -32
2130 ; CHECK-NEXT: li a1, 32
2131 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
2132 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2133 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
2134 ; CHECK-NEXT: vslideup.vx v8, v16, a1
2136 %res = call <vscale x 16 x float> @llvm.experimental.vector.splice.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, i32 -32)
2137 ret <vscale x 16 x float> %res
2140 define <vscale x 16 x float> @splice_nxv16f32_offset_max(<vscale x 16 x float> %a, <vscale x 16 x float> %b) #0 {
2141 ; CHECK-LABEL: splice_nxv16f32_offset_max:
2143 ; CHECK-NEXT: csrr a0, vlenb
2144 ; CHECK-NEXT: slli a0, a0, 1
2145 ; CHECK-NEXT: addi a0, a0, -31
2146 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
2147 ; CHECK-NEXT: vslidedown.vi v8, v8, 31
2148 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
2149 ; CHECK-NEXT: vslideup.vx v8, v16, a0
2151 %res = call <vscale x 16 x float> @llvm.experimental.vector.splice.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, i32 31)
2152 ret <vscale x 16 x float> %res
2155 declare <vscale x 1 x double> @llvm.experimental.vector.splice.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, i32)
2157 define <vscale x 1 x double> @splice_nxv1f64_offset_zero(<vscale x 1 x double> %a, <vscale x 1 x double> %b) #0 {
2158 ; CHECK-LABEL: splice_nxv1f64_offset_zero:
2161 %res = call <vscale x 1 x double> @llvm.experimental.vector.splice.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, i32 0)
2162 ret <vscale x 1 x double> %res
2165 define <vscale x 1 x double> @splice_nxv1f64_offset_negone(<vscale x 1 x double> %a, <vscale x 1 x double> %b) #0 {
2166 ; CHECK-LABEL: splice_nxv1f64_offset_negone:
2168 ; CHECK-NEXT: csrr a0, vlenb
2169 ; CHECK-NEXT: srli a0, a0, 3
2170 ; CHECK-NEXT: addi a0, a0, -1
2171 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
2172 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2173 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
2174 ; CHECK-NEXT: vslideup.vi v8, v9, 1
2176 %res = call <vscale x 1 x double> @llvm.experimental.vector.splice.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, i32 -1)
2177 ret <vscale x 1 x double> %res
2180 define <vscale x 1 x double> @splice_nxv1f64_offset_min(<vscale x 1 x double> %a, <vscale x 1 x double> %b) #0 {
2181 ; CHECK-LABEL: splice_nxv1f64_offset_min:
2183 ; CHECK-NEXT: csrr a0, vlenb
2184 ; CHECK-NEXT: srli a0, a0, 3
2185 ; CHECK-NEXT: addi a0, a0, -2
2186 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
2187 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2188 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
2189 ; CHECK-NEXT: vslideup.vi v8, v9, 2
2191 %res = call <vscale x 1 x double> @llvm.experimental.vector.splice.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, i32 -2)
2192 ret <vscale x 1 x double> %res
2195 define <vscale x 1 x double> @splice_nxv1f64_offset_max(<vscale x 1 x double> %a, <vscale x 1 x double> %b) #0 {
2196 ; CHECK-LABEL: splice_nxv1f64_offset_max:
2198 ; CHECK-NEXT: csrr a0, vlenb
2199 ; CHECK-NEXT: srli a0, a0, 3
2200 ; CHECK-NEXT: addi a0, a0, -1
2201 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2202 ; CHECK-NEXT: vslidedown.vi v8, v8, 1
2203 ; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2204 ; CHECK-NEXT: vslideup.vx v8, v9, a0
2206 %res = call <vscale x 1 x double> @llvm.experimental.vector.splice.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, i32 1)
2207 ret <vscale x 1 x double> %res
2210 declare <vscale x 2 x double> @llvm.experimental.vector.splice.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, i32)
2212 define <vscale x 2 x double> @splice_nxv2f64_offset_zero(<vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
2213 ; CHECK-LABEL: splice_nxv2f64_offset_zero:
2216 %res = call <vscale x 2 x double> @llvm.experimental.vector.splice.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 0)
2217 ret <vscale x 2 x double> %res
2220 define <vscale x 2 x double> @splice_nxv2f64_offset_negone(<vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
2221 ; CHECK-LABEL: splice_nxv2f64_offset_negone:
2223 ; CHECK-NEXT: csrr a0, vlenb
2224 ; CHECK-NEXT: srli a0, a0, 2
2225 ; CHECK-NEXT: addi a0, a0, -1
2226 ; CHECK-NEXT: vsetivli zero, 1, e64, m2, ta, ma
2227 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2228 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
2229 ; CHECK-NEXT: vslideup.vi v8, v10, 1
2231 %res = call <vscale x 2 x double> @llvm.experimental.vector.splice.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 -1)
2232 ret <vscale x 2 x double> %res
2235 define <vscale x 2 x double> @splice_nxv2f64_offset_min(<vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
2236 ; CHECK-LABEL: splice_nxv2f64_offset_min:
2238 ; CHECK-NEXT: csrr a0, vlenb
2239 ; CHECK-NEXT: srli a0, a0, 2
2240 ; CHECK-NEXT: addi a0, a0, -4
2241 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
2242 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2243 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
2244 ; CHECK-NEXT: vslideup.vi v8, v10, 4
2246 %res = call <vscale x 2 x double> @llvm.experimental.vector.splice.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 -4)
2247 ret <vscale x 2 x double> %res
2250 define <vscale x 2 x double> @splice_nxv2f64_offset_max(<vscale x 2 x double> %a, <vscale x 2 x double> %b) #0 {
2251 ; CHECK-LABEL: splice_nxv2f64_offset_max:
2253 ; CHECK-NEXT: csrr a0, vlenb
2254 ; CHECK-NEXT: srli a0, a0, 2
2255 ; CHECK-NEXT: addi a0, a0, -3
2256 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
2257 ; CHECK-NEXT: vslidedown.vi v8, v8, 3
2258 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
2259 ; CHECK-NEXT: vslideup.vx v8, v10, a0
2261 %res = call <vscale x 2 x double> @llvm.experimental.vector.splice.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 3)
2262 ret <vscale x 2 x double> %res
2265 declare <vscale x 4 x double> @llvm.experimental.vector.splice.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, i32)
2267 define <vscale x 4 x double> @splice_nxv4f64_offset_zero(<vscale x 4 x double> %a, <vscale x 4 x double> %b) #0 {
2268 ; CHECK-LABEL: splice_nxv4f64_offset_zero:
2271 %res = call <vscale x 4 x double> @llvm.experimental.vector.splice.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, i32 0)
2272 ret <vscale x 4 x double> %res
2275 define <vscale x 4 x double> @splice_nxv4f64_offset_negone(<vscale x 4 x double> %a, <vscale x 4 x double> %b) #0 {
2276 ; CHECK-LABEL: splice_nxv4f64_offset_negone:
2278 ; CHECK-NEXT: csrr a0, vlenb
2279 ; CHECK-NEXT: srli a0, a0, 1
2280 ; CHECK-NEXT: addi a0, a0, -1
2281 ; CHECK-NEXT: vsetivli zero, 1, e64, m4, ta, ma
2282 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2283 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
2284 ; CHECK-NEXT: vslideup.vi v8, v12, 1
2286 %res = call <vscale x 4 x double> @llvm.experimental.vector.splice.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, i32 -1)
2287 ret <vscale x 4 x double> %res
2290 define <vscale x 4 x double> @splice_nxv4f64_offset_min(<vscale x 4 x double> %a, <vscale x 4 x double> %b) #0 {
2291 ; CHECK-LABEL: splice_nxv4f64_offset_min:
2293 ; CHECK-NEXT: csrr a0, vlenb
2294 ; CHECK-NEXT: srli a0, a0, 1
2295 ; CHECK-NEXT: addi a0, a0, -8
2296 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2297 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2298 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
2299 ; CHECK-NEXT: vslideup.vi v8, v12, 8
2301 %res = call <vscale x 4 x double> @llvm.experimental.vector.splice.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, i32 -8)
2302 ret <vscale x 4 x double> %res
2305 define <vscale x 4 x double> @splice_nxv4f64_offset_max(<vscale x 4 x double> %a, <vscale x 4 x double> %b) #0 {
2306 ; CHECK-LABEL: splice_nxv4f64_offset_max:
2308 ; CHECK-NEXT: csrr a0, vlenb
2309 ; CHECK-NEXT: srli a0, a0, 1
2310 ; CHECK-NEXT: addi a0, a0, -7
2311 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2312 ; CHECK-NEXT: vslidedown.vi v8, v8, 7
2313 ; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma
2314 ; CHECK-NEXT: vslideup.vx v8, v12, a0
2316 %res = call <vscale x 4 x double> @llvm.experimental.vector.splice.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, i32 7)
2317 ret <vscale x 4 x double> %res
2320 declare <vscale x 8 x double> @llvm.experimental.vector.splice.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, i32)
2322 define <vscale x 8 x double> @splice_nxv8f64_offset_zero(<vscale x 8 x double> %a, <vscale x 8 x double> %b) #0 {
2323 ; CHECK-LABEL: splice_nxv8f64_offset_zero:
2326 %res = call <vscale x 8 x double> @llvm.experimental.vector.splice.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, i32 0)
2327 ret <vscale x 8 x double> %res
2330 define <vscale x 8 x double> @splice_nxv8f64_offset_negone(<vscale x 8 x double> %a, <vscale x 8 x double> %b) #0 {
2331 ; CHECK-LABEL: splice_nxv8f64_offset_negone:
2333 ; CHECK-NEXT: csrr a0, vlenb
2334 ; CHECK-NEXT: addi a0, a0, -1
2335 ; CHECK-NEXT: vsetivli zero, 1, e64, m8, ta, ma
2336 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2337 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2338 ; CHECK-NEXT: vslideup.vi v8, v16, 1
2340 %res = call <vscale x 8 x double> @llvm.experimental.vector.splice.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, i32 -1)
2341 ret <vscale x 8 x double> %res
2344 define <vscale x 8 x double> @splice_nxv8f64_offset_min(<vscale x 8 x double> %a, <vscale x 8 x double> %b) #0 {
2345 ; CHECK-LABEL: splice_nxv8f64_offset_min:
2347 ; CHECK-NEXT: csrr a0, vlenb
2348 ; CHECK-NEXT: addi a0, a0, -16
2349 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
2350 ; CHECK-NEXT: vslidedown.vx v8, v8, a0
2351 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2352 ; CHECK-NEXT: vslideup.vi v8, v16, 16
2354 %res = call <vscale x 8 x double> @llvm.experimental.vector.splice.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, i32 -16)
2355 ret <vscale x 8 x double> %res
2358 define <vscale x 8 x double> @splice_nxv8f64_offset_max(<vscale x 8 x double> %a, <vscale x 8 x double> %b) #0 {
2359 ; CHECK-LABEL: splice_nxv8f64_offset_max:
2361 ; CHECK-NEXT: csrr a0, vlenb
2362 ; CHECK-NEXT: addi a0, a0, -15
2363 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
2364 ; CHECK-NEXT: vslidedown.vi v8, v8, 15
2365 ; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2366 ; CHECK-NEXT: vslideup.vx v8, v16, a0
2368 %res = call <vscale x 8 x double> @llvm.experimental.vector.splice.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, i32 15)
2369 ret <vscale x 8 x double> %res
2372 attributes #0 = { vscale_range(2,0) }