1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=riscv32 -mattr=+v,+zvfh -verify-machineinstrs < %s | FileCheck %s -check-prefixes=CHECK,RV32
3 ; RUN: llc -mtriple=riscv64 -mattr=+v,+zvfh -verify-machineinstrs < %s | FileCheck %s -check-prefixes=CHECK,RV64
4 ; RUN: llc -mtriple=riscv32 -mattr=+v,+zvfh,+zvkb -verify-machineinstrs < %s | FileCheck %s -check-prefixes=ZVKB-V
5 ; RUN: llc -mtriple=riscv64 -mattr=+v,+zvfh,+zvkb -verify-machineinstrs < %s | FileCheck %s -check-prefixes=ZVKB-V
6 ; RUN: llc -mtriple=riscv32 -mattr=+zve32x,+zvfh,+zvkb -verify-machineinstrs < %s | FileCheck %s -check-prefixes=ZVKB-ZVE32X
7 ; RUN: llc -mtriple=riscv64 -mattr=+zve32x,+zvfh,+zvkb -verify-machineinstrs < %s | FileCheck %s -check-prefixes=ZVKB-ZVE32X
9 define <8 x i1> @shuffle_v8i1_as_i8_1(<8 x i1> %v) {
10 ; CHECK-LABEL: shuffle_v8i1_as_i8_1:
12 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
13 ; CHECK-NEXT: vsrl.vi v8, v0, 1
14 ; CHECK-NEXT: vsll.vi v9, v0, 7
15 ; CHECK-NEXT: vor.vv v0, v9, v8
18 ; ZVKB-V-LABEL: shuffle_v8i1_as_i8_1:
20 ; ZVKB-V-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
21 ; ZVKB-V-NEXT: vror.vi v0, v0, 1
24 ; ZVKB-ZVE32X-LABEL: shuffle_v8i1_as_i8_1:
25 ; ZVKB-ZVE32X: # %bb.0:
26 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
27 ; ZVKB-ZVE32X-NEXT: vror.vi v0, v0, 1
28 ; ZVKB-ZVE32X-NEXT: ret
29 %shuffle = shufflevector <8 x i1> %v, <8 x i1> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0>
33 define <8 x i1> @shuffle_v8i1_as_i8_2(<8 x i1> %v) {
34 ; CHECK-LABEL: shuffle_v8i1_as_i8_2:
36 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
37 ; CHECK-NEXT: vsrl.vi v8, v0, 2
38 ; CHECK-NEXT: vsll.vi v9, v0, 6
39 ; CHECK-NEXT: vor.vv v0, v9, v8
42 ; ZVKB-V-LABEL: shuffle_v8i1_as_i8_2:
44 ; ZVKB-V-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
45 ; ZVKB-V-NEXT: vror.vi v0, v0, 2
48 ; ZVKB-ZVE32X-LABEL: shuffle_v8i1_as_i8_2:
49 ; ZVKB-ZVE32X: # %bb.0:
50 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
51 ; ZVKB-ZVE32X-NEXT: vror.vi v0, v0, 2
52 ; ZVKB-ZVE32X-NEXT: ret
53 %shuffle = shufflevector <8 x i1> %v, <8 x i1> poison, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1>
57 define <8 x i1> @shuffle_v8i1_as_i8_3(<8 x i1> %v) {
58 ; CHECK-LABEL: shuffle_v8i1_as_i8_3:
60 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
61 ; CHECK-NEXT: vsrl.vi v8, v0, 3
62 ; CHECK-NEXT: vsll.vi v9, v0, 5
63 ; CHECK-NEXT: vor.vv v0, v9, v8
66 ; ZVKB-V-LABEL: shuffle_v8i1_as_i8_3:
68 ; ZVKB-V-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
69 ; ZVKB-V-NEXT: vror.vi v0, v0, 3
72 ; ZVKB-ZVE32X-LABEL: shuffle_v8i1_as_i8_3:
73 ; ZVKB-ZVE32X: # %bb.0:
74 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
75 ; ZVKB-ZVE32X-NEXT: vror.vi v0, v0, 3
76 ; ZVKB-ZVE32X-NEXT: ret
77 %shuffle = shufflevector <8 x i1> %v, <8 x i1> poison, <8 x i32> <i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2>
81 define <8 x i1> @shuffle_v8i1_as_i8_4(<8 x i1> %v) {
82 ; CHECK-LABEL: shuffle_v8i1_as_i8_4:
84 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
85 ; CHECK-NEXT: vsrl.vi v8, v0, 4
86 ; CHECK-NEXT: vsll.vi v9, v0, 4
87 ; CHECK-NEXT: vor.vv v0, v9, v8
90 ; ZVKB-V-LABEL: shuffle_v8i1_as_i8_4:
92 ; ZVKB-V-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
93 ; ZVKB-V-NEXT: vror.vi v0, v0, 4
96 ; ZVKB-ZVE32X-LABEL: shuffle_v8i1_as_i8_4:
97 ; ZVKB-ZVE32X: # %bb.0:
98 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
99 ; ZVKB-ZVE32X-NEXT: vror.vi v0, v0, 4
100 ; ZVKB-ZVE32X-NEXT: ret
101 %shuffle = shufflevector <8 x i1> %v, <8 x i1> poison, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
102 ret <8 x i1> %shuffle
105 define <8 x i1> @shuffle_v8i1_as_i8_5(<8 x i1> %v) {
106 ; CHECK-LABEL: shuffle_v8i1_as_i8_5:
108 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
109 ; CHECK-NEXT: vsrl.vi v8, v0, 5
110 ; CHECK-NEXT: vsll.vi v9, v0, 3
111 ; CHECK-NEXT: vor.vv v0, v9, v8
114 ; ZVKB-V-LABEL: shuffle_v8i1_as_i8_5:
116 ; ZVKB-V-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
117 ; ZVKB-V-NEXT: vror.vi v0, v0, 5
120 ; ZVKB-ZVE32X-LABEL: shuffle_v8i1_as_i8_5:
121 ; ZVKB-ZVE32X: # %bb.0:
122 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
123 ; ZVKB-ZVE32X-NEXT: vror.vi v0, v0, 5
124 ; ZVKB-ZVE32X-NEXT: ret
125 %shuffle = shufflevector <8 x i1> %v, <8 x i1> poison, <8 x i32> <i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4>
126 ret <8 x i1> %shuffle
129 define <8 x i1> @shuffle_v8i1_as_i8_6(<8 x i1> %v) {
130 ; CHECK-LABEL: shuffle_v8i1_as_i8_6:
132 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
133 ; CHECK-NEXT: vsrl.vi v8, v0, 6
134 ; CHECK-NEXT: vsll.vi v9, v0, 2
135 ; CHECK-NEXT: vor.vv v0, v9, v8
138 ; ZVKB-V-LABEL: shuffle_v8i1_as_i8_6:
140 ; ZVKB-V-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
141 ; ZVKB-V-NEXT: vror.vi v0, v0, 6
144 ; ZVKB-ZVE32X-LABEL: shuffle_v8i1_as_i8_6:
145 ; ZVKB-ZVE32X: # %bb.0:
146 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
147 ; ZVKB-ZVE32X-NEXT: vror.vi v0, v0, 6
148 ; ZVKB-ZVE32X-NEXT: ret
149 %shuffle = shufflevector <8 x i1> %v, <8 x i1> poison, <8 x i32> <i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5>
150 ret <8 x i1> %shuffle
153 define <8 x i1> @shuffle_v8i1_as_i8_7(<8 x i1> %v) {
154 ; CHECK-LABEL: shuffle_v8i1_as_i8_7:
156 ; CHECK-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
157 ; CHECK-NEXT: vsrl.vi v8, v0, 7
158 ; CHECK-NEXT: vadd.vv v9, v0, v0
159 ; CHECK-NEXT: vor.vv v0, v9, v8
162 ; ZVKB-V-LABEL: shuffle_v8i1_as_i8_7:
164 ; ZVKB-V-NEXT: vsetivli zero, 1, e8, mf8, ta, ma
165 ; ZVKB-V-NEXT: vror.vi v0, v0, 7
168 ; ZVKB-ZVE32X-LABEL: shuffle_v8i1_as_i8_7:
169 ; ZVKB-ZVE32X: # %bb.0:
170 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 1, e8, mf4, ta, ma
171 ; ZVKB-ZVE32X-NEXT: vror.vi v0, v0, 7
172 ; ZVKB-ZVE32X-NEXT: ret
173 %shuffle = shufflevector <8 x i1> %v, <8 x i1> poison, <8 x i32> <i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6>
174 ret <8 x i1> %shuffle
177 define <8 x i8> @shuffle_v8i8_as_i16(<8 x i8> %v) {
178 ; CHECK-LABEL: shuffle_v8i8_as_i16:
180 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
181 ; CHECK-NEXT: vsrl.vi v9, v8, 8
182 ; CHECK-NEXT: vsll.vi v8, v8, 8
183 ; CHECK-NEXT: vor.vv v8, v8, v9
186 ; ZVKB-V-LABEL: shuffle_v8i8_as_i16:
188 ; ZVKB-V-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
189 ; ZVKB-V-NEXT: vrev8.v v8, v8
192 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i16:
193 ; ZVKB-ZVE32X: # %bb.0:
194 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 4, e16, m2, ta, ma
195 ; ZVKB-ZVE32X-NEXT: vrev8.v v8, v8
196 ; ZVKB-ZVE32X-NEXT: ret
197 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
198 ret <8 x i8> %shuffle
201 define <8 x i8> @shuffle_v8i8_as_i32_8(<8 x i8> %v) {
202 ; CHECK-LABEL: shuffle_v8i8_as_i32_8:
204 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
205 ; CHECK-NEXT: vsrl.vi v9, v8, 8
206 ; CHECK-NEXT: vsll.vi v8, v8, 24
207 ; CHECK-NEXT: vor.vv v8, v8, v9
210 ; ZVKB-V-LABEL: shuffle_v8i8_as_i32_8:
212 ; ZVKB-V-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
213 ; ZVKB-V-NEXT: vror.vi v8, v8, 8
216 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i32_8:
217 ; ZVKB-ZVE32X: # %bb.0:
218 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 2, e32, m2, ta, ma
219 ; ZVKB-ZVE32X-NEXT: vror.vi v8, v8, 8
220 ; ZVKB-ZVE32X-NEXT: ret
221 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 0, i32 5, i32 6, i32 7, i32 4>
222 ret <8 x i8> %shuffle
225 define <8 x i8> @shuffle_v8i8_as_i32_16(<8 x i8> %v) {
226 ; CHECK-LABEL: shuffle_v8i8_as_i32_16:
228 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
229 ; CHECK-NEXT: vsrl.vi v9, v8, 16
230 ; CHECK-NEXT: vsll.vi v8, v8, 16
231 ; CHECK-NEXT: vor.vv v8, v8, v9
234 ; ZVKB-V-LABEL: shuffle_v8i8_as_i32_16:
236 ; ZVKB-V-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
237 ; ZVKB-V-NEXT: vror.vi v8, v8, 16
240 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i32_16:
241 ; ZVKB-ZVE32X: # %bb.0:
242 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 2, e32, m2, ta, ma
243 ; ZVKB-ZVE32X-NEXT: vror.vi v8, v8, 16
244 ; ZVKB-ZVE32X-NEXT: ret
245 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 6, i32 7, i32 4, i32 5>
246 ret <8 x i8> %shuffle
249 define <8 x i8> @shuffle_v8i8_as_i32_24(<8 x i8> %v) {
250 ; CHECK-LABEL: shuffle_v8i8_as_i32_24:
252 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
253 ; CHECK-NEXT: vsrl.vi v9, v8, 24
254 ; CHECK-NEXT: vsll.vi v8, v8, 8
255 ; CHECK-NEXT: vor.vv v8, v8, v9
258 ; ZVKB-V-LABEL: shuffle_v8i8_as_i32_24:
260 ; ZVKB-V-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
261 ; ZVKB-V-NEXT: vror.vi v8, v8, 24
264 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i32_24:
265 ; ZVKB-ZVE32X: # %bb.0:
266 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 2, e32, m2, ta, ma
267 ; ZVKB-ZVE32X-NEXT: vror.vi v8, v8, 24
268 ; ZVKB-ZVE32X-NEXT: ret
269 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 3, i32 0, i32 1, i32 2, i32 7, i32 4, i32 5, i32 6>
270 ret <8 x i8> %shuffle
273 define <8 x i8> @shuffle_v8i8_as_i64_8(<8 x i8> %v) {
274 ; CHECK-LABEL: shuffle_v8i8_as_i64_8:
276 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
277 ; CHECK-NEXT: vslidedown.vi v9, v8, 1
278 ; CHECK-NEXT: vslideup.vi v9, v8, 7
279 ; CHECK-NEXT: vmv1r.v v8, v9
282 ; ZVKB-V-LABEL: shuffle_v8i8_as_i64_8:
284 ; ZVKB-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma
285 ; ZVKB-V-NEXT: vror.vi v8, v8, 8
288 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i64_8:
289 ; ZVKB-ZVE32X: # %bb.0:
290 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e8, m2, ta, ma
291 ; ZVKB-ZVE32X-NEXT: vslidedown.vi v10, v8, 1
292 ; ZVKB-ZVE32X-NEXT: vslideup.vi v10, v8, 7
293 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v10
294 ; ZVKB-ZVE32X-NEXT: ret
295 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0>
296 ret <8 x i8> %shuffle
299 define <8 x i8> @shuffle_v8i8_as_i64_16(<8 x i8> %v) {
300 ; CHECK-LABEL: shuffle_v8i8_as_i64_16:
302 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
303 ; CHECK-NEXT: vslidedown.vi v9, v8, 2
304 ; CHECK-NEXT: vslideup.vi v9, v8, 6
305 ; CHECK-NEXT: vmv1r.v v8, v9
308 ; ZVKB-V-LABEL: shuffle_v8i8_as_i64_16:
310 ; ZVKB-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma
311 ; ZVKB-V-NEXT: vror.vi v8, v8, 16
314 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i64_16:
315 ; ZVKB-ZVE32X: # %bb.0:
316 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e8, m2, ta, ma
317 ; ZVKB-ZVE32X-NEXT: vslidedown.vi v10, v8, 2
318 ; ZVKB-ZVE32X-NEXT: vslideup.vi v10, v8, 6
319 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v10
320 ; ZVKB-ZVE32X-NEXT: ret
321 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1>
322 ret <8 x i8> %shuffle
325 define <8 x i8> @shuffle_v8i8_as_i64_24(<8 x i8> %v) {
326 ; CHECK-LABEL: shuffle_v8i8_as_i64_24:
328 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
329 ; CHECK-NEXT: vslidedown.vi v9, v8, 3
330 ; CHECK-NEXT: vslideup.vi v9, v8, 5
331 ; CHECK-NEXT: vmv1r.v v8, v9
334 ; ZVKB-V-LABEL: shuffle_v8i8_as_i64_24:
336 ; ZVKB-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma
337 ; ZVKB-V-NEXT: vror.vi v8, v8, 24
340 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i64_24:
341 ; ZVKB-ZVE32X: # %bb.0:
342 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e8, m2, ta, ma
343 ; ZVKB-ZVE32X-NEXT: vslidedown.vi v10, v8, 3
344 ; ZVKB-ZVE32X-NEXT: vslideup.vi v10, v8, 5
345 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v10
346 ; ZVKB-ZVE32X-NEXT: ret
347 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2>
348 ret <8 x i8> %shuffle
351 define <8 x i8> @shuffle_v8i8_as_i64_32(<8 x i8> %v) {
352 ; CHECK-LABEL: shuffle_v8i8_as_i64_32:
354 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
355 ; CHECK-NEXT: vslidedown.vi v9, v8, 4
356 ; CHECK-NEXT: vslideup.vi v9, v8, 4
357 ; CHECK-NEXT: vmv1r.v v8, v9
360 ; ZVKB-V-LABEL: shuffle_v8i8_as_i64_32:
362 ; ZVKB-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma
363 ; ZVKB-V-NEXT: vror.vi v8, v8, 32
366 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i64_32:
367 ; ZVKB-ZVE32X: # %bb.0:
368 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e8, m2, ta, ma
369 ; ZVKB-ZVE32X-NEXT: vslidedown.vi v10, v8, 4
370 ; ZVKB-ZVE32X-NEXT: vslideup.vi v10, v8, 4
371 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v10
372 ; ZVKB-ZVE32X-NEXT: ret
373 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
374 ret <8 x i8> %shuffle
377 define <8 x i8> @shuffle_v8i8_as_i64_40(<8 x i8> %v) {
378 ; CHECK-LABEL: shuffle_v8i8_as_i64_40:
380 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
381 ; CHECK-NEXT: vslidedown.vi v9, v8, 5
382 ; CHECK-NEXT: vslideup.vi v9, v8, 3
383 ; CHECK-NEXT: vmv1r.v v8, v9
386 ; ZVKB-V-LABEL: shuffle_v8i8_as_i64_40:
388 ; ZVKB-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma
389 ; ZVKB-V-NEXT: vror.vi v8, v8, 40
392 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i64_40:
393 ; ZVKB-ZVE32X: # %bb.0:
394 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e8, m2, ta, ma
395 ; ZVKB-ZVE32X-NEXT: vslidedown.vi v10, v8, 5
396 ; ZVKB-ZVE32X-NEXT: vslideup.vi v10, v8, 3
397 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v10
398 ; ZVKB-ZVE32X-NEXT: ret
399 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4>
400 ret <8 x i8> %shuffle
403 define <8 x i8> @shuffle_v8i8_as_i64_48(<8 x i8> %v) {
404 ; CHECK-LABEL: shuffle_v8i8_as_i64_48:
406 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
407 ; CHECK-NEXT: vslidedown.vi v9, v8, 6
408 ; CHECK-NEXT: vslideup.vi v9, v8, 2
409 ; CHECK-NEXT: vmv1r.v v8, v9
412 ; ZVKB-V-LABEL: shuffle_v8i8_as_i64_48:
414 ; ZVKB-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma
415 ; ZVKB-V-NEXT: vror.vi v8, v8, 48
418 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i64_48:
419 ; ZVKB-ZVE32X: # %bb.0:
420 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e8, m2, ta, ma
421 ; ZVKB-ZVE32X-NEXT: vslidedown.vi v10, v8, 6
422 ; ZVKB-ZVE32X-NEXT: vslideup.vi v10, v8, 2
423 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v10
424 ; ZVKB-ZVE32X-NEXT: ret
425 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5>
426 ret <8 x i8> %shuffle
429 define <8 x i8> @shuffle_v8i8_as_i64_56(<8 x i8> %v) {
430 ; CHECK-LABEL: shuffle_v8i8_as_i64_56:
432 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
433 ; CHECK-NEXT: vslidedown.vi v9, v8, 7
434 ; CHECK-NEXT: vslideup.vi v9, v8, 1
435 ; CHECK-NEXT: vmv1r.v v8, v9
438 ; ZVKB-V-LABEL: shuffle_v8i8_as_i64_56:
440 ; ZVKB-V-NEXT: vsetivli zero, 1, e64, m1, ta, ma
441 ; ZVKB-V-NEXT: vror.vi v8, v8, 56
444 ; ZVKB-ZVE32X-LABEL: shuffle_v8i8_as_i64_56:
445 ; ZVKB-ZVE32X: # %bb.0:
446 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e8, m2, ta, ma
447 ; ZVKB-ZVE32X-NEXT: vslidedown.vi v10, v8, 7
448 ; ZVKB-ZVE32X-NEXT: vslideup.vi v10, v8, 1
449 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v10
450 ; ZVKB-ZVE32X-NEXT: ret
451 %shuffle = shufflevector <8 x i8> %v, <8 x i8> poison, <8 x i32> <i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6>
452 ret <8 x i8> %shuffle
455 define <8 x i16> @shuffle_v8i16_as_i32(<8 x i16> %v) {
456 ; CHECK-LABEL: shuffle_v8i16_as_i32:
458 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
459 ; CHECK-NEXT: vsrl.vi v9, v8, 16
460 ; CHECK-NEXT: vsll.vi v8, v8, 16
461 ; CHECK-NEXT: vor.vv v8, v8, v9
464 ; ZVKB-V-LABEL: shuffle_v8i16_as_i32:
466 ; ZVKB-V-NEXT: vsetivli zero, 4, e32, m1, ta, ma
467 ; ZVKB-V-NEXT: vror.vi v8, v8, 16
470 ; ZVKB-ZVE32X-LABEL: shuffle_v8i16_as_i32:
471 ; ZVKB-ZVE32X: # %bb.0:
472 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 4, e32, m4, ta, ma
473 ; ZVKB-ZVE32X-NEXT: vror.vi v8, v8, 16
474 ; ZVKB-ZVE32X-NEXT: ret
475 %shuffle = shufflevector <8 x i16> %v, <8 x i16> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
476 ret <8 x i16> %shuffle
479 define <8 x i16> @shuffle_v8i16_as_i64_16(<8 x i16> %v) {
480 ; RV32-LABEL: shuffle_v8i16_as_i64_16:
482 ; RV32-NEXT: li a0, 48
483 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
484 ; RV32-NEXT: vmv.v.x v9, a0
485 ; RV32-NEXT: li a0, 63
486 ; RV32-NEXT: vand.vx v10, v9, a0
487 ; RV32-NEXT: vsll.vv v10, v8, v10
488 ; RV32-NEXT: vrsub.vi v9, v9, 0
489 ; RV32-NEXT: vand.vx v9, v9, a0
490 ; RV32-NEXT: vsrl.vv v8, v8, v9
491 ; RV32-NEXT: vor.vv v8, v10, v8
494 ; RV64-LABEL: shuffle_v8i16_as_i64_16:
496 ; RV64-NEXT: li a0, 48
497 ; RV64-NEXT: vsetivli zero, 2, e64, m1, ta, ma
498 ; RV64-NEXT: vsll.vx v9, v8, a0
499 ; RV64-NEXT: vsrl.vi v8, v8, 16
500 ; RV64-NEXT: vor.vv v8, v9, v8
503 ; ZVKB-V-LABEL: shuffle_v8i16_as_i64_16:
505 ; ZVKB-V-NEXT: vsetivli zero, 2, e64, m1, ta, ma
506 ; ZVKB-V-NEXT: vror.vi v8, v8, 16
509 ; ZVKB-ZVE32X-LABEL: shuffle_v8i16_as_i64_16:
510 ; ZVKB-ZVE32X: # %bb.0:
511 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI19_0)
512 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI19_0)
513 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
514 ; ZVKB-ZVE32X-NEXT: vle8.v v12, (a0)
515 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v16, v12
516 ; ZVKB-ZVE32X-NEXT: vrgather.vv v12, v8, v16
517 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v12
518 ; ZVKB-ZVE32X-NEXT: ret
519 %shuffle = shufflevector <8 x i16> %v, <8 x i16> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 0, i32 5, i32 6, i32 7, i32 4>
520 ret <8 x i16> %shuffle
523 define <8 x i16> @shuffle_v8i16_as_i64_32(<8 x i16> %v) {
524 ; RV32-LABEL: shuffle_v8i16_as_i64_32:
526 ; RV32-NEXT: li a0, 32
527 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
528 ; RV32-NEXT: vmv.v.x v9, a0
529 ; RV32-NEXT: li a0, 63
530 ; RV32-NEXT: vand.vx v10, v9, a0
531 ; RV32-NEXT: vsll.vv v10, v8, v10
532 ; RV32-NEXT: vrsub.vi v9, v9, 0
533 ; RV32-NEXT: vand.vx v9, v9, a0
534 ; RV32-NEXT: vsrl.vv v8, v8, v9
535 ; RV32-NEXT: vor.vv v8, v10, v8
538 ; RV64-LABEL: shuffle_v8i16_as_i64_32:
540 ; RV64-NEXT: li a0, 32
541 ; RV64-NEXT: vsetivli zero, 2, e64, m1, ta, ma
542 ; RV64-NEXT: vsrl.vx v9, v8, a0
543 ; RV64-NEXT: vsll.vx v8, v8, a0
544 ; RV64-NEXT: vor.vv v8, v8, v9
547 ; ZVKB-V-LABEL: shuffle_v8i16_as_i64_32:
549 ; ZVKB-V-NEXT: vsetivli zero, 2, e64, m1, ta, ma
550 ; ZVKB-V-NEXT: vror.vi v8, v8, 32
553 ; ZVKB-ZVE32X-LABEL: shuffle_v8i16_as_i64_32:
554 ; ZVKB-ZVE32X: # %bb.0:
555 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI20_0)
556 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI20_0)
557 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
558 ; ZVKB-ZVE32X-NEXT: vle8.v v12, (a0)
559 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v16, v12
560 ; ZVKB-ZVE32X-NEXT: vrgather.vv v12, v8, v16
561 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v12
562 ; ZVKB-ZVE32X-NEXT: ret
563 %shuffle = shufflevector <8 x i16> %v, <8 x i16> poison, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 6, i32 7, i32 4, i32 5>
564 ret <8 x i16> %shuffle
567 define <8 x i16> @shuffle_v8i16_as_i64_48(<8 x i16> %v) {
568 ; RV32-LABEL: shuffle_v8i16_as_i64_48:
570 ; RV32-NEXT: li a0, 16
571 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
572 ; RV32-NEXT: vmv.v.x v9, a0
573 ; RV32-NEXT: li a0, 63
574 ; RV32-NEXT: vand.vx v10, v9, a0
575 ; RV32-NEXT: vsll.vv v10, v8, v10
576 ; RV32-NEXT: vrsub.vi v9, v9, 0
577 ; RV32-NEXT: vand.vx v9, v9, a0
578 ; RV32-NEXT: vsrl.vv v8, v8, v9
579 ; RV32-NEXT: vor.vv v8, v10, v8
582 ; RV64-LABEL: shuffle_v8i16_as_i64_48:
584 ; RV64-NEXT: li a0, 48
585 ; RV64-NEXT: vsetivli zero, 2, e64, m1, ta, ma
586 ; RV64-NEXT: vsrl.vx v9, v8, a0
587 ; RV64-NEXT: vsll.vi v8, v8, 16
588 ; RV64-NEXT: vor.vv v8, v8, v9
591 ; ZVKB-V-LABEL: shuffle_v8i16_as_i64_48:
593 ; ZVKB-V-NEXT: vsetivli zero, 2, e64, m1, ta, ma
594 ; ZVKB-V-NEXT: vror.vi v8, v8, 48
597 ; ZVKB-ZVE32X-LABEL: shuffle_v8i16_as_i64_48:
598 ; ZVKB-ZVE32X: # %bb.0:
599 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI21_0)
600 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI21_0)
601 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
602 ; ZVKB-ZVE32X-NEXT: vle8.v v12, (a0)
603 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v16, v12
604 ; ZVKB-ZVE32X-NEXT: vrgather.vv v12, v8, v16
605 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v12
606 ; ZVKB-ZVE32X-NEXT: ret
607 %shuffle = shufflevector <8 x i16> %v, <8 x i16> poison, <8 x i32> <i32 3, i32 0, i32 1, i32 2, i32 7, i32 4, i32 5, i32 6>
608 ret <8 x i16> %shuffle
611 define <8 x i32> @shuffle_v8i32_as_i64(<8 x i32> %v) {
612 ; RV32-LABEL: shuffle_v8i32_as_i64:
614 ; RV32-NEXT: li a0, 32
615 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
616 ; RV32-NEXT: vmv.v.x v10, a0
617 ; RV32-NEXT: li a0, 63
618 ; RV32-NEXT: vand.vx v12, v10, a0
619 ; RV32-NEXT: vsll.vv v12, v8, v12
620 ; RV32-NEXT: vrsub.vi v10, v10, 0
621 ; RV32-NEXT: vand.vx v10, v10, a0
622 ; RV32-NEXT: vsrl.vv v8, v8, v10
623 ; RV32-NEXT: vor.vv v8, v12, v8
626 ; RV64-LABEL: shuffle_v8i32_as_i64:
628 ; RV64-NEXT: li a0, 32
629 ; RV64-NEXT: vsetivli zero, 4, e64, m2, ta, ma
630 ; RV64-NEXT: vsrl.vx v10, v8, a0
631 ; RV64-NEXT: vsll.vx v8, v8, a0
632 ; RV64-NEXT: vor.vv v8, v8, v10
635 ; ZVKB-V-LABEL: shuffle_v8i32_as_i64:
637 ; ZVKB-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma
638 ; ZVKB-V-NEXT: vror.vi v8, v8, 32
641 ; ZVKB-ZVE32X-LABEL: shuffle_v8i32_as_i64:
642 ; ZVKB-ZVE32X: # %bb.0:
643 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI22_0)
644 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI22_0)
645 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
646 ; ZVKB-ZVE32X-NEXT: vle8.v v16, (a0)
647 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v24, v16
648 ; ZVKB-ZVE32X-NEXT: vsetvli zero, zero, e32, m8, ta, ma
649 ; ZVKB-ZVE32X-NEXT: vrgatherei16.vv v16, v8, v24
650 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v16
651 ; ZVKB-ZVE32X-NEXT: ret
652 %shuffle = shufflevector <8 x i32> %v, <8 x i32> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
653 ret <8 x i32> %shuffle
656 define <8 x half> @shuffle_v8f16_as_i32(<8 x half> %v) {
657 ; CHECK-LABEL: shuffle_v8f16_as_i32:
659 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
660 ; CHECK-NEXT: vsrl.vi v9, v8, 16
661 ; CHECK-NEXT: vsll.vi v8, v8, 16
662 ; CHECK-NEXT: vor.vv v8, v8, v9
665 ; ZVKB-V-LABEL: shuffle_v8f16_as_i32:
667 ; ZVKB-V-NEXT: vsetivli zero, 4, e32, m1, ta, ma
668 ; ZVKB-V-NEXT: vror.vi v8, v8, 16
671 ; ZVKB-ZVE32X-LABEL: shuffle_v8f16_as_i32:
672 ; ZVKB-ZVE32X: # %bb.0:
673 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 4, e32, m4, ta, ma
674 ; ZVKB-ZVE32X-NEXT: vror.vi v8, v8, 16
675 ; ZVKB-ZVE32X-NEXT: ret
676 %shuffle = shufflevector <8 x half> %v, <8 x half> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
677 ret <8 x half> %shuffle
680 define <8 x half> @shuffle_v8f16_as_i64_16(<8 x half> %v) {
681 ; RV32-LABEL: shuffle_v8f16_as_i64_16:
683 ; RV32-NEXT: li a0, 48
684 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
685 ; RV32-NEXT: vmv.v.x v9, a0
686 ; RV32-NEXT: li a0, 63
687 ; RV32-NEXT: vand.vx v10, v9, a0
688 ; RV32-NEXT: vsll.vv v10, v8, v10
689 ; RV32-NEXT: vrsub.vi v9, v9, 0
690 ; RV32-NEXT: vand.vx v9, v9, a0
691 ; RV32-NEXT: vsrl.vv v8, v8, v9
692 ; RV32-NEXT: vor.vv v8, v10, v8
695 ; RV64-LABEL: shuffle_v8f16_as_i64_16:
697 ; RV64-NEXT: li a0, 48
698 ; RV64-NEXT: vsetivli zero, 2, e64, m1, ta, ma
699 ; RV64-NEXT: vsll.vx v9, v8, a0
700 ; RV64-NEXT: vsrl.vi v8, v8, 16
701 ; RV64-NEXT: vor.vv v8, v9, v8
704 ; ZVKB-V-LABEL: shuffle_v8f16_as_i64_16:
706 ; ZVKB-V-NEXT: vsetivli zero, 2, e64, m1, ta, ma
707 ; ZVKB-V-NEXT: vror.vi v8, v8, 16
710 ; ZVKB-ZVE32X-LABEL: shuffle_v8f16_as_i64_16:
711 ; ZVKB-ZVE32X: # %bb.0:
712 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI24_0)
713 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI24_0)
714 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
715 ; ZVKB-ZVE32X-NEXT: vle8.v v12, (a0)
716 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v16, v12
717 ; ZVKB-ZVE32X-NEXT: vrgather.vv v12, v8, v16
718 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v12
719 ; ZVKB-ZVE32X-NEXT: ret
720 %shuffle = shufflevector <8 x half> %v, <8 x half> poison, <8 x i32> <i32 1, i32 2, i32 3, i32 0, i32 5, i32 6, i32 7, i32 4>
721 ret <8 x half> %shuffle
724 define <8 x half> @shuffle_v8f16_as_i64_32(<8 x half> %v) {
725 ; RV32-LABEL: shuffle_v8f16_as_i64_32:
727 ; RV32-NEXT: li a0, 32
728 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
729 ; RV32-NEXT: vmv.v.x v9, a0
730 ; RV32-NEXT: li a0, 63
731 ; RV32-NEXT: vand.vx v10, v9, a0
732 ; RV32-NEXT: vsll.vv v10, v8, v10
733 ; RV32-NEXT: vrsub.vi v9, v9, 0
734 ; RV32-NEXT: vand.vx v9, v9, a0
735 ; RV32-NEXT: vsrl.vv v8, v8, v9
736 ; RV32-NEXT: vor.vv v8, v10, v8
739 ; RV64-LABEL: shuffle_v8f16_as_i64_32:
741 ; RV64-NEXT: li a0, 32
742 ; RV64-NEXT: vsetivli zero, 2, e64, m1, ta, ma
743 ; RV64-NEXT: vsrl.vx v9, v8, a0
744 ; RV64-NEXT: vsll.vx v8, v8, a0
745 ; RV64-NEXT: vor.vv v8, v8, v9
748 ; ZVKB-V-LABEL: shuffle_v8f16_as_i64_32:
750 ; ZVKB-V-NEXT: vsetivli zero, 2, e64, m1, ta, ma
751 ; ZVKB-V-NEXT: vror.vi v8, v8, 32
754 ; ZVKB-ZVE32X-LABEL: shuffle_v8f16_as_i64_32:
755 ; ZVKB-ZVE32X: # %bb.0:
756 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI25_0)
757 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI25_0)
758 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
759 ; ZVKB-ZVE32X-NEXT: vle8.v v12, (a0)
760 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v16, v12
761 ; ZVKB-ZVE32X-NEXT: vrgather.vv v12, v8, v16
762 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v12
763 ; ZVKB-ZVE32X-NEXT: ret
764 %shuffle = shufflevector <8 x half> %v, <8 x half> poison, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 6, i32 7, i32 4, i32 5>
765 ret <8 x half> %shuffle
768 define <8 x half> @shuffle_v8f16_as_i64_48(<8 x half> %v) {
769 ; RV32-LABEL: shuffle_v8f16_as_i64_48:
771 ; RV32-NEXT: li a0, 16
772 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
773 ; RV32-NEXT: vmv.v.x v9, a0
774 ; RV32-NEXT: li a0, 63
775 ; RV32-NEXT: vand.vx v10, v9, a0
776 ; RV32-NEXT: vsll.vv v10, v8, v10
777 ; RV32-NEXT: vrsub.vi v9, v9, 0
778 ; RV32-NEXT: vand.vx v9, v9, a0
779 ; RV32-NEXT: vsrl.vv v8, v8, v9
780 ; RV32-NEXT: vor.vv v8, v10, v8
783 ; RV64-LABEL: shuffle_v8f16_as_i64_48:
785 ; RV64-NEXT: li a0, 48
786 ; RV64-NEXT: vsetivli zero, 2, e64, m1, ta, ma
787 ; RV64-NEXT: vsrl.vx v9, v8, a0
788 ; RV64-NEXT: vsll.vi v8, v8, 16
789 ; RV64-NEXT: vor.vv v8, v8, v9
792 ; ZVKB-V-LABEL: shuffle_v8f16_as_i64_48:
794 ; ZVKB-V-NEXT: vsetivli zero, 2, e64, m1, ta, ma
795 ; ZVKB-V-NEXT: vror.vi v8, v8, 48
798 ; ZVKB-ZVE32X-LABEL: shuffle_v8f16_as_i64_48:
799 ; ZVKB-ZVE32X: # %bb.0:
800 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI26_0)
801 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI26_0)
802 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
803 ; ZVKB-ZVE32X-NEXT: vle8.v v12, (a0)
804 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v16, v12
805 ; ZVKB-ZVE32X-NEXT: vrgather.vv v12, v8, v16
806 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v12
807 ; ZVKB-ZVE32X-NEXT: ret
808 %shuffle = shufflevector <8 x half> %v, <8 x half> poison, <8 x i32> <i32 3, i32 0, i32 1, i32 2, i32 7, i32 4, i32 5, i32 6>
809 ret <8 x half> %shuffle
812 define <8 x float> @shuffle_v8f32_as_i64(<8 x float> %v) {
813 ; RV32-LABEL: shuffle_v8f32_as_i64:
815 ; RV32-NEXT: li a0, 32
816 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
817 ; RV32-NEXT: vmv.v.x v10, a0
818 ; RV32-NEXT: li a0, 63
819 ; RV32-NEXT: vand.vx v12, v10, a0
820 ; RV32-NEXT: vsll.vv v12, v8, v12
821 ; RV32-NEXT: vrsub.vi v10, v10, 0
822 ; RV32-NEXT: vand.vx v10, v10, a0
823 ; RV32-NEXT: vsrl.vv v8, v8, v10
824 ; RV32-NEXT: vor.vv v8, v12, v8
827 ; RV64-LABEL: shuffle_v8f32_as_i64:
829 ; RV64-NEXT: li a0, 32
830 ; RV64-NEXT: vsetivli zero, 4, e64, m2, ta, ma
831 ; RV64-NEXT: vsrl.vx v10, v8, a0
832 ; RV64-NEXT: vsll.vx v8, v8, a0
833 ; RV64-NEXT: vor.vv v8, v8, v10
836 ; ZVKB-V-LABEL: shuffle_v8f32_as_i64:
838 ; ZVKB-V-NEXT: vsetivli zero, 4, e64, m2, ta, ma
839 ; ZVKB-V-NEXT: vror.vi v8, v8, 32
842 ; ZVKB-ZVE32X-LABEL: shuffle_v8f32_as_i64:
843 ; ZVKB-ZVE32X: # %bb.0:
844 ; ZVKB-ZVE32X-NEXT: lui a0, %hi(.LCPI27_0)
845 ; ZVKB-ZVE32X-NEXT: addi a0, a0, %lo(.LCPI27_0)
846 ; ZVKB-ZVE32X-NEXT: vsetivli zero, 8, e16, m4, ta, ma
847 ; ZVKB-ZVE32X-NEXT: vle8.v v16, (a0)
848 ; ZVKB-ZVE32X-NEXT: vsext.vf2 v24, v16
849 ; ZVKB-ZVE32X-NEXT: vsetvli zero, zero, e32, m8, ta, ma
850 ; ZVKB-ZVE32X-NEXT: vrgatherei16.vv v16, v8, v24
851 ; ZVKB-ZVE32X-NEXT: vmv.v.v v8, v16
852 ; ZVKB-ZVE32X-NEXT: ret
853 %shuffle = shufflevector <8 x float> %v, <8 x float> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
854 ret <8 x float> %shuffle