1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve,+bf16 < %s | FileCheck %s --check-prefixes=CHECK
4 ; Extracting illegal subvectors
6 define <vscale x 1 x i32> @extract_nxv1i32_nxv4i32(<vscale x 4 x i32> %vec) nounwind {
7 ; CHECK-LABEL: extract_nxv1i32_nxv4i32:
10 %retval = call <vscale x 1 x i32> @llvm.vector.extract.nxv1i32.nxv4i32(<vscale x 4 x i32> %vec, i64 0)
11 ret <vscale x 1 x i32> %retval
14 define <vscale x 1 x i16> @extract_nxv1i16_nxv6i16(<vscale x 6 x i16> %vec) nounwind {
15 ; CHECK-LABEL: extract_nxv1i16_nxv6i16:
18 %retval = call <vscale x 1 x i16> @llvm.vector.extract.nxv1i16.nxv6i16(<vscale x 6 x i16> %vec, i64 0)
19 ret <vscale x 1 x i16> %retval
22 declare <vscale x 1 x i32> @llvm.vector.extract.nxv1i32.nxv4i32(<vscale x 4 x i32>, i64)
23 declare <vscale x 1 x i16> @llvm.vector.extract.nxv1i16.nxv6i16(<vscale x 6 x i16>, i64)
26 ; Extract half i1 vector that needs promotion from legal type.
28 define <vscale x 8 x i1> @extract_nxv8i1_nxv16i1_0(<vscale x 16 x i1> %in) {
29 ; CHECK-LABEL: extract_nxv8i1_nxv16i1_0:
31 ; CHECK-NEXT: punpklo p0.h, p0.b
33 %res = call <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv16i1(<vscale x 16 x i1> %in, i64 0)
34 ret <vscale x 8 x i1> %res
37 define <vscale x 8 x i1> @extract_nxv8i1_nxv16i1_8(<vscale x 16 x i1> %in) {
38 ; CHECK-LABEL: extract_nxv8i1_nxv16i1_8:
40 ; CHECK-NEXT: punpkhi p0.h, p0.b
42 %res = call <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv16i1(<vscale x 16 x i1> %in, i64 8)
43 ret <vscale x 8 x i1> %res
46 declare <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv16i1(<vscale x 16 x i1>, i64)
49 ; Extract i1 vector that needs widening from one that needs widening.
51 define <vscale x 14 x i1> @extract_nxv14i1_nxv28i1_0(<vscale x 28 x i1> %in) {
52 ; CHECK-LABEL: extract_nxv14i1_nxv28i1_0:
55 %res = call <vscale x 14 x i1> @llvm.vector.extract.nxv14i1.nxv28i1(<vscale x 28 x i1> %in, i64 0)
56 ret <vscale x 14 x i1> %res
59 define <vscale x 14 x i1> @extract_nxv14i1_nxv28i1_14(<vscale x 28 x i1> %in) uwtable {
60 ; CHECK-LABEL: extract_nxv14i1_nxv28i1_14:
62 ; CHECK-NEXT: str x29, [sp, #-16]! // 8-byte Folded Spill
63 ; CHECK-NEXT: .cfi_def_cfa_offset 16
64 ; CHECK-NEXT: .cfi_offset w29, -16
65 ; CHECK-NEXT: addvl sp, sp, #-1
66 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0c, 0x8f, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0x2e, 0x00, 0x1e, 0x22 // sp + 16 + 8 * VG
67 ; CHECK-NEXT: punpkhi p2.h, p1.b
68 ; CHECK-NEXT: str p6, [sp, #5, mul vl] // 2-byte Folded Spill
69 ; CHECK-NEXT: punpklo p1.h, p1.b
70 ; CHECK-NEXT: str p5, [sp, #6, mul vl] // 2-byte Folded Spill
71 ; CHECK-NEXT: punpkhi p0.h, p0.b
72 ; CHECK-NEXT: str p4, [sp, #7, mul vl] // 2-byte Folded Spill
73 ; CHECK-NEXT: punpklo p2.h, p2.b
74 ; CHECK-NEXT: punpkhi p3.h, p1.b
75 ; CHECK-NEXT: punpklo p1.h, p1.b
76 ; CHECK-NEXT: punpkhi p0.h, p0.b
77 ; CHECK-NEXT: punpkhi p4.h, p2.b
78 ; CHECK-NEXT: punpklo p2.h, p2.b
79 ; CHECK-NEXT: punpkhi p5.h, p3.b
80 ; CHECK-NEXT: punpklo p3.h, p3.b
81 ; CHECK-NEXT: punpkhi p6.h, p1.b
82 ; CHECK-NEXT: punpklo p1.h, p1.b
83 ; CHECK-NEXT: punpkhi p0.h, p0.b
84 ; CHECK-NEXT: uzp1 p2.s, p5.s, p2.s
85 ; CHECK-NEXT: ldr p5, [sp, #6, mul vl] // 2-byte Folded Reload
86 ; CHECK-NEXT: uzp1 p3.s, p6.s, p3.s
87 ; CHECK-NEXT: ldr p6, [sp, #5, mul vl] // 2-byte Folded Reload
88 ; CHECK-NEXT: uzp1 p4.s, p4.s, p0.s
89 ; CHECK-NEXT: uzp1 p0.s, p0.s, p1.s
90 ; CHECK-NEXT: uzp1 p1.h, p2.h, p4.h
91 ; CHECK-NEXT: ldr p4, [sp, #7, mul vl] // 2-byte Folded Reload
92 ; CHECK-NEXT: uzp1 p0.h, p0.h, p3.h
93 ; CHECK-NEXT: uzp1 p0.b, p0.b, p1.b
94 ; CHECK-NEXT: addvl sp, sp, #1
95 ; CHECK-NEXT: .cfi_def_cfa wsp, 16
96 ; CHECK-NEXT: ldr x29, [sp], #16 // 8-byte Folded Reload
97 ; CHECK-NEXT: .cfi_def_cfa_offset 0
98 ; CHECK-NEXT: .cfi_restore w29
100 %res = call <vscale x 14 x i1> @llvm.vector.extract.nxv14i1.nxv28i1(<vscale x 28 x i1> %in, i64 14)
101 ret <vscale x 14 x i1> %res
104 declare <vscale x 14 x i1> @llvm.vector.extract.nxv14i1.nxv28i1(<vscale x 28 x i1>, i64)
107 ; Extract half i1 vector that needs promotion from one that needs splitting.
109 define <vscale x 8 x i1> @extract_nxv8i1_nxv32i1_0(<vscale x 32 x i1> %in) {
110 ; CHECK-LABEL: extract_nxv8i1_nxv32i1_0:
112 ; CHECK-NEXT: punpklo p0.h, p0.b
114 %res = call <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv32i1(<vscale x 32 x i1> %in, i64 0)
115 ret <vscale x 8 x i1> %res
118 define <vscale x 8 x i1> @extract_nxv8i1_nxv32i1_8(<vscale x 32 x i1> %in) {
119 ; CHECK-LABEL: extract_nxv8i1_nxv32i1_8:
121 ; CHECK-NEXT: punpkhi p0.h, p0.b
123 %res = call <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv32i1(<vscale x 32 x i1> %in, i64 8)
124 ret <vscale x 8 x i1> %res
127 define <vscale x 8 x i1> @extract_nxv8i1_nxv32i1_16(<vscale x 32 x i1> %in) {
128 ; CHECK-LABEL: extract_nxv8i1_nxv32i1_16:
130 ; CHECK-NEXT: punpklo p0.h, p1.b
132 %res = call <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv32i1(<vscale x 32 x i1> %in, i64 16)
133 ret <vscale x 8 x i1> %res
136 define <vscale x 8 x i1> @extract_nxv8i1_nxv32i1_24(<vscale x 32 x i1> %in) {
137 ; CHECK-LABEL: extract_nxv8i1_nxv32i1_24:
139 ; CHECK-NEXT: punpkhi p0.h, p1.b
141 %res = call <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv32i1(<vscale x 32 x i1> %in, i64 24)
142 ret <vscale x 8 x i1> %res
145 declare <vscale x 8 x i1> @llvm.vector.extract.nxv8i1.nxv32i1(<vscale x 32 x i1>, i64)
148 ; Extract 1/4th i1 vector that needs promotion from legal type.
150 define <vscale x 4 x i1> @extract_nxv4i1_nxv16i1_0(<vscale x 16 x i1> %in) {
151 ; CHECK-LABEL: extract_nxv4i1_nxv16i1_0:
153 ; CHECK-NEXT: punpklo p0.h, p0.b
154 ; CHECK-NEXT: punpklo p0.h, p0.b
156 %res = call <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv16i1(<vscale x 16 x i1> %in, i64 0)
157 ret <vscale x 4 x i1> %res
160 define <vscale x 4 x i1> @extract_nxv4i1_nxv16i1_4(<vscale x 16 x i1> %in) {
161 ; CHECK-LABEL: extract_nxv4i1_nxv16i1_4:
163 ; CHECK-NEXT: punpklo p0.h, p0.b
164 ; CHECK-NEXT: punpkhi p0.h, p0.b
166 %res = call <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv16i1(<vscale x 16 x i1> %in, i64 4)
167 ret <vscale x 4 x i1> %res
170 define <vscale x 4 x i1> @extract_nxv4i1_nxv16i1_8(<vscale x 16 x i1> %in) {
171 ; CHECK-LABEL: extract_nxv4i1_nxv16i1_8:
173 ; CHECK-NEXT: punpkhi p0.h, p0.b
174 ; CHECK-NEXT: punpklo p0.h, p0.b
176 %res = call <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv16i1(<vscale x 16 x i1> %in, i64 8)
177 ret <vscale x 4 x i1> %res
180 define <vscale x 4 x i1> @extract_nxv4i1_nxv16i1_12(<vscale x 16 x i1> %in) {
181 ; CHECK-LABEL: extract_nxv4i1_nxv16i1_12:
183 ; CHECK-NEXT: punpkhi p0.h, p0.b
184 ; CHECK-NEXT: punpkhi p0.h, p0.b
186 %res = call <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv16i1(<vscale x 16 x i1> %in, i64 12)
187 ret <vscale x 4 x i1> %res
190 declare <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv16i1(<vscale x 16 x i1>, i64)
193 ; Extract 1/8th i1 vector that needs promotion from legal type.
195 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_0(<vscale x 16 x i1> %in) {
196 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_0:
198 ; CHECK-NEXT: punpklo p0.h, p0.b
199 ; CHECK-NEXT: punpklo p0.h, p0.b
200 ; CHECK-NEXT: punpklo p0.h, p0.b
202 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 0)
203 ret <vscale x 2 x i1> %res
206 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_2(<vscale x 16 x i1> %in) {
207 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_2:
209 ; CHECK-NEXT: punpklo p0.h, p0.b
210 ; CHECK-NEXT: punpklo p0.h, p0.b
211 ; CHECK-NEXT: punpkhi p0.h, p0.b
213 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 2)
214 ret <vscale x 2 x i1> %res
217 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_4(<vscale x 16 x i1> %in) {
218 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_4:
220 ; CHECK-NEXT: punpklo p0.h, p0.b
221 ; CHECK-NEXT: punpkhi p0.h, p0.b
222 ; CHECK-NEXT: punpklo p0.h, p0.b
224 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 4)
225 ret <vscale x 2 x i1> %res
228 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_6(<vscale x 16 x i1> %in) {
229 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_6:
231 ; CHECK-NEXT: punpklo p0.h, p0.b
232 ; CHECK-NEXT: punpkhi p0.h, p0.b
233 ; CHECK-NEXT: punpkhi p0.h, p0.b
235 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 6)
236 ret <vscale x 2 x i1> %res
239 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_8(<vscale x 16 x i1> %in) {
240 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_8:
242 ; CHECK-NEXT: punpkhi p0.h, p0.b
243 ; CHECK-NEXT: punpklo p0.h, p0.b
244 ; CHECK-NEXT: punpklo p0.h, p0.b
246 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 8)
247 ret <vscale x 2 x i1> %res
250 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_10(<vscale x 16 x i1> %in) {
251 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_10:
253 ; CHECK-NEXT: punpkhi p0.h, p0.b
254 ; CHECK-NEXT: punpklo p0.h, p0.b
255 ; CHECK-NEXT: punpkhi p0.h, p0.b
257 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 10)
258 ret <vscale x 2 x i1> %res
261 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_12(<vscale x 16 x i1> %in) {
262 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_12:
264 ; CHECK-NEXT: punpkhi p0.h, p0.b
265 ; CHECK-NEXT: punpkhi p0.h, p0.b
266 ; CHECK-NEXT: punpklo p0.h, p0.b
268 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 12)
269 ret <vscale x 2 x i1> %res
272 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_14(<vscale x 16 x i1> %in) {
273 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_14:
275 ; CHECK-NEXT: punpkhi p0.h, p0.b
276 ; CHECK-NEXT: punpkhi p0.h, p0.b
277 ; CHECK-NEXT: punpkhi p0.h, p0.b
279 %res = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %in, i64 14)
280 ret <vscale x 2 x i1> %res
283 declare <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1>, i64)
286 ; Extract i1 vector that needs promotion from one that needs widening.
288 define <vscale x 4 x i1> @extract_nxv4i1_nxv12i1_0(<vscale x 12 x i1> %in) {
289 ; CHECK-LABEL: extract_nxv4i1_nxv12i1_0:
291 ; CHECK-NEXT: punpklo p0.h, p0.b
292 ; CHECK-NEXT: punpklo p0.h, p0.b
294 %res = call <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv12i1(<vscale x 12 x i1> %in, i64 0)
295 ret <vscale x 4 x i1> %res
298 define <vscale x 4 x i1> @extract_nxv4i1_nxv12i1_4(<vscale x 12 x i1> %in) {
299 ; CHECK-LABEL: extract_nxv4i1_nxv12i1_4:
301 ; CHECK-NEXT: punpklo p0.h, p0.b
302 ; CHECK-NEXT: punpkhi p0.h, p0.b
304 %res = call <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv12i1(<vscale x 12 x i1> %in, i64 4)
305 ret <vscale x 4 x i1> %res
308 define <vscale x 4 x i1> @extract_nxv4i1_nxv12i1_8(<vscale x 12 x i1> %in) {
309 ; CHECK-LABEL: extract_nxv4i1_nxv12i1_8:
311 ; CHECK-NEXT: punpkhi p0.h, p0.b
312 ; CHECK-NEXT: punpklo p0.h, p0.b
314 %res = call <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv12i1(<vscale x 12 x i1> %in, i64 8)
315 ret <vscale x 4 x i1> %res
318 declare <vscale x 4 x i1> @llvm.vector.extract.nxv4i1.nxv12i1(<vscale x 12 x i1>, i64)
321 ; Extract 1/8th i8 vector that needs promotion from legal type.
323 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_0(<vscale x 16 x i8> %in) {
324 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_0:
326 ; CHECK-NEXT: uunpklo z0.h, z0.b
327 ; CHECK-NEXT: uunpklo z0.s, z0.h
328 ; CHECK-NEXT: uunpklo z0.d, z0.s
330 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 0)
331 ret <vscale x 2 x i8> %res
334 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_2(<vscale x 16 x i8> %in) {
335 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_2:
337 ; CHECK-NEXT: uunpklo z0.h, z0.b
338 ; CHECK-NEXT: uunpklo z0.s, z0.h
339 ; CHECK-NEXT: uunpkhi z0.d, z0.s
341 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 2)
342 ret <vscale x 2 x i8> %res
345 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_4(<vscale x 16 x i8> %in) {
346 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_4:
348 ; CHECK-NEXT: uunpklo z0.h, z0.b
349 ; CHECK-NEXT: uunpkhi z0.s, z0.h
350 ; CHECK-NEXT: uunpklo z0.d, z0.s
352 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 4)
353 ret <vscale x 2 x i8> %res
356 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_6(<vscale x 16 x i8> %in) {
357 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_6:
359 ; CHECK-NEXT: uunpklo z0.h, z0.b
360 ; CHECK-NEXT: uunpkhi z0.s, z0.h
361 ; CHECK-NEXT: uunpkhi z0.d, z0.s
363 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 6)
364 ret <vscale x 2 x i8> %res
367 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_8(<vscale x 16 x i8> %in) {
368 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_8:
370 ; CHECK-NEXT: uunpkhi z0.h, z0.b
371 ; CHECK-NEXT: uunpklo z0.s, z0.h
372 ; CHECK-NEXT: uunpklo z0.d, z0.s
374 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 8)
375 ret <vscale x 2 x i8> %res
378 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_10(<vscale x 16 x i8> %in) {
379 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_10:
381 ; CHECK-NEXT: uunpkhi z0.h, z0.b
382 ; CHECK-NEXT: uunpklo z0.s, z0.h
383 ; CHECK-NEXT: uunpkhi z0.d, z0.s
385 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 10)
386 ret <vscale x 2 x i8> %res
389 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_12(<vscale x 16 x i8> %in) {
390 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_12:
392 ; CHECK-NEXT: uunpkhi z0.h, z0.b
393 ; CHECK-NEXT: uunpkhi z0.s, z0.h
394 ; CHECK-NEXT: uunpklo z0.d, z0.s
396 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 12)
397 ret <vscale x 2 x i8> %res
400 define <vscale x 2 x i8> @extract_nxv2i8_nxv16i8_14(<vscale x 16 x i8> %in) {
401 ; CHECK-LABEL: extract_nxv2i8_nxv16i8_14:
403 ; CHECK-NEXT: uunpkhi z0.h, z0.b
404 ; CHECK-NEXT: uunpkhi z0.s, z0.h
405 ; CHECK-NEXT: uunpkhi z0.d, z0.s
407 %res = call <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8> %in, i64 14)
408 ret <vscale x 2 x i8> %res
411 declare <vscale x 2 x i8> @llvm.vector.extract.nxv2i8.nxv16i8(<vscale x 16 x i8>, i64)
414 ; Extract i8 vector that needs promotion from one that needs widening.
416 define <vscale x 4 x i8> @extract_nxv4i8_nxv12i8_0(<vscale x 12 x i8> %in) {
417 ; CHECK-LABEL: extract_nxv4i8_nxv12i8_0:
419 ; CHECK-NEXT: uunpklo z0.h, z0.b
420 ; CHECK-NEXT: uunpklo z0.s, z0.h
422 %res = call <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv12i8(<vscale x 12 x i8> %in, i64 0)
423 ret <vscale x 4 x i8> %res
426 define <vscale x 4 x i8> @extract_nxv4i8_nxv12i8_4(<vscale x 12 x i8> %in) {
427 ; CHECK-LABEL: extract_nxv4i8_nxv12i8_4:
429 ; CHECK-NEXT: uunpklo z0.h, z0.b
430 ; CHECK-NEXT: uunpkhi z0.s, z0.h
432 %res = call <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv12i8(<vscale x 12 x i8> %in, i64 4)
433 ret <vscale x 4 x i8> %res
436 define <vscale x 4 x i8> @extract_nxv4i8_nxv12i8_8(<vscale x 12 x i8> %in) {
437 ; CHECK-LABEL: extract_nxv4i8_nxv12i8_8:
439 ; CHECK-NEXT: uunpkhi z0.h, z0.b
440 ; CHECK-NEXT: uunpklo z0.s, z0.h
442 %res = call <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv12i8(<vscale x 12 x i8> %in, i64 8)
443 ret <vscale x 4 x i8> %res
446 declare <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv12i8(<vscale x 12 x i8>, i64)
449 ; Extract i8 vector that needs both widening + promotion from one that needs widening.
450 ; (nxv6i8 -> nxv8i8 -> nxv8i16)
452 define <vscale x 6 x i8> @extract_nxv6i8_nxv12i8_0(<vscale x 12 x i8> %in) {
453 ; CHECK-LABEL: extract_nxv6i8_nxv12i8_0:
455 ; CHECK-NEXT: uunpklo z0.h, z0.b
457 %res = call <vscale x 6 x i8> @llvm.vector.extract.nxv6i8.nxv12i8(<vscale x 12 x i8> %in, i64 0)
458 ret <vscale x 6 x i8> %res
461 define <vscale x 6 x i8> @extract_nxv6i8_nxv12i8_6(<vscale x 12 x i8> %in) {
462 ; CHECK-LABEL: extract_nxv6i8_nxv12i8_6:
464 ; CHECK-NEXT: uunpkhi z1.h, z0.b
465 ; CHECK-NEXT: uunpklo z0.h, z0.b
466 ; CHECK-NEXT: uunpklo z1.s, z1.h
467 ; CHECK-NEXT: uunpkhi z0.s, z0.h
468 ; CHECK-NEXT: uunpkhi z2.d, z1.s
469 ; CHECK-NEXT: uunpklo z1.d, z1.s
470 ; CHECK-NEXT: uunpkhi z0.d, z0.s
471 ; CHECK-NEXT: uzp1 z2.s, z2.s, z0.s
472 ; CHECK-NEXT: uzp1 z0.s, z0.s, z1.s
473 ; CHECK-NEXT: uzp1 z0.h, z0.h, z2.h
475 %res = call <vscale x 6 x i8> @llvm.vector.extract.nxv6i8.nxv12i8(<vscale x 12 x i8> %in, i64 6)
476 ret <vscale x 6 x i8> %res
479 declare <vscale x 6 x i8> @llvm.vector.extract.nxv6i8.nxv12i8(<vscale x 12 x i8>, i64)
482 ; Extract half i8 vector that needs promotion from one that needs splitting.
484 define <vscale x 8 x i8> @extract_nxv8i8_nxv32i8_0(<vscale x 32 x i8> %in) {
485 ; CHECK-LABEL: extract_nxv8i8_nxv32i8_0:
487 ; CHECK-NEXT: uunpklo z0.h, z0.b
489 %res = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv32i8(<vscale x 32 x i8> %in, i64 0)
490 ret <vscale x 8 x i8> %res
493 define <vscale x 8 x i8> @extract_nxv8i8_nxv32i8_8(<vscale x 32 x i8> %in) {
494 ; CHECK-LABEL: extract_nxv8i8_nxv32i8_8:
496 ; CHECK-NEXT: uunpkhi z0.h, z0.b
498 %res = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv32i8(<vscale x 32 x i8> %in, i64 8)
499 ret <vscale x 8 x i8> %res
502 define <vscale x 8 x i8> @extract_nxv8i8_nxv32i8_16(<vscale x 32 x i8> %in) {
503 ; CHECK-LABEL: extract_nxv8i8_nxv32i8_16:
505 ; CHECK-NEXT: uunpklo z0.h, z1.b
507 %res = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv32i8(<vscale x 32 x i8> %in, i64 16)
508 ret <vscale x 8 x i8> %res
511 define <vscale x 8 x i8> @extract_nxv8i8_nxv32i8_24(<vscale x 32 x i8> %in) {
512 ; CHECK-LABEL: extract_nxv8i8_nxv32i8_24:
514 ; CHECK-NEXT: uunpkhi z0.h, z1.b
516 %res = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv32i8(<vscale x 32 x i8> %in, i64 24)
517 ret <vscale x 8 x i8> %res
520 declare <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv32i8(<vscale x 32 x i8>, i64)
523 ; Extract half i8 vector that needs promotion from legal type.
525 define <vscale x 8 x i8> @extract_nxv8i8_nxv16i8_0(<vscale x 16 x i8> %in) {
526 ; CHECK-LABEL: extract_nxv8i8_nxv16i8_0:
528 ; CHECK-NEXT: uunpklo z0.h, z0.b
530 %res = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv16i8(<vscale x 16 x i8> %in, i64 0)
531 ret <vscale x 8 x i8> %res
534 define <vscale x 8 x i8> @extract_nxv8i8_nxv16i8_8(<vscale x 16 x i8> %in) {
535 ; CHECK-LABEL: extract_nxv8i8_nxv16i8_8:
537 ; CHECK-NEXT: uunpkhi z0.h, z0.b
539 %res = call <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv16i8(<vscale x 16 x i8> %in, i64 8)
540 ret <vscale x 8 x i8> %res
543 declare <vscale x 8 x i8> @llvm.vector.extract.nxv8i8.nxv16i8(<vscale x 16 x i8>, i64)
546 ; Extract i8 vector that needs widening from one that needs widening.
548 define <vscale x 14 x i8> @extract_nxv14i8_nxv28i8_0(<vscale x 28 x i8> %in) {
549 ; CHECK-LABEL: extract_nxv14i8_nxv28i8_0:
552 %res = call <vscale x 14 x i8> @llvm.vector.extract.nxv14i8.nxv28i8(<vscale x 28 x i8> %in, i64 0)
553 ret <vscale x 14 x i8> %res
556 define <vscale x 14 x i8> @extract_nxv14i8_nxv28i8_14(<vscale x 28 x i8> %in) {
557 ; CHECK-LABEL: extract_nxv14i8_nxv28i8_14:
559 ; CHECK-NEXT: uunpkhi z0.h, z0.b
560 ; CHECK-NEXT: uunpklo z2.h, z1.b
561 ; CHECK-NEXT: uunpkhi z1.h, z1.b
562 ; CHECK-NEXT: uunpkhi z0.s, z0.h
563 ; CHECK-NEXT: uunpklo z4.s, z2.h
564 ; CHECK-NEXT: uunpkhi z2.s, z2.h
565 ; CHECK-NEXT: uunpklo z1.s, z1.h
566 ; CHECK-NEXT: uunpkhi z0.d, z0.s
567 ; CHECK-NEXT: uunpklo z5.d, z4.s
568 ; CHECK-NEXT: uunpkhi z4.d, z4.s
569 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
570 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
571 ; CHECK-NEXT: uzp1 z0.b, z0.b, z0.b
572 ; CHECK-NEXT: uunpklo z0.h, z0.b
573 ; CHECK-NEXT: uunpklo z3.s, z0.h
574 ; CHECK-NEXT: uunpkhi z0.s, z0.h
575 ; CHECK-NEXT: uunpklo z3.d, z3.s
576 ; CHECK-NEXT: uzp1 z3.s, z3.s, z5.s
577 ; CHECK-NEXT: uzp1 z0.h, z3.h, z0.h
578 ; CHECK-NEXT: uzp1 z0.b, z0.b, z0.b
579 ; CHECK-NEXT: uunpklo z0.h, z0.b
580 ; CHECK-NEXT: uunpkhi z3.s, z0.h
581 ; CHECK-NEXT: uunpklo z0.s, z0.h
582 ; CHECK-NEXT: uunpkhi z3.d, z3.s
583 ; CHECK-NEXT: uzp1 z3.s, z4.s, z3.s
584 ; CHECK-NEXT: uunpklo z4.d, z2.s
585 ; CHECK-NEXT: uunpkhi z2.d, z2.s
586 ; CHECK-NEXT: uzp1 z0.h, z0.h, z3.h
587 ; CHECK-NEXT: uzp1 z0.b, z0.b, z0.b
588 ; CHECK-NEXT: uunpklo z0.h, z0.b
589 ; CHECK-NEXT: uunpkhi z3.s, z0.h
590 ; CHECK-NEXT: uunpklo z0.s, z0.h
591 ; CHECK-NEXT: uunpklo z3.d, z3.s
592 ; CHECK-NEXT: uzp1 z3.s, z3.s, z4.s
593 ; CHECK-NEXT: uzp1 z0.h, z0.h, z3.h
594 ; CHECK-NEXT: uzp1 z3.b, z0.b, z0.b
595 ; CHECK-NEXT: uunpkhi z3.h, z3.b
596 ; CHECK-NEXT: uunpklo z4.s, z3.h
597 ; CHECK-NEXT: uunpkhi z3.s, z3.h
598 ; CHECK-NEXT: uunpkhi z4.d, z4.s
599 ; CHECK-NEXT: uzp1 z2.s, z2.s, z4.s
600 ; CHECK-NEXT: uunpklo z4.d, z1.s
601 ; CHECK-NEXT: uunpkhi z1.d, z1.s
602 ; CHECK-NEXT: uzp1 z2.h, z2.h, z3.h
603 ; CHECK-NEXT: uzp1 z2.b, z0.b, z2.b
604 ; CHECK-NEXT: uunpkhi z2.h, z2.b
605 ; CHECK-NEXT: uunpklo z3.s, z2.h
606 ; CHECK-NEXT: uunpkhi z2.s, z2.h
607 ; CHECK-NEXT: uunpklo z3.d, z3.s
608 ; CHECK-NEXT: uzp1 z3.s, z3.s, z4.s
609 ; CHECK-NEXT: uzp1 z2.h, z3.h, z2.h
610 ; CHECK-NEXT: uzp1 z2.b, z0.b, z2.b
611 ; CHECK-NEXT: uunpkhi z2.h, z2.b
612 ; CHECK-NEXT: uunpkhi z3.s, z2.h
613 ; CHECK-NEXT: uunpklo z2.s, z2.h
614 ; CHECK-NEXT: uunpkhi z3.d, z3.s
615 ; CHECK-NEXT: uzp1 z1.s, z1.s, z3.s
616 ; CHECK-NEXT: uzp1 z1.h, z2.h, z1.h
617 ; CHECK-NEXT: uzp1 z1.b, z0.b, z1.b
618 ; CHECK-NEXT: uunpkhi z1.h, z1.b
619 ; CHECK-NEXT: uunpkhi z2.s, z1.h
620 ; CHECK-NEXT: uunpklo z1.s, z1.h
621 ; CHECK-NEXT: uunpklo z2.d, z2.s
622 ; CHECK-NEXT: uzp1 z2.s, z2.s, z0.s
623 ; CHECK-NEXT: uzp1 z1.h, z1.h, z2.h
624 ; CHECK-NEXT: uzp1 z0.b, z0.b, z1.b
626 %res = call <vscale x 14 x i8> @llvm.vector.extract.nxv14i8.nxv28i8(<vscale x 28 x i8> %in, i64 14)
627 ret <vscale x 14 x i8> %res
630 declare <vscale x 14 x i8> @llvm.vector.extract.nxv14i8.nxv28i8(<vscale x 28 x i8>, i64)
633 ; Extract 1/4th i8 vector that needs promotion from legal type.
635 define <vscale x 4 x i8> @extract_nxv4i8_nxv16i8_0(<vscale x 16 x i8> %in) {
636 ; CHECK-LABEL: extract_nxv4i8_nxv16i8_0:
638 ; CHECK-NEXT: uunpklo z0.h, z0.b
639 ; CHECK-NEXT: uunpklo z0.s, z0.h
641 %res = call <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv16i8(<vscale x 16 x i8> %in, i64 0)
642 ret <vscale x 4 x i8> %res
645 define <vscale x 4 x i8> @extract_nxv4i8_nxv16i8_4(<vscale x 16 x i8> %in) {
646 ; CHECK-LABEL: extract_nxv4i8_nxv16i8_4:
648 ; CHECK-NEXT: uunpklo z0.h, z0.b
649 ; CHECK-NEXT: uunpkhi z0.s, z0.h
651 %res = call <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv16i8(<vscale x 16 x i8> %in, i64 4)
652 ret <vscale x 4 x i8> %res
655 define <vscale x 4 x i8> @extract_nxv4i8_nxv16i8_8(<vscale x 16 x i8> %in) {
656 ; CHECK-LABEL: extract_nxv4i8_nxv16i8_8:
658 ; CHECK-NEXT: uunpkhi z0.h, z0.b
659 ; CHECK-NEXT: uunpklo z0.s, z0.h
661 %res = call <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv16i8(<vscale x 16 x i8> %in, i64 8)
662 ret <vscale x 4 x i8> %res
665 define <vscale x 4 x i8> @extract_nxv4i8_nxv16i8_12(<vscale x 16 x i8> %in) {
666 ; CHECK-LABEL: extract_nxv4i8_nxv16i8_12:
668 ; CHECK-NEXT: uunpkhi z0.h, z0.b
669 ; CHECK-NEXT: uunpkhi z0.s, z0.h
671 %res = call <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv16i8(<vscale x 16 x i8> %in, i64 12)
672 ret <vscale x 4 x i8> %res
675 declare <vscale x 4 x i8> @llvm.vector.extract.nxv4i8.nxv16i8(<vscale x 16 x i8>, i64)
678 ; Extract f16 vector that needs promotion from one that needs widening.
680 define <vscale x 2 x half> @extract_nxv2f16_nxv6f16_0(<vscale x 6 x half> %in) {
681 ; CHECK-LABEL: extract_nxv2f16_nxv6f16_0:
683 ; CHECK-NEXT: uunpklo z0.s, z0.h
684 ; CHECK-NEXT: uunpklo z0.d, z0.s
686 %res = call <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv6f16(<vscale x 6 x half> %in, i64 0)
687 ret <vscale x 2 x half> %res
690 define <vscale x 2 x half> @extract_nxv2f16_nxv6f16_2(<vscale x 6 x half> %in) {
691 ; CHECK-LABEL: extract_nxv2f16_nxv6f16_2:
693 ; CHECK-NEXT: uunpklo z0.s, z0.h
694 ; CHECK-NEXT: uunpkhi z0.d, z0.s
696 %res = call <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv6f16(<vscale x 6 x half> %in, i64 2)
697 ret <vscale x 2 x half> %res
700 define <vscale x 2 x half> @extract_nxv2f16_nxv6f16_4(<vscale x 6 x half> %in) {
701 ; CHECK-LABEL: extract_nxv2f16_nxv6f16_4:
703 ; CHECK-NEXT: uunpkhi z0.s, z0.h
704 ; CHECK-NEXT: uunpklo z0.d, z0.s
706 %res = call <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv6f16(<vscale x 6 x half> %in, i64 4)
707 ret <vscale x 2 x half> %res
710 declare <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv6f16(<vscale x 6 x half>, i64)
713 ; Extract half f16 vector that needs promotion from legal type.
715 define <vscale x 4 x half> @extract_nxv4f16_nxv8f16_0(<vscale x 8 x half> %in) {
716 ; CHECK-LABEL: extract_nxv4f16_nxv8f16_0:
718 ; CHECK-NEXT: uunpklo z0.s, z0.h
720 %res = call <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv8f16(<vscale x 8 x half> %in, i64 0)
721 ret <vscale x 4 x half> %res
724 define <vscale x 4 x half> @extract_nxv4f16_nxv8f16_4(<vscale x 8 x half> %in) {
725 ; CHECK-LABEL: extract_nxv4f16_nxv8f16_4:
727 ; CHECK-NEXT: uunpkhi z0.s, z0.h
729 %res = call <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv8f16(<vscale x 8 x half> %in, i64 4)
730 ret <vscale x 4 x half> %res
733 declare <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv8f16(<vscale x 8 x half>, i64)
736 ; Extract f16 vector that needs widening from one that needs widening.
738 define <vscale x 6 x half> @extract_nxv6f16_nxv12f16_0(<vscale x 12 x half> %in) {
739 ; CHECK-LABEL: extract_nxv6f16_nxv12f16_0:
742 %res = call <vscale x 6 x half> @llvm.vector.extract.nxv6f16.nxv12f16(<vscale x 12 x half> %in, i64 0)
743 ret <vscale x 6 x half> %res
746 define <vscale x 6 x half> @extract_nxv6f16_nxv12f16_6(<vscale x 12 x half> %in) {
747 ; CHECK-LABEL: extract_nxv6f16_nxv12f16_6:
749 ; CHECK-NEXT: uunpklo z1.s, z1.h
750 ; CHECK-NEXT: uunpkhi z0.s, z0.h
751 ; CHECK-NEXT: uunpkhi z2.d, z1.s
752 ; CHECK-NEXT: uunpklo z1.d, z1.s
753 ; CHECK-NEXT: uunpkhi z0.d, z0.s
754 ; CHECK-NEXT: uzp1 z2.s, z2.s, z0.s
755 ; CHECK-NEXT: uzp1 z0.s, z0.s, z1.s
756 ; CHECK-NEXT: uzp1 z0.h, z0.h, z2.h
758 %res = call <vscale x 6 x half> @llvm.vector.extract.nxv6f16.nxv12f16(<vscale x 12 x half> %in, i64 6)
759 ret <vscale x 6 x half> %res
762 declare <vscale x 6 x half> @llvm.vector.extract.nxv6f16.nxv12f16(<vscale x 12 x half>, i64)
765 ; Extract half f16 vector that needs promotion from one that needs splitting.
767 define <vscale x 4 x half> @extract_nxv4f16_nxv16f16_0(<vscale x 16 x half> %in) {
768 ; CHECK-LABEL: extract_nxv4f16_nxv16f16_0:
770 ; CHECK-NEXT: uunpklo z0.s, z0.h
772 %res = call <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv16f16(<vscale x 16 x half> %in, i64 0)
773 ret <vscale x 4 x half> %res
776 define <vscale x 4 x half> @extract_nxv4f16_nxv16f16_4(<vscale x 16 x half> %in) {
777 ; CHECK-LABEL: extract_nxv4f16_nxv16f16_4:
779 ; CHECK-NEXT: uunpkhi z0.s, z0.h
781 %res = call <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv16f16(<vscale x 16 x half> %in, i64 4)
782 ret <vscale x 4 x half> %res
785 define <vscale x 4 x half> @extract_nxv4f16_nxv16f16_8(<vscale x 16 x half> %in) {
786 ; CHECK-LABEL: extract_nxv4f16_nxv16f16_8:
788 ; CHECK-NEXT: uunpklo z0.s, z1.h
790 %res = call <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv16f16(<vscale x 16 x half> %in, i64 8)
791 ret <vscale x 4 x half> %res
794 define <vscale x 4 x half> @extract_nxv4f16_nxv16f16_12(<vscale x 16 x half> %in) {
795 ; CHECK-LABEL: extract_nxv4f16_nxv16f16_12:
797 ; CHECK-NEXT: uunpkhi z0.s, z1.h
799 %res = call <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv16f16(<vscale x 16 x half> %in, i64 12)
800 ret <vscale x 4 x half> %res
803 declare <vscale x 4 x half> @llvm.vector.extract.nxv4f16.nxv16f16(<vscale x 16 x half>, i64)
806 ; Extract 1/4th f16 vector that needs promotion from legal type.
808 define <vscale x 2 x half> @extract_nxv2f16_nxv8f16_0(<vscale x 8 x half> %in) {
809 ; CHECK-LABEL: extract_nxv2f16_nxv8f16_0:
811 ; CHECK-NEXT: uunpklo z0.s, z0.h
812 ; CHECK-NEXT: uunpklo z0.d, z0.s
814 %res = call <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv8f16(<vscale x 8 x half> %in, i64 0)
815 ret <vscale x 2 x half> %res
818 define <vscale x 2 x half> @extract_nxv2f16_nxv8f16_2(<vscale x 8 x half> %in) {
819 ; CHECK-LABEL: extract_nxv2f16_nxv8f16_2:
821 ; CHECK-NEXT: uunpklo z0.s, z0.h
822 ; CHECK-NEXT: uunpkhi z0.d, z0.s
824 %res = call <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv8f16(<vscale x 8 x half> %in, i64 2)
825 ret <vscale x 2 x half> %res
828 define <vscale x 2 x half> @extract_nxv2f16_nxv8f16_4(<vscale x 8 x half> %in) {
829 ; CHECK-LABEL: extract_nxv2f16_nxv8f16_4:
831 ; CHECK-NEXT: uunpkhi z0.s, z0.h
832 ; CHECK-NEXT: uunpklo z0.d, z0.s
834 %res = call <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv8f16(<vscale x 8 x half> %in, i64 4)
835 ret <vscale x 2 x half> %res
838 define <vscale x 2 x half> @extract_nxv2f16_nxv8f16_6(<vscale x 8 x half> %in) {
839 ; CHECK-LABEL: extract_nxv2f16_nxv8f16_6:
841 ; CHECK-NEXT: uunpkhi z0.s, z0.h
842 ; CHECK-NEXT: uunpkhi z0.d, z0.s
844 %res = call <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv8f16(<vscale x 8 x half> %in, i64 6)
845 ret <vscale x 2 x half> %res
848 declare <vscale x 2 x half> @llvm.vector.extract.nxv2f16.nxv8f16(<vscale x 8 x half>, i64)
851 ; Extract half bf16 vector that needs promotion from legal type.
853 define <vscale x 4 x bfloat> @extract_nxv4bf16_nxv8bf16_0(<vscale x 8 x bfloat> %in) {
854 ; CHECK-LABEL: extract_nxv4bf16_nxv8bf16_0:
856 ; CHECK-NEXT: uunpklo z0.s, z0.h
858 %res = call <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv8bf16(<vscale x 8 x bfloat> %in, i64 0)
859 ret <vscale x 4 x bfloat> %res
862 define <vscale x 4 x bfloat> @extract_nxv4bf16_nxv8bf16_4(<vscale x 8 x bfloat> %in) {
863 ; CHECK-LABEL: extract_nxv4bf16_nxv8bf16_4:
865 ; CHECK-NEXT: uunpkhi z0.s, z0.h
867 %res = call <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv8bf16(<vscale x 8 x bfloat> %in, i64 4)
868 ret <vscale x 4 x bfloat> %res
871 declare <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv8bf16(<vscale x 8 x bfloat>, i64)
874 ; Extract bf16 vector that needs widening from one that needs widening.
876 define <vscale x 6 x bfloat> @extract_nxv6bf16_nxv12bf16_0(<vscale x 12 x bfloat> %in) {
877 ; CHECK-LABEL: extract_nxv6bf16_nxv12bf16_0:
880 %res = call <vscale x 6 x bfloat> @llvm.vector.extract.nxv6bf16.nxv12bf16(<vscale x 12 x bfloat> %in, i64 0)
881 ret <vscale x 6 x bfloat> %res
884 define <vscale x 6 x bfloat> @extract_nxv6bf16_nxv12bf16_6(<vscale x 12 x bfloat> %in) {
885 ; CHECK-LABEL: extract_nxv6bf16_nxv12bf16_6:
887 ; CHECK-NEXT: uunpklo z1.s, z1.h
888 ; CHECK-NEXT: uunpkhi z0.s, z0.h
889 ; CHECK-NEXT: uunpkhi z2.d, z1.s
890 ; CHECK-NEXT: uunpklo z1.d, z1.s
891 ; CHECK-NEXT: uunpkhi z0.d, z0.s
892 ; CHECK-NEXT: uzp1 z2.s, z2.s, z0.s
893 ; CHECK-NEXT: uzp1 z0.s, z0.s, z1.s
894 ; CHECK-NEXT: uzp1 z0.h, z0.h, z2.h
896 %res = call <vscale x 6 x bfloat> @llvm.vector.extract.nxv6bf16.nxv12bf16(<vscale x 12 x bfloat> %in, i64 6)
897 ret <vscale x 6 x bfloat> %res
900 declare <vscale x 6 x bfloat> @llvm.vector.extract.nxv6bf16.nxv12bf16(<vscale x 12 x bfloat>, i64)
903 ; Extract bf16 vector that needs promotion from one that needs widening.
905 define <vscale x 2 x bfloat> @extract_nxv2bf16_nxv6bf16_0(<vscale x 6 x bfloat> %in) {
906 ; CHECK-LABEL: extract_nxv2bf16_nxv6bf16_0:
908 ; CHECK-NEXT: uunpklo z0.s, z0.h
909 ; CHECK-NEXT: uunpklo z0.d, z0.s
911 %res = call <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv6bf16(<vscale x 6 x bfloat> %in, i64 0)
912 ret <vscale x 2 x bfloat> %res
915 define <vscale x 2 x bfloat> @extract_nxv2bf16_nxv6bf16_2(<vscale x 6 x bfloat> %in) {
916 ; CHECK-LABEL: extract_nxv2bf16_nxv6bf16_2:
918 ; CHECK-NEXT: uunpklo z0.s, z0.h
919 ; CHECK-NEXT: uunpkhi z0.d, z0.s
921 %res = call <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv6bf16(<vscale x 6 x bfloat> %in, i64 2)
922 ret <vscale x 2 x bfloat> %res
925 define <vscale x 2 x bfloat> @extract_nxv2bf16_nxv6bf16_4(<vscale x 6 x bfloat> %in) {
926 ; CHECK-LABEL: extract_nxv2bf16_nxv6bf16_4:
928 ; CHECK-NEXT: uunpkhi z0.s, z0.h
929 ; CHECK-NEXT: uunpklo z0.d, z0.s
931 %res = call <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv6bf16(<vscale x 6 x bfloat> %in, i64 4)
932 ret <vscale x 2 x bfloat> %res
935 declare <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv6bf16(<vscale x 6 x bfloat>, i64)
938 ; Extract 1/4th bf16 vector that needs promotion from legal type.
940 define <vscale x 2 x bfloat> @extract_nxv2bf16_nxv8bf16_0(<vscale x 8 x bfloat> %in) {
941 ; CHECK-LABEL: extract_nxv2bf16_nxv8bf16_0:
943 ; CHECK-NEXT: uunpklo z0.s, z0.h
944 ; CHECK-NEXT: uunpklo z0.d, z0.s
946 %res = call <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv8bf16(<vscale x 8 x bfloat> %in, i64 0)
947 ret <vscale x 2 x bfloat> %res
950 define <vscale x 2 x bfloat> @extract_nxv2bf16_nxv8bf16_2(<vscale x 8 x bfloat> %in) {
951 ; CHECK-LABEL: extract_nxv2bf16_nxv8bf16_2:
953 ; CHECK-NEXT: uunpklo z0.s, z0.h
954 ; CHECK-NEXT: uunpkhi z0.d, z0.s
956 %res = call <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv8bf16(<vscale x 8 x bfloat> %in, i64 2)
957 ret <vscale x 2 x bfloat> %res
960 define <vscale x 2 x bfloat> @extract_nxv2bf16_nxv8bf16_4(<vscale x 8 x bfloat> %in) {
961 ; CHECK-LABEL: extract_nxv2bf16_nxv8bf16_4:
963 ; CHECK-NEXT: uunpkhi z0.s, z0.h
964 ; CHECK-NEXT: uunpklo z0.d, z0.s
966 %res = call <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv8bf16(<vscale x 8 x bfloat> %in, i64 4)
967 ret <vscale x 2 x bfloat> %res
970 define <vscale x 2 x bfloat> @extract_nxv2bf16_nxv8bf16_6(<vscale x 8 x bfloat> %in) {
971 ; CHECK-LABEL: extract_nxv2bf16_nxv8bf16_6:
973 ; CHECK-NEXT: uunpkhi z0.s, z0.h
974 ; CHECK-NEXT: uunpkhi z0.d, z0.s
976 %res = call <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv8bf16(<vscale x 8 x bfloat> %in, i64 6)
977 ret <vscale x 2 x bfloat> %res
980 declare <vscale x 2 x bfloat> @llvm.vector.extract.nxv2bf16.nxv8bf16(<vscale x 8 x bfloat>, i64)
983 ; Extract half bf16 vector that needs promotion from one that needs splitting.
985 define <vscale x 4 x bfloat> @extract_nxv4bf16_nxv16bf16_0(<vscale x 16 x bfloat> %in) {
986 ; CHECK-LABEL: extract_nxv4bf16_nxv16bf16_0:
988 ; CHECK-NEXT: uunpklo z0.s, z0.h
990 %res = call <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv16bf16(<vscale x 16 x bfloat> %in, i64 0)
991 ret <vscale x 4 x bfloat> %res
994 define <vscale x 4 x bfloat> @extract_nxv4bf16_nxv16bf16_4(<vscale x 16 x bfloat> %in) {
995 ; CHECK-LABEL: extract_nxv4bf16_nxv16bf16_4:
997 ; CHECK-NEXT: uunpkhi z0.s, z0.h
999 %res = call <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv16bf16(<vscale x 16 x bfloat> %in, i64 4)
1000 ret <vscale x 4 x bfloat> %res
1003 define <vscale x 4 x bfloat> @extract_nxv4bf16_nxv16bf16_8(<vscale x 16 x bfloat> %in) {
1004 ; CHECK-LABEL: extract_nxv4bf16_nxv16bf16_8:
1006 ; CHECK-NEXT: uunpklo z0.s, z1.h
1008 %res = call <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv16bf16(<vscale x 16 x bfloat> %in, i64 8)
1009 ret <vscale x 4 x bfloat> %res
1012 define <vscale x 4 x bfloat> @extract_nxv4bf16_nxv16bf16_12(<vscale x 16 x bfloat> %in) {
1013 ; CHECK-LABEL: extract_nxv4bf16_nxv16bf16_12:
1015 ; CHECK-NEXT: uunpkhi z0.s, z1.h
1017 %res = call <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv16bf16(<vscale x 16 x bfloat> %in, i64 12)
1018 ret <vscale x 4 x bfloat> %res
1021 declare <vscale x 4 x bfloat> @llvm.vector.extract.nxv4bf16.nxv16bf16(<vscale x 16 x bfloat>, i64)
1025 ; Extract from a splat
1027 define <vscale x 2 x float> @extract_nxv2f32_nxv4f32_splat(float %f) {
1028 ; CHECK-LABEL: extract_nxv2f32_nxv4f32_splat:
1030 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $z0
1031 ; CHECK-NEXT: mov z0.s, s0
1033 %ins = insertelement <vscale x 4 x float> poison, float %f, i32 0
1034 %splat = shufflevector <vscale x 4 x float> %ins, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1035 %ext = call <vscale x 2 x float> @llvm.vector.extract.nxv2f32.nxv4f32(<vscale x 4 x float> %splat, i64 0)
1036 ret <vscale x 2 x float> %ext
1039 define <vscale x 2 x float> @extract_nxv2f32_nxv4f32_splat_const() {
1040 ; CHECK-LABEL: extract_nxv2f32_nxv4f32_splat_const:
1042 ; CHECK-NEXT: fmov z0.s, #1.00000000
1044 %ins = insertelement <vscale x 4 x float> poison, float 1.0, i32 0
1045 %splat = shufflevector <vscale x 4 x float> %ins, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1046 %ext = call <vscale x 2 x float> @llvm.vector.extract.nxv2f32.nxv4f32(<vscale x 4 x float> %splat, i64 0)
1047 ret <vscale x 2 x float> %ext
1050 define <vscale x 4 x i32> @extract_nxv4i32_nxv8i32_splat_const() {
1051 ; CHECK-LABEL: extract_nxv4i32_nxv8i32_splat_const:
1053 ; CHECK-NEXT: mov z0.s, #1 // =0x1
1055 %ins = insertelement <vscale x 8 x i32> poison, i32 1, i32 0
1056 %splat = shufflevector <vscale x 8 x i32> %ins, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1057 %ext = call <vscale x 4 x i32> @llvm.vector.extract.nxv4i32.nxv8i32(<vscale x 8 x i32> %splat, i64 0)
1058 ret <vscale x 4 x i32> %ext
1061 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_all_ones() {
1062 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_all_ones:
1064 ; CHECK-NEXT: ptrue p0.d
1066 %ins = insertelement <vscale x 16 x i1> poison, i1 1, i32 0
1067 %splat = shufflevector <vscale x 16 x i1> %ins, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1068 %ext = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> %splat, i64 0)
1069 ret <vscale x 2 x i1> %ext
1072 define <vscale x 2 x i1> @extract_nxv2i1_nxv16i1_all_zero() {
1073 ; CHECK-LABEL: extract_nxv2i1_nxv16i1_all_zero:
1075 ; CHECK-NEXT: pfalse p0.b
1077 %ext = call <vscale x 2 x i1> @llvm.vector.extract.nxv2i1.nxv16i1(<vscale x 16 x i1> zeroinitializer, i64 0)
1078 ret <vscale x 2 x i1> %ext
1081 declare <vscale x 2 x float> @llvm.vector.extract.nxv2f32.nxv4f32(<vscale x 4 x float>, i64)
1082 declare <vscale x 4 x i32> @llvm.vector.extract.nxv4i32.nxv8i32(<vscale x 8 x i32>, i64)
1085 ; Extract nxv1i1 type from: nxv2i1
1088 define <vscale x 1 x i1> @extract_nxv1i1_nxv2i1_0(<vscale x 2 x i1> %in) {
1089 ; CHECK-LABEL: extract_nxv1i1_nxv2i1_0:
1091 ; CHECK-NEXT: punpklo p0.h, p0.b
1093 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv2i1(<vscale x 2 x i1> %in, i64 0)
1094 ret <vscale x 1 x i1> %res
1097 define <vscale x 1 x i1> @extract_nxv1i1_nxv2i1_1(<vscale x 2 x i1> %in) {
1098 ; CHECK-LABEL: extract_nxv1i1_nxv2i1_1:
1100 ; CHECK-NEXT: punpkhi p0.h, p0.b
1102 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv2i1(<vscale x 2 x i1> %in, i64 1)
1103 ret <vscale x 1 x i1> %res
1107 ; Extract nxv1i1 type from: nxv4i1
1110 define <vscale x 1 x i1> @extract_nxv1i1_nxv4i1_0(<vscale x 4 x i1> %in) {
1111 ; CHECK-LABEL: extract_nxv1i1_nxv4i1_0:
1113 ; CHECK-NEXT: punpklo p0.h, p0.b
1114 ; CHECK-NEXT: punpklo p0.h, p0.b
1116 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv4i1(<vscale x 4 x i1> %in, i64 0)
1117 ret <vscale x 1 x i1> %res
1120 define <vscale x 1 x i1> @extract_nxv1i1_nxv4i1_1(<vscale x 4 x i1> %in) {
1121 ; CHECK-LABEL: extract_nxv1i1_nxv4i1_1:
1123 ; CHECK-NEXT: punpklo p0.h, p0.b
1124 ; CHECK-NEXT: punpkhi p0.h, p0.b
1126 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv4i1(<vscale x 4 x i1> %in, i64 1)
1127 ret <vscale x 1 x i1> %res
1130 define <vscale x 1 x i1> @extract_nxv1i1_nxv4i1_2(<vscale x 4 x i1> %in) {
1131 ; CHECK-LABEL: extract_nxv1i1_nxv4i1_2:
1133 ; CHECK-NEXT: punpkhi p0.h, p0.b
1134 ; CHECK-NEXT: punpklo p0.h, p0.b
1136 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv4i1(<vscale x 4 x i1> %in, i64 2)
1137 ret <vscale x 1 x i1> %res
1140 define <vscale x 1 x i1> @extract_nxv1i1_nxv4i1_3(<vscale x 4 x i1> %in) {
1141 ; CHECK-LABEL: extract_nxv1i1_nxv4i1_3:
1143 ; CHECK-NEXT: punpkhi p0.h, p0.b
1144 ; CHECK-NEXT: punpkhi p0.h, p0.b
1146 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv4i1(<vscale x 4 x i1> %in, i64 3)
1147 ret <vscale x 1 x i1> %res
1151 ; Extract nxv1i1 type from: nxv8i1
1154 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_0(<vscale x 8 x i1> %in) {
1155 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_0:
1157 ; CHECK-NEXT: punpklo p0.h, p0.b
1158 ; CHECK-NEXT: punpklo p0.h, p0.b
1159 ; CHECK-NEXT: punpklo p0.h, p0.b
1161 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 0)
1162 ret <vscale x 1 x i1> %res
1165 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_1(<vscale x 8 x i1> %in) {
1166 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_1:
1168 ; CHECK-NEXT: punpklo p0.h, p0.b
1169 ; CHECK-NEXT: punpklo p0.h, p0.b
1170 ; CHECK-NEXT: punpkhi p0.h, p0.b
1172 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 1)
1173 ret <vscale x 1 x i1> %res
1176 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_2(<vscale x 8 x i1> %in) {
1177 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_2:
1179 ; CHECK-NEXT: punpklo p0.h, p0.b
1180 ; CHECK-NEXT: punpkhi p0.h, p0.b
1181 ; CHECK-NEXT: punpklo p0.h, p0.b
1183 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 2)
1184 ret <vscale x 1 x i1> %res
1187 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_3(<vscale x 8 x i1> %in) {
1188 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_3:
1190 ; CHECK-NEXT: punpklo p0.h, p0.b
1191 ; CHECK-NEXT: punpkhi p0.h, p0.b
1192 ; CHECK-NEXT: punpkhi p0.h, p0.b
1194 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 3)
1195 ret <vscale x 1 x i1> %res
1198 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_4(<vscale x 8 x i1> %in) {
1199 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_4:
1201 ; CHECK-NEXT: punpkhi p0.h, p0.b
1202 ; CHECK-NEXT: punpklo p0.h, p0.b
1203 ; CHECK-NEXT: punpklo p0.h, p0.b
1205 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 4)
1206 ret <vscale x 1 x i1> %res
1209 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_5(<vscale x 8 x i1> %in) {
1210 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_5:
1212 ; CHECK-NEXT: punpkhi p0.h, p0.b
1213 ; CHECK-NEXT: punpklo p0.h, p0.b
1214 ; CHECK-NEXT: punpkhi p0.h, p0.b
1216 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 5)
1217 ret <vscale x 1 x i1> %res
1220 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_6(<vscale x 8 x i1> %in) {
1221 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_6:
1223 ; CHECK-NEXT: punpkhi p0.h, p0.b
1224 ; CHECK-NEXT: punpkhi p0.h, p0.b
1225 ; CHECK-NEXT: punpklo p0.h, p0.b
1227 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 6)
1228 ret <vscale x 1 x i1> %res
1231 define <vscale x 1 x i1> @extract_nxv1i1_nxv8i1_7(<vscale x 8 x i1> %in) {
1232 ; CHECK-LABEL: extract_nxv1i1_nxv8i1_7:
1234 ; CHECK-NEXT: punpkhi p0.h, p0.b
1235 ; CHECK-NEXT: punpkhi p0.h, p0.b
1236 ; CHECK-NEXT: punpkhi p0.h, p0.b
1238 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1> %in, i64 7)
1239 ret <vscale x 1 x i1> %res
1244 ; Extract nxv1i1 type from: nxv16i1
1247 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_0(<vscale x 16 x i1> %in) {
1248 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_0:
1250 ; CHECK-NEXT: punpklo p0.h, p0.b
1251 ; CHECK-NEXT: punpklo p0.h, p0.b
1252 ; CHECK-NEXT: punpklo p0.h, p0.b
1253 ; CHECK-NEXT: punpklo p0.h, p0.b
1255 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 0)
1256 ret <vscale x 1 x i1> %res
1259 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_1(<vscale x 16 x i1> %in) {
1260 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_1:
1262 ; CHECK-NEXT: punpklo p0.h, p0.b
1263 ; CHECK-NEXT: punpklo p0.h, p0.b
1264 ; CHECK-NEXT: punpklo p0.h, p0.b
1265 ; CHECK-NEXT: punpkhi p0.h, p0.b
1267 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 1)
1268 ret <vscale x 1 x i1> %res
1271 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_2(<vscale x 16 x i1> %in) {
1272 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_2:
1274 ; CHECK-NEXT: punpklo p0.h, p0.b
1275 ; CHECK-NEXT: punpklo p0.h, p0.b
1276 ; CHECK-NEXT: punpkhi p0.h, p0.b
1277 ; CHECK-NEXT: punpklo p0.h, p0.b
1279 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 2)
1280 ret <vscale x 1 x i1> %res
1283 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_3(<vscale x 16 x i1> %in) {
1284 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_3:
1286 ; CHECK-NEXT: punpklo p0.h, p0.b
1287 ; CHECK-NEXT: punpklo p0.h, p0.b
1288 ; CHECK-NEXT: punpkhi p0.h, p0.b
1289 ; CHECK-NEXT: punpkhi p0.h, p0.b
1291 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 3)
1292 ret <vscale x 1 x i1> %res
1295 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_4(<vscale x 16 x i1> %in) {
1296 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_4:
1298 ; CHECK-NEXT: punpklo p0.h, p0.b
1299 ; CHECK-NEXT: punpkhi p0.h, p0.b
1300 ; CHECK-NEXT: punpklo p0.h, p0.b
1301 ; CHECK-NEXT: punpklo p0.h, p0.b
1303 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 4)
1304 ret <vscale x 1 x i1> %res
1307 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_5(<vscale x 16 x i1> %in) {
1308 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_5:
1310 ; CHECK-NEXT: punpklo p0.h, p0.b
1311 ; CHECK-NEXT: punpkhi p0.h, p0.b
1312 ; CHECK-NEXT: punpklo p0.h, p0.b
1313 ; CHECK-NEXT: punpkhi p0.h, p0.b
1315 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 5)
1316 ret <vscale x 1 x i1> %res
1319 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_6(<vscale x 16 x i1> %in) {
1320 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_6:
1322 ; CHECK-NEXT: punpklo p0.h, p0.b
1323 ; CHECK-NEXT: punpkhi p0.h, p0.b
1324 ; CHECK-NEXT: punpkhi p0.h, p0.b
1325 ; CHECK-NEXT: punpklo p0.h, p0.b
1327 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 6)
1328 ret <vscale x 1 x i1> %res
1331 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_7(<vscale x 16 x i1> %in) {
1332 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_7:
1334 ; CHECK-NEXT: punpklo p0.h, p0.b
1335 ; CHECK-NEXT: punpkhi p0.h, p0.b
1336 ; CHECK-NEXT: punpkhi p0.h, p0.b
1337 ; CHECK-NEXT: punpkhi p0.h, p0.b
1339 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 7)
1340 ret <vscale x 1 x i1> %res
1343 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_8(<vscale x 16 x i1> %in) {
1344 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_8:
1346 ; CHECK-NEXT: punpkhi p0.h, p0.b
1347 ; CHECK-NEXT: punpklo p0.h, p0.b
1348 ; CHECK-NEXT: punpklo p0.h, p0.b
1349 ; CHECK-NEXT: punpklo p0.h, p0.b
1351 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 8)
1352 ret <vscale x 1 x i1> %res
1355 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_9(<vscale x 16 x i1> %in) {
1356 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_9:
1358 ; CHECK-NEXT: punpkhi p0.h, p0.b
1359 ; CHECK-NEXT: punpklo p0.h, p0.b
1360 ; CHECK-NEXT: punpklo p0.h, p0.b
1361 ; CHECK-NEXT: punpkhi p0.h, p0.b
1363 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 9)
1364 ret <vscale x 1 x i1> %res
1367 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_10(<vscale x 16 x i1> %in) {
1368 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_10:
1370 ; CHECK-NEXT: punpkhi p0.h, p0.b
1371 ; CHECK-NEXT: punpklo p0.h, p0.b
1372 ; CHECK-NEXT: punpkhi p0.h, p0.b
1373 ; CHECK-NEXT: punpklo p0.h, p0.b
1375 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 10)
1376 ret <vscale x 1 x i1> %res
1379 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_11(<vscale x 16 x i1> %in) {
1380 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_11:
1382 ; CHECK-NEXT: punpkhi p0.h, p0.b
1383 ; CHECK-NEXT: punpklo p0.h, p0.b
1384 ; CHECK-NEXT: punpkhi p0.h, p0.b
1385 ; CHECK-NEXT: punpkhi p0.h, p0.b
1387 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 11)
1388 ret <vscale x 1 x i1> %res
1391 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_12(<vscale x 16 x i1> %in) {
1392 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_12:
1394 ; CHECK-NEXT: punpkhi p0.h, p0.b
1395 ; CHECK-NEXT: punpkhi p0.h, p0.b
1396 ; CHECK-NEXT: punpklo p0.h, p0.b
1397 ; CHECK-NEXT: punpklo p0.h, p0.b
1399 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 12)
1400 ret <vscale x 1 x i1> %res
1403 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_13(<vscale x 16 x i1> %in) {
1404 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_13:
1406 ; CHECK-NEXT: punpkhi p0.h, p0.b
1407 ; CHECK-NEXT: punpkhi p0.h, p0.b
1408 ; CHECK-NEXT: punpklo p0.h, p0.b
1409 ; CHECK-NEXT: punpkhi p0.h, p0.b
1411 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 13)
1412 ret <vscale x 1 x i1> %res
1415 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_14(<vscale x 16 x i1> %in) {
1416 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_14:
1418 ; CHECK-NEXT: punpkhi p0.h, p0.b
1419 ; CHECK-NEXT: punpkhi p0.h, p0.b
1420 ; CHECK-NEXT: punpkhi p0.h, p0.b
1421 ; CHECK-NEXT: punpklo p0.h, p0.b
1423 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 14)
1424 ret <vscale x 1 x i1> %res
1427 define <vscale x 1 x i1> @extract_nxv1i1_nxv16i1_15(<vscale x 16 x i1> %in) {
1428 ; CHECK-LABEL: extract_nxv1i1_nxv16i1_15:
1430 ; CHECK-NEXT: punpkhi p0.h, p0.b
1431 ; CHECK-NEXT: punpkhi p0.h, p0.b
1432 ; CHECK-NEXT: punpkhi p0.h, p0.b
1433 ; CHECK-NEXT: punpkhi p0.h, p0.b
1435 %res = call <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1> %in, i64 15)
1436 ret <vscale x 1 x i1> %res
1439 declare <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv2i1(<vscale x 2 x i1>, i64)
1440 declare <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv4i1(<vscale x 4 x i1>, i64)
1441 declare <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv8i1(<vscale x 8 x i1>, i64)
1442 declare <vscale x 1 x i1> @llvm.vector.extract.nxv1i1.nxv16i1(<vscale x 16 x i1>, i64)