1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+v -run-pass=instruction-select -simplify-mir \
3 # RUN: -verify-machineinstrs %s -o - | FileCheck -check-prefix=RV32I %s
4 # RUN: llc -mtriple=riscv64 -mattr=+v -run-pass=instruction-select -simplify-mir \
5 # RUN: -verify-machineinstrs %s -o - | FileCheck -check-prefix=RV64I %s
8 name: anyext_nxv1i16_nxv1i8
11 tracksRegLiveness: true
16 ; RV32I-LABEL: name: anyext_nxv1i16_nxv1i8
19 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
20 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
21 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_MF4 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
22 ; RV32I-NEXT: $v8 = COPY %1
23 ; RV32I-NEXT: PseudoRET implicit $v8
25 ; RV64I-LABEL: name: anyext_nxv1i16_nxv1i8
28 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
29 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
30 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_MF4 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
31 ; RV64I-NEXT: $v8 = COPY %1
32 ; RV64I-NEXT: PseudoRET implicit $v8
33 %0:vrb(<vscale x 1 x s8>) = COPY $v8
34 %1:vrb(<vscale x 1 x s16>) = G_ANYEXT %0(<vscale x 1 x s8>)
35 $v8 = COPY %1(<vscale x 1 x s16>)
36 PseudoRET implicit $v8
40 name: anyext_nxv1i32_nxv1i8
43 tracksRegLiveness: true
48 ; RV32I-LABEL: name: anyext_nxv1i32_nxv1i8
51 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
52 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
53 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF4_MF2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
54 ; RV32I-NEXT: $v8 = COPY %1
55 ; RV32I-NEXT: PseudoRET implicit $v8
57 ; RV64I-LABEL: name: anyext_nxv1i32_nxv1i8
60 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
61 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
62 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF4_MF2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
63 ; RV64I-NEXT: $v8 = COPY %1
64 ; RV64I-NEXT: PseudoRET implicit $v8
65 %0:vrb(<vscale x 1 x s8>) = COPY $v8
66 %1:vrb(<vscale x 1 x s32>) = G_ANYEXT %0(<vscale x 1 x s8>)
67 $v8 = COPY %1(<vscale x 1 x s32>)
68 PseudoRET implicit $v8
72 name: anyext_nxv1i64_nxv1i8
75 tracksRegLiveness: true
80 ; RV32I-LABEL: name: anyext_nxv1i64_nxv1i8
83 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
84 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
85 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF8_M1 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
86 ; RV32I-NEXT: $v8 = COPY %1
87 ; RV32I-NEXT: PseudoRET implicit $v8
89 ; RV64I-LABEL: name: anyext_nxv1i64_nxv1i8
92 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
93 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
94 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF8_M1 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
95 ; RV64I-NEXT: $v8 = COPY %1
96 ; RV64I-NEXT: PseudoRET implicit $v8
97 %0:vrb(<vscale x 1 x s8>) = COPY $v8
98 %1:vrb(<vscale x 1 x s64>) = G_ANYEXT %0(<vscale x 1 x s8>)
99 $v8 = COPY %1(<vscale x 1 x s64>)
100 PseudoRET implicit $v8
104 name: anyext_nxv2i16_nxv2i8
106 regBankSelected: true
107 tracksRegLiveness: true
112 ; RV32I-LABEL: name: anyext_nxv2i16_nxv2i8
113 ; RV32I: liveins: $v8
115 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
116 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
117 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_MF2 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
118 ; RV32I-NEXT: $v8 = COPY %1
119 ; RV32I-NEXT: PseudoRET implicit $v8
121 ; RV64I-LABEL: name: anyext_nxv2i16_nxv2i8
122 ; RV64I: liveins: $v8
124 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
125 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
126 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_MF2 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
127 ; RV64I-NEXT: $v8 = COPY %1
128 ; RV64I-NEXT: PseudoRET implicit $v8
129 %0:vrb(<vscale x 2 x s8>) = COPY $v8
130 %1:vrb(<vscale x 2 x s16>) = G_ANYEXT %0(<vscale x 2 x s8>)
131 $v8 = COPY %1(<vscale x 2 x s16>)
132 PseudoRET implicit $v8
136 name: anyext_nxv2i32_nxv2i8
138 regBankSelected: true
139 tracksRegLiveness: true
144 ; RV32I-LABEL: name: anyext_nxv2i32_nxv2i8
145 ; RV32I: liveins: $v8
147 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
148 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
149 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF4_M1 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
150 ; RV32I-NEXT: $v8 = COPY %1
151 ; RV32I-NEXT: PseudoRET implicit $v8
153 ; RV64I-LABEL: name: anyext_nxv2i32_nxv2i8
154 ; RV64I: liveins: $v8
156 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
157 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
158 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF4_M1 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
159 ; RV64I-NEXT: $v8 = COPY %1
160 ; RV64I-NEXT: PseudoRET implicit $v8
161 %0:vrb(<vscale x 2 x s8>) = COPY $v8
162 %1:vrb(<vscale x 2 x s32>) = G_ANYEXT %0(<vscale x 2 x s8>)
163 $v8 = COPY %1(<vscale x 2 x s32>)
164 PseudoRET implicit $v8
168 name: anyext_nxv2i64_nxv2i8
170 regBankSelected: true
171 tracksRegLiveness: true
176 ; RV32I-LABEL: name: anyext_nxv2i64_nxv2i8
177 ; RV32I: liveins: $v8
179 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
180 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
181 ; RV32I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF8_M2 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
182 ; RV32I-NEXT: $v8m2 = COPY %1
183 ; RV32I-NEXT: PseudoRET implicit $v8m2
185 ; RV64I-LABEL: name: anyext_nxv2i64_nxv2i8
186 ; RV64I: liveins: $v8
188 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
189 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
190 ; RV64I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF8_M2 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
191 ; RV64I-NEXT: $v8m2 = COPY %1
192 ; RV64I-NEXT: PseudoRET implicit $v8m2
193 %0:vrb(<vscale x 2 x s8>) = COPY $v8
194 %1:vrb(<vscale x 2 x s64>) = G_ANYEXT %0(<vscale x 2 x s8>)
195 $v8m2 = COPY %1(<vscale x 2 x s64>)
196 PseudoRET implicit $v8m2
200 name: anyext_nxv4i16_nxv4i8
202 regBankSelected: true
203 tracksRegLiveness: true
208 ; RV32I-LABEL: name: anyext_nxv4i16_nxv4i8
209 ; RV32I: liveins: $v8
211 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
212 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
213 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_M1 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
214 ; RV32I-NEXT: $v8 = COPY %1
215 ; RV32I-NEXT: PseudoRET implicit $v8
217 ; RV64I-LABEL: name: anyext_nxv4i16_nxv4i8
218 ; RV64I: liveins: $v8
220 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
221 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
222 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_M1 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
223 ; RV64I-NEXT: $v8 = COPY %1
224 ; RV64I-NEXT: PseudoRET implicit $v8
225 %0:vrb(<vscale x 4 x s8>) = COPY $v8
226 %1:vrb(<vscale x 4 x s16>) = G_ANYEXT %0(<vscale x 4 x s8>)
227 $v8 = COPY %1(<vscale x 4 x s16>)
228 PseudoRET implicit $v8
232 name: anyext_nxv4i32_nxv4i8
234 regBankSelected: true
235 tracksRegLiveness: true
240 ; RV32I-LABEL: name: anyext_nxv4i32_nxv4i8
241 ; RV32I: liveins: $v8
243 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
244 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
245 ; RV32I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF4_M2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
246 ; RV32I-NEXT: $v8m2 = COPY %1
247 ; RV32I-NEXT: PseudoRET implicit $v8m2
249 ; RV64I-LABEL: name: anyext_nxv4i32_nxv4i8
250 ; RV64I: liveins: $v8
252 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
253 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
254 ; RV64I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF4_M2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
255 ; RV64I-NEXT: $v8m2 = COPY %1
256 ; RV64I-NEXT: PseudoRET implicit $v8m2
257 %0:vrb(<vscale x 4 x s8>) = COPY $v8
258 %1:vrb(<vscale x 4 x s32>) = G_ANYEXT %0(<vscale x 4 x s8>)
259 $v8m2 = COPY %1(<vscale x 4 x s32>)
260 PseudoRET implicit $v8m2
264 name: anyext_nxv4i64_nxv4i8
266 regBankSelected: true
267 tracksRegLiveness: true
272 ; RV32I-LABEL: name: anyext_nxv4i64_nxv4i8
273 ; RV32I: liveins: $v8
275 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
276 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
277 ; RV32I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF8_M4 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
278 ; RV32I-NEXT: $v8m4 = COPY %1
279 ; RV32I-NEXT: PseudoRET implicit $v8m4
281 ; RV64I-LABEL: name: anyext_nxv4i64_nxv4i8
282 ; RV64I: liveins: $v8
284 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
285 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
286 ; RV64I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF8_M4 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
287 ; RV64I-NEXT: $v8m4 = COPY %1
288 ; RV64I-NEXT: PseudoRET implicit $v8m4
289 %0:vrb(<vscale x 4 x s8>) = COPY $v8
290 %1:vrb(<vscale x 4 x s64>) = G_ANYEXT %0(<vscale x 4 x s8>)
291 $v8m4 = COPY %1(<vscale x 4 x s64>)
292 PseudoRET implicit $v8m4
296 name: anyext_nxv8i16_nxv8i8
298 regBankSelected: true
299 tracksRegLiveness: true
304 ; RV32I-LABEL: name: anyext_nxv8i16_nxv8i8
305 ; RV32I: liveins: $v8
307 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
308 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
309 ; RV32I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF2_M2 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
310 ; RV32I-NEXT: $v8m2 = COPY %1
311 ; RV32I-NEXT: PseudoRET implicit $v8m2
313 ; RV64I-LABEL: name: anyext_nxv8i16_nxv8i8
314 ; RV64I: liveins: $v8
316 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
317 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
318 ; RV64I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF2_M2 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
319 ; RV64I-NEXT: $v8m2 = COPY %1
320 ; RV64I-NEXT: PseudoRET implicit $v8m2
321 %0:vrb(<vscale x 8 x s8>) = COPY $v8
322 %1:vrb(<vscale x 8 x s16>) = G_ANYEXT %0(<vscale x 8 x s8>)
323 $v8m2 = COPY %1(<vscale x 8 x s16>)
324 PseudoRET implicit $v8m2
328 name: anyext_nxv8i32_nxv8i8
330 regBankSelected: true
331 tracksRegLiveness: true
336 ; RV32I-LABEL: name: anyext_nxv8i32_nxv8i8
337 ; RV32I: liveins: $v8
339 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
340 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
341 ; RV32I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF4_M4 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
342 ; RV32I-NEXT: $v8m4 = COPY %1
343 ; RV32I-NEXT: PseudoRET implicit $v8m4
345 ; RV64I-LABEL: name: anyext_nxv8i32_nxv8i8
346 ; RV64I: liveins: $v8
348 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
349 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
350 ; RV64I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF4_M4 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
351 ; RV64I-NEXT: $v8m4 = COPY %1
352 ; RV64I-NEXT: PseudoRET implicit $v8m4
353 %0:vrb(<vscale x 8 x s8>) = COPY $v8
354 %1:vrb(<vscale x 8 x s32>) = G_ANYEXT %0(<vscale x 8 x s8>)
355 $v8m4 = COPY %1(<vscale x 8 x s32>)
356 PseudoRET implicit $v8m4
360 name: anyext_nxv8i64_nxv8i8
362 regBankSelected: true
363 tracksRegLiveness: true
368 ; RV32I-LABEL: name: anyext_nxv8i64_nxv8i8
369 ; RV32I: liveins: $v8
371 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
372 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
373 ; RV32I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF8_M8 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
374 ; RV32I-NEXT: $v8m8 = COPY %1
375 ; RV32I-NEXT: PseudoRET implicit $v8m8
377 ; RV64I-LABEL: name: anyext_nxv8i64_nxv8i8
378 ; RV64I: liveins: $v8
380 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
381 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
382 ; RV64I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF8_M8 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
383 ; RV64I-NEXT: $v8m8 = COPY %1
384 ; RV64I-NEXT: PseudoRET implicit $v8m8
385 %0:vrb(<vscale x 8 x s8>) = COPY $v8
386 %1:vrb(<vscale x 8 x s64>) = G_ANYEXT %0(<vscale x 8 x s8>)
387 $v8m8 = COPY %1(<vscale x 8 x s64>)
388 PseudoRET implicit $v8m8
392 name: anyext_nxv16i16_nxv16i8
394 regBankSelected: true
395 tracksRegLiveness: true
400 ; RV32I-LABEL: name: anyext_nxv16i16_nxv16i8
401 ; RV32I: liveins: $v8m2
403 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
404 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
405 ; RV32I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF2_M4 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
406 ; RV32I-NEXT: $v8m4 = COPY %1
407 ; RV32I-NEXT: PseudoRET implicit $v8m4
409 ; RV64I-LABEL: name: anyext_nxv16i16_nxv16i8
410 ; RV64I: liveins: $v8m2
412 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
413 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
414 ; RV64I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF2_M4 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
415 ; RV64I-NEXT: $v8m4 = COPY %1
416 ; RV64I-NEXT: PseudoRET implicit $v8m4
417 %0:vrb(<vscale x 16 x s8>) = COPY $v8m2
418 %1:vrb(<vscale x 16 x s16>) = G_ANYEXT %0(<vscale x 16 x s8>)
419 $v8m4 = COPY %1(<vscale x 16 x s16>)
420 PseudoRET implicit $v8m4
424 name: anyext_nxv16i32_nxv16i8
426 regBankSelected: true
427 tracksRegLiveness: true
432 ; RV32I-LABEL: name: anyext_nxv16i32_nxv16i8
433 ; RV32I: liveins: $v8m2
435 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
436 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
437 ; RV32I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF4_M8 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
438 ; RV32I-NEXT: $v8m8 = COPY %1
439 ; RV32I-NEXT: PseudoRET implicit $v8m8
441 ; RV64I-LABEL: name: anyext_nxv16i32_nxv16i8
442 ; RV64I: liveins: $v8m2
444 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
445 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
446 ; RV64I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF4_M8 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
447 ; RV64I-NEXT: $v8m8 = COPY %1
448 ; RV64I-NEXT: PseudoRET implicit $v8m8
449 %0:vrb(<vscale x 16 x s8>) = COPY $v8m2
450 %1:vrb(<vscale x 16 x s32>) = G_ANYEXT %0(<vscale x 16 x s8>)
451 $v8m8 = COPY %1(<vscale x 16 x s32>)
452 PseudoRET implicit $v8m8
456 name: anyext_nxv32i16_nxv32i8
458 regBankSelected: true
459 tracksRegLiveness: true
464 ; RV32I-LABEL: name: anyext_nxv32i16_nxv32i8
465 ; RV32I: liveins: $v8m4
467 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
468 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
469 ; RV32I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF2_M8 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
470 ; RV32I-NEXT: $v8m8 = COPY %1
471 ; RV32I-NEXT: PseudoRET implicit $v8m8
473 ; RV64I-LABEL: name: anyext_nxv32i16_nxv32i8
474 ; RV64I: liveins: $v8m4
476 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
477 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
478 ; RV64I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF2_M8 [[DEF]], [[COPY]], -1, 4 /* e16 */, 3 /* ta, ma */
479 ; RV64I-NEXT: $v8m8 = COPY %1
480 ; RV64I-NEXT: PseudoRET implicit $v8m8
481 %0:vrb(<vscale x 32 x s8>) = COPY $v8m4
482 %1:vrb(<vscale x 32 x s16>) = G_ANYEXT %0(<vscale x 32 x s8>)
483 $v8m8 = COPY %1(<vscale x 32 x s16>)
484 PseudoRET implicit $v8m8
488 name: anyext_nxv1i32_nxv1i16
490 regBankSelected: true
491 tracksRegLiveness: true
496 ; RV32I-LABEL: name: anyext_nxv1i32_nxv1i16
497 ; RV32I: liveins: $v8
499 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
500 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
501 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_MF2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
502 ; RV32I-NEXT: $v8 = COPY %1
503 ; RV32I-NEXT: PseudoRET implicit $v8
505 ; RV64I-LABEL: name: anyext_nxv1i32_nxv1i16
506 ; RV64I: liveins: $v8
508 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
509 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
510 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_MF2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
511 ; RV64I-NEXT: $v8 = COPY %1
512 ; RV64I-NEXT: PseudoRET implicit $v8
513 %0:vrb(<vscale x 1 x s16>) = COPY $v8
514 %1:vrb(<vscale x 1 x s32>) = G_ANYEXT %0(<vscale x 1 x s16>)
515 $v8 = COPY %1(<vscale x 1 x s32>)
516 PseudoRET implicit $v8
520 name: anyext_nxv1i64_nxv1i16
522 regBankSelected: true
523 tracksRegLiveness: true
528 ; RV32I-LABEL: name: anyext_nxv1i64_nxv1i16
529 ; RV32I: liveins: $v8
531 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
532 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
533 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF4_M1 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
534 ; RV32I-NEXT: $v8 = COPY %1
535 ; RV32I-NEXT: PseudoRET implicit $v8
537 ; RV64I-LABEL: name: anyext_nxv1i64_nxv1i16
538 ; RV64I: liveins: $v8
540 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
541 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
542 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF4_M1 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
543 ; RV64I-NEXT: $v8 = COPY %1
544 ; RV64I-NEXT: PseudoRET implicit $v8
545 %0:vrb(<vscale x 1 x s16>) = COPY $v8
546 %1:vrb(<vscale x 1 x s64>) = G_ANYEXT %0(<vscale x 1 x s16>)
547 $v8 = COPY %1(<vscale x 1 x s64>)
548 PseudoRET implicit $v8
552 name: anyext_nxv2i32_nxv2i16
554 regBankSelected: true
555 tracksRegLiveness: true
560 ; RV32I-LABEL: name: anyext_nxv2i32_nxv2i16
561 ; RV32I: liveins: $v8
563 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
564 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
565 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_M1 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
566 ; RV32I-NEXT: $v8 = COPY %1
567 ; RV32I-NEXT: PseudoRET implicit $v8
569 ; RV64I-LABEL: name: anyext_nxv2i32_nxv2i16
570 ; RV64I: liveins: $v8
572 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
573 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
574 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_M1 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
575 ; RV64I-NEXT: $v8 = COPY %1
576 ; RV64I-NEXT: PseudoRET implicit $v8
577 %0:vrb(<vscale x 2 x s16>) = COPY $v8
578 %1:vrb(<vscale x 2 x s32>) = G_ANYEXT %0(<vscale x 2 x s16>)
579 $v8 = COPY %1(<vscale x 2 x s32>)
580 PseudoRET implicit $v8
584 name: anyext_nxv2i64_nxv2i16
586 regBankSelected: true
587 tracksRegLiveness: true
592 ; RV32I-LABEL: name: anyext_nxv2i64_nxv2i16
593 ; RV32I: liveins: $v8
595 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
596 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
597 ; RV32I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF4_M2 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
598 ; RV32I-NEXT: $v8m2 = COPY %1
599 ; RV32I-NEXT: PseudoRET implicit $v8m2
601 ; RV64I-LABEL: name: anyext_nxv2i64_nxv2i16
602 ; RV64I: liveins: $v8
604 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
605 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
606 ; RV64I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF4_M2 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
607 ; RV64I-NEXT: $v8m2 = COPY %1
608 ; RV64I-NEXT: PseudoRET implicit $v8m2
609 %0:vrb(<vscale x 2 x s16>) = COPY $v8
610 %1:vrb(<vscale x 2 x s64>) = G_ANYEXT %0(<vscale x 2 x s16>)
611 $v8m2 = COPY %1(<vscale x 2 x s64>)
612 PseudoRET implicit $v8m2
616 name: anyext_nxv4i32_nxv4i16
618 regBankSelected: true
619 tracksRegLiveness: true
624 ; RV32I-LABEL: name: anyext_nxv4i32_nxv4i16
625 ; RV32I: liveins: $v8
627 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
628 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
629 ; RV32I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF2_M2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
630 ; RV32I-NEXT: $v8m2 = COPY %1
631 ; RV32I-NEXT: PseudoRET implicit $v8m2
633 ; RV64I-LABEL: name: anyext_nxv4i32_nxv4i16
634 ; RV64I: liveins: $v8
636 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
637 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
638 ; RV64I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF2_M2 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
639 ; RV64I-NEXT: $v8m2 = COPY %1
640 ; RV64I-NEXT: PseudoRET implicit $v8m2
641 %0:vrb(<vscale x 4 x s16>) = COPY $v8
642 %1:vrb(<vscale x 4 x s32>) = G_ANYEXT %0(<vscale x 4 x s16>)
643 $v8m2 = COPY %1(<vscale x 4 x s32>)
644 PseudoRET implicit $v8m2
648 name: anyext_nxv4i64_nxv4i16
650 regBankSelected: true
651 tracksRegLiveness: true
656 ; RV32I-LABEL: name: anyext_nxv4i64_nxv4i16
657 ; RV32I: liveins: $v8
659 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
660 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
661 ; RV32I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF4_M4 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
662 ; RV32I-NEXT: $v8m4 = COPY %1
663 ; RV32I-NEXT: PseudoRET implicit $v8m4
665 ; RV64I-LABEL: name: anyext_nxv4i64_nxv4i16
666 ; RV64I: liveins: $v8
668 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
669 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
670 ; RV64I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF4_M4 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
671 ; RV64I-NEXT: $v8m4 = COPY %1
672 ; RV64I-NEXT: PseudoRET implicit $v8m4
673 %0:vrb(<vscale x 4 x s16>) = COPY $v8
674 %1:vrb(<vscale x 4 x s64>) = G_ANYEXT %0(<vscale x 4 x s16>)
675 $v8m4 = COPY %1(<vscale x 4 x s64>)
676 PseudoRET implicit $v8m4
680 name: anyext_nxv8i32_nxv8i16
682 regBankSelected: true
683 tracksRegLiveness: true
688 ; RV32I-LABEL: name: anyext_nxv8i32_nxv8i16
689 ; RV32I: liveins: $v8m2
691 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
692 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
693 ; RV32I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF2_M4 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
694 ; RV32I-NEXT: $v8m4 = COPY %1
695 ; RV32I-NEXT: PseudoRET implicit $v8m4
697 ; RV64I-LABEL: name: anyext_nxv8i32_nxv8i16
698 ; RV64I: liveins: $v8m2
700 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
701 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
702 ; RV64I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF2_M4 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
703 ; RV64I-NEXT: $v8m4 = COPY %1
704 ; RV64I-NEXT: PseudoRET implicit $v8m4
705 %0:vrb(<vscale x 8 x s16>) = COPY $v8m2
706 %1:vrb(<vscale x 8 x s32>) = G_ANYEXT %0(<vscale x 8 x s16>)
707 $v8m4 = COPY %1(<vscale x 8 x s32>)
708 PseudoRET implicit $v8m4
712 name: anyext_nxv8i64_nxv8i16
714 regBankSelected: true
715 tracksRegLiveness: true
720 ; RV32I-LABEL: name: anyext_nxv8i64_nxv8i16
721 ; RV32I: liveins: $v8m2
723 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
724 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
725 ; RV32I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF4_M8 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
726 ; RV32I-NEXT: $v8m8 = COPY %1
727 ; RV32I-NEXT: PseudoRET implicit $v8m8
729 ; RV64I-LABEL: name: anyext_nxv8i64_nxv8i16
730 ; RV64I: liveins: $v8m2
732 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
733 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
734 ; RV64I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF4_M8 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
735 ; RV64I-NEXT: $v8m8 = COPY %1
736 ; RV64I-NEXT: PseudoRET implicit $v8m8
737 %0:vrb(<vscale x 8 x s16>) = COPY $v8m2
738 %1:vrb(<vscale x 8 x s64>) = G_ANYEXT %0(<vscale x 8 x s16>)
739 $v8m8 = COPY %1(<vscale x 8 x s64>)
740 PseudoRET implicit $v8m8
744 name: anyext_nxv16i32_nxv16i16
746 regBankSelected: true
747 tracksRegLiveness: true
752 ; RV32I-LABEL: name: anyext_nxv16i32_nxv16i16
753 ; RV32I: liveins: $v8m4
755 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
756 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
757 ; RV32I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF2_M8 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
758 ; RV32I-NEXT: $v8m8 = COPY %1
759 ; RV32I-NEXT: PseudoRET implicit $v8m8
761 ; RV64I-LABEL: name: anyext_nxv16i32_nxv16i16
762 ; RV64I: liveins: $v8m4
764 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
765 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
766 ; RV64I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF2_M8 [[DEF]], [[COPY]], -1, 5 /* e32 */, 3 /* ta, ma */
767 ; RV64I-NEXT: $v8m8 = COPY %1
768 ; RV64I-NEXT: PseudoRET implicit $v8m8
769 %0:vrb(<vscale x 16 x s16>) = COPY $v8m4
770 %1:vrb(<vscale x 16 x s32>) = G_ANYEXT %0(<vscale x 16 x s16>)
771 $v8m8 = COPY %1(<vscale x 16 x s32>)
772 PseudoRET implicit $v8m8
776 name: anyext_nxv1i64_nxv1i32
778 regBankSelected: true
779 tracksRegLiveness: true
784 ; RV32I-LABEL: name: anyext_nxv1i64_nxv1i32
785 ; RV32I: liveins: $v8
787 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
788 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
789 ; RV32I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_M1 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
790 ; RV32I-NEXT: $v8 = COPY %1
791 ; RV32I-NEXT: PseudoRET implicit $v8
793 ; RV64I-LABEL: name: anyext_nxv1i64_nxv1i32
794 ; RV64I: liveins: $v8
796 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
797 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
798 ; RV64I-NEXT: early-clobber %1:vr = PseudoVZEXT_VF2_M1 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
799 ; RV64I-NEXT: $v8 = COPY %1
800 ; RV64I-NEXT: PseudoRET implicit $v8
801 %0:vrb(<vscale x 1 x s32>) = COPY $v8
802 %1:vrb(<vscale x 1 x s64>) = G_ANYEXT %0(<vscale x 1 x s32>)
803 $v8 = COPY %1(<vscale x 1 x s64>)
804 PseudoRET implicit $v8
808 name: anyext_nxv2i64_nxv2i32
810 regBankSelected: true
811 tracksRegLiveness: true
816 ; RV32I-LABEL: name: anyext_nxv2i64_nxv2i32
817 ; RV32I: liveins: $v8
819 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
820 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
821 ; RV32I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF2_M2 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
822 ; RV32I-NEXT: $v8m2 = COPY %1
823 ; RV32I-NEXT: PseudoRET implicit $v8m2
825 ; RV64I-LABEL: name: anyext_nxv2i64_nxv2i32
826 ; RV64I: liveins: $v8
828 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
829 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
830 ; RV64I-NEXT: early-clobber %1:vrm2 = PseudoVZEXT_VF2_M2 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
831 ; RV64I-NEXT: $v8m2 = COPY %1
832 ; RV64I-NEXT: PseudoRET implicit $v8m2
833 %0:vrb(<vscale x 2 x s32>) = COPY $v8
834 %1:vrb(<vscale x 2 x s64>) = G_ANYEXT %0(<vscale x 2 x s32>)
835 $v8m2 = COPY %1(<vscale x 2 x s64>)
836 PseudoRET implicit $v8m2
840 name: anyext_nxv4i64_nxv4i32
842 regBankSelected: true
843 tracksRegLiveness: true
848 ; RV32I-LABEL: name: anyext_nxv4i64_nxv4i32
849 ; RV32I: liveins: $v8m2
851 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
852 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
853 ; RV32I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF2_M4 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
854 ; RV32I-NEXT: $v8m4 = COPY %1
855 ; RV32I-NEXT: PseudoRET implicit $v8m4
857 ; RV64I-LABEL: name: anyext_nxv4i64_nxv4i32
858 ; RV64I: liveins: $v8m2
860 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
861 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
862 ; RV64I-NEXT: early-clobber %1:vrm4 = PseudoVZEXT_VF2_M4 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
863 ; RV64I-NEXT: $v8m4 = COPY %1
864 ; RV64I-NEXT: PseudoRET implicit $v8m4
865 %0:vrb(<vscale x 4 x s32>) = COPY $v8m2
866 %1:vrb(<vscale x 4 x s64>) = G_ANYEXT %0(<vscale x 4 x s32>)
867 $v8m4 = COPY %1(<vscale x 4 x s64>)
868 PseudoRET implicit $v8m4
872 name: anyext_nxv8i64_nxv8i32
874 regBankSelected: true
875 tracksRegLiveness: true
880 ; RV32I-LABEL: name: anyext_nxv8i64_nxv8i32
881 ; RV32I: liveins: $v8m4
883 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
884 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
885 ; RV32I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF2_M8 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
886 ; RV32I-NEXT: $v8m8 = COPY %1
887 ; RV32I-NEXT: PseudoRET implicit $v8m8
889 ; RV64I-LABEL: name: anyext_nxv8i64_nxv8i32
890 ; RV64I: liveins: $v8m4
892 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
893 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
894 ; RV64I-NEXT: early-clobber %1:vrm8 = PseudoVZEXT_VF2_M8 [[DEF]], [[COPY]], -1, 6 /* e64 */, 3 /* ta, ma */
895 ; RV64I-NEXT: $v8m8 = COPY %1
896 ; RV64I-NEXT: PseudoRET implicit $v8m8
897 %0:vrb(<vscale x 8 x s32>) = COPY $v8m4
898 %1:vrb(<vscale x 8 x s64>) = G_ANYEXT %0(<vscale x 8 x s32>)
899 $v8m8 = COPY %1(<vscale x 8 x s64>)
900 PseudoRET implicit $v8m8