1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v,+experimental-zvfbfmin,+zvfh -global-isel -stop-after=irtranslator \
3 ; RUN: -verify-machineinstrs < %s | FileCheck -check-prefixes=RV32 %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+v,+experimental-zvfbfmin,+zvfh -global-isel -stop-after=irtranslator \
5 ; RUN: -verify-machineinstrs < %s | FileCheck -check-prefixes=RV64 %s
7 ; ==========================================================================
8 ; ============================= Scalable Types =============================
9 ; ==========================================================================
11 define <vscale x 1 x i8> @test_ret_nxv1i8() {
12 ; RV32-LABEL: name: test_ret_nxv1i8
14 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s8>) = G_IMPLICIT_DEF
15 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s8>)
16 ; RV32-NEXT: PseudoRET implicit $v8
18 ; RV64-LABEL: name: test_ret_nxv1i8
20 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s8>) = G_IMPLICIT_DEF
21 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s8>)
22 ; RV64-NEXT: PseudoRET implicit $v8
24 ret <vscale x 1 x i8> undef
27 define <vscale x 2 x i8> @test_ret_nxv2i8() {
28 ; RV32-LABEL: name: test_ret_nxv2i8
30 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s8>) = G_IMPLICIT_DEF
31 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s8>)
32 ; RV32-NEXT: PseudoRET implicit $v8
34 ; RV64-LABEL: name: test_ret_nxv2i8
36 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s8>) = G_IMPLICIT_DEF
37 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s8>)
38 ; RV64-NEXT: PseudoRET implicit $v8
40 ret <vscale x 2 x i8> undef
43 define <vscale x 4 x i8> @test_ret_nxv4i8() {
44 ; RV32-LABEL: name: test_ret_nxv4i8
46 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s8>) = G_IMPLICIT_DEF
47 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s8>)
48 ; RV32-NEXT: PseudoRET implicit $v8
50 ; RV64-LABEL: name: test_ret_nxv4i8
52 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s8>) = G_IMPLICIT_DEF
53 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s8>)
54 ; RV64-NEXT: PseudoRET implicit $v8
56 ret <vscale x 4 x i8> undef
59 define <vscale x 8 x i8> @test_ret_nxv8i8() {
60 ; RV32-LABEL: name: test_ret_nxv8i8
62 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s8>) = G_IMPLICIT_DEF
63 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 8 x s8>)
64 ; RV32-NEXT: PseudoRET implicit $v8
66 ; RV64-LABEL: name: test_ret_nxv8i8
68 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s8>) = G_IMPLICIT_DEF
69 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 8 x s8>)
70 ; RV64-NEXT: PseudoRET implicit $v8
72 ret <vscale x 8 x i8> undef
75 define <vscale x 16 x i8> @test_ret_nxv16i8() {
76 ; RV32-LABEL: name: test_ret_nxv16i8
78 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s8>) = G_IMPLICIT_DEF
79 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 16 x s8>)
80 ; RV32-NEXT: PseudoRET implicit $v8m2
82 ; RV64-LABEL: name: test_ret_nxv16i8
84 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s8>) = G_IMPLICIT_DEF
85 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 16 x s8>)
86 ; RV64-NEXT: PseudoRET implicit $v8m2
88 ret <vscale x 16 x i8> undef
91 define <vscale x 32 x i8> @test_ret_nxv32i8() {
92 ; RV32-LABEL: name: test_ret_nxv32i8
94 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s8>) = G_IMPLICIT_DEF
95 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 32 x s8>)
96 ; RV32-NEXT: PseudoRET implicit $v8m4
98 ; RV64-LABEL: name: test_ret_nxv32i8
100 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s8>) = G_IMPLICIT_DEF
101 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 32 x s8>)
102 ; RV64-NEXT: PseudoRET implicit $v8m4
104 ret <vscale x 32 x i8> undef
107 define <vscale x 64 x i8> @test_ret_nxv64i8() {
108 ; RV32-LABEL: name: test_ret_nxv64i8
110 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 64 x s8>) = G_IMPLICIT_DEF
111 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 64 x s8>)
112 ; RV32-NEXT: PseudoRET implicit $v8m8
114 ; RV64-LABEL: name: test_ret_nxv64i8
116 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 64 x s8>) = G_IMPLICIT_DEF
117 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 64 x s8>)
118 ; RV64-NEXT: PseudoRET implicit $v8m8
120 ret <vscale x 64 x i8> undef
123 define <vscale x 1 x i16> @test_ret_nxv1i16() {
124 ; RV32-LABEL: name: test_ret_nxv1i16
126 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
127 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
128 ; RV32-NEXT: PseudoRET implicit $v8
130 ; RV64-LABEL: name: test_ret_nxv1i16
132 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
133 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
134 ; RV64-NEXT: PseudoRET implicit $v8
136 ret <vscale x 1 x i16> undef
139 define <vscale x 2 x i16> @test_ret_nxv2i16() {
140 ; RV32-LABEL: name: test_ret_nxv2i16
142 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
143 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
144 ; RV32-NEXT: PseudoRET implicit $v8
146 ; RV64-LABEL: name: test_ret_nxv2i16
148 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
149 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
150 ; RV64-NEXT: PseudoRET implicit $v8
152 ret <vscale x 2 x i16> undef
155 define <vscale x 4 x i16> @test_ret_nxv4i16() {
156 ; RV32-LABEL: name: test_ret_nxv4i16
158 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
159 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
160 ; RV32-NEXT: PseudoRET implicit $v8
162 ; RV64-LABEL: name: test_ret_nxv4i16
164 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
165 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
166 ; RV64-NEXT: PseudoRET implicit $v8
168 ret <vscale x 4 x i16> undef
171 define <vscale x 8 x i16> @test_ret_nxv8i16() {
172 ; RV32-LABEL: name: test_ret_nxv8i16
174 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
175 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
176 ; RV32-NEXT: PseudoRET implicit $v8m2
178 ; RV64-LABEL: name: test_ret_nxv8i16
180 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
181 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
182 ; RV64-NEXT: PseudoRET implicit $v8m2
184 ret <vscale x 8 x i16> undef
187 define <vscale x 16 x i16> @test_ret_nxv16i16() {
188 ; RV32-LABEL: name: test_ret_nxv16i16
190 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
191 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
192 ; RV32-NEXT: PseudoRET implicit $v8m4
194 ; RV64-LABEL: name: test_ret_nxv16i16
196 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
197 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
198 ; RV64-NEXT: PseudoRET implicit $v8m4
200 ret <vscale x 16 x i16> undef
203 define <vscale x 32 x i16> @test_ret_nxv32i16() {
204 ; RV32-LABEL: name: test_ret_nxv32i16
206 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
207 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
208 ; RV32-NEXT: PseudoRET implicit $v8m8
210 ; RV64-LABEL: name: test_ret_nxv32i16
212 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
213 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
214 ; RV64-NEXT: PseudoRET implicit $v8m8
216 ret <vscale x 32 x i16> undef
219 define <vscale x 1 x i32> @test_ret_nxv1i32() {
220 ; RV32-LABEL: name: test_ret_nxv1i32
222 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
223 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s32>)
224 ; RV32-NEXT: PseudoRET implicit $v8
226 ; RV64-LABEL: name: test_ret_nxv1i32
228 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
229 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s32>)
230 ; RV64-NEXT: PseudoRET implicit $v8
232 ret <vscale x 1 x i32> undef
235 define <vscale x 2 x i32> @test_ret_nxv2i32() {
236 ; RV32-LABEL: name: test_ret_nxv2i32
238 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
239 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s32>)
240 ; RV32-NEXT: PseudoRET implicit $v8
242 ; RV64-LABEL: name: test_ret_nxv2i32
244 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
245 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s32>)
246 ; RV64-NEXT: PseudoRET implicit $v8
248 ret <vscale x 2 x i32> undef
251 define <vscale x 4 x i32> @test_ret_nxv4i32() {
252 ; RV32-LABEL: name: test_ret_nxv4i32
254 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
255 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 4 x s32>)
256 ; RV32-NEXT: PseudoRET implicit $v8m2
258 ; RV64-LABEL: name: test_ret_nxv4i32
260 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
261 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 4 x s32>)
262 ; RV64-NEXT: PseudoRET implicit $v8m2
264 ret <vscale x 4 x i32> undef
267 define <vscale x 8 x i32> @test_ret_nxv8i32() {
268 ; RV32-LABEL: name: test_ret_nxv8i32
270 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s32>) = G_IMPLICIT_DEF
271 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 8 x s32>)
272 ; RV32-NEXT: PseudoRET implicit $v8m4
274 ; RV64-LABEL: name: test_ret_nxv8i32
276 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s32>) = G_IMPLICIT_DEF
277 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 8 x s32>)
278 ; RV64-NEXT: PseudoRET implicit $v8m4
280 ret <vscale x 8 x i32> undef
283 define <vscale x 16 x i32> @test_ret_nxv16i32() {
284 ; RV32-LABEL: name: test_ret_nxv16i32
286 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s32>) = G_IMPLICIT_DEF
287 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 16 x s32>)
288 ; RV32-NEXT: PseudoRET implicit $v8m8
290 ; RV64-LABEL: name: test_ret_nxv16i32
292 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s32>) = G_IMPLICIT_DEF
293 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 16 x s32>)
294 ; RV64-NEXT: PseudoRET implicit $v8m8
296 ret <vscale x 16 x i32> undef
299 define <vscale x 1 x i64> @test_ret_nxv1i64() {
300 ; RV32-LABEL: name: test_ret_nxv1i64
302 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s64>) = G_IMPLICIT_DEF
303 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s64>)
304 ; RV32-NEXT: PseudoRET implicit $v8
306 ; RV64-LABEL: name: test_ret_nxv1i64
308 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s64>) = G_IMPLICIT_DEF
309 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s64>)
310 ; RV64-NEXT: PseudoRET implicit $v8
312 ret <vscale x 1 x i64> undef
315 define <vscale x 2 x i64> @test_ret_nxv2i64() {
316 ; RV32-LABEL: name: test_ret_nxv2i64
318 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s64>) = G_IMPLICIT_DEF
319 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 2 x s64>)
320 ; RV32-NEXT: PseudoRET implicit $v8m2
322 ; RV64-LABEL: name: test_ret_nxv2i64
324 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s64>) = G_IMPLICIT_DEF
325 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 2 x s64>)
326 ; RV64-NEXT: PseudoRET implicit $v8m2
328 ret <vscale x 2 x i64> undef
331 define <vscale x 4 x i64> @test_ret_nxv4i64() {
332 ; RV32-LABEL: name: test_ret_nxv4i64
334 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s64>) = G_IMPLICIT_DEF
335 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 4 x s64>)
336 ; RV32-NEXT: PseudoRET implicit $v8m4
338 ; RV64-LABEL: name: test_ret_nxv4i64
340 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s64>) = G_IMPLICIT_DEF
341 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 4 x s64>)
342 ; RV64-NEXT: PseudoRET implicit $v8m4
344 ret <vscale x 4 x i64> undef
347 define <vscale x 8 x i64> @test_ret_nxv8i64() {
348 ; RV32-LABEL: name: test_ret_nxv8i64
350 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s64>) = G_IMPLICIT_DEF
351 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 8 x s64>)
352 ; RV32-NEXT: PseudoRET implicit $v8m8
354 ; RV64-LABEL: name: test_ret_nxv8i64
356 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s64>) = G_IMPLICIT_DEF
357 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 8 x s64>)
358 ; RV64-NEXT: PseudoRET implicit $v8m8
360 ret <vscale x 8 x i64> undef
363 define <vscale x 64 x i1> @test_ret_nxv64i1() {
364 ; RV32-LABEL: name: test_ret_nxv64i1
366 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 64 x s1>) = G_IMPLICIT_DEF
367 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 64 x s1>)
368 ; RV32-NEXT: PseudoRET implicit $v8
370 ; RV64-LABEL: name: test_ret_nxv64i1
372 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 64 x s1>) = G_IMPLICIT_DEF
373 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 64 x s1>)
374 ; RV64-NEXT: PseudoRET implicit $v8
376 ret <vscale x 64 x i1> undef
379 define <vscale x 32 x i1> @test_ret_nxv32i1() {
380 ; RV32-LABEL: name: test_ret_nxv32i1
382 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s1>) = G_IMPLICIT_DEF
383 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 32 x s1>)
384 ; RV32-NEXT: PseudoRET implicit $v8
386 ; RV64-LABEL: name: test_ret_nxv32i1
388 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s1>) = G_IMPLICIT_DEF
389 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 32 x s1>)
390 ; RV64-NEXT: PseudoRET implicit $v8
392 ret <vscale x 32 x i1> undef
395 define <vscale x 16 x i1> @test_ret_nxv16i1() {
396 ; RV32-LABEL: name: test_ret_nxv16i1
398 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s1>) = G_IMPLICIT_DEF
399 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 16 x s1>)
400 ; RV32-NEXT: PseudoRET implicit $v8
402 ; RV64-LABEL: name: test_ret_nxv16i1
404 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s1>) = G_IMPLICIT_DEF
405 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 16 x s1>)
406 ; RV64-NEXT: PseudoRET implicit $v8
408 ret <vscale x 16 x i1> undef
411 define <vscale x 8 x i1> @test_ret_nxv8i1() {
412 ; RV32-LABEL: name: test_ret_nxv8i1
414 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s1>) = G_IMPLICIT_DEF
415 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 8 x s1>)
416 ; RV32-NEXT: PseudoRET implicit $v8
418 ; RV64-LABEL: name: test_ret_nxv8i1
420 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s1>) = G_IMPLICIT_DEF
421 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 8 x s1>)
422 ; RV64-NEXT: PseudoRET implicit $v8
424 ret <vscale x 8 x i1> undef
427 define <vscale x 4 x i1> @test_ret_nxv4i1() {
428 ; RV32-LABEL: name: test_ret_nxv4i1
430 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s1>) = G_IMPLICIT_DEF
431 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s1>)
432 ; RV32-NEXT: PseudoRET implicit $v8
434 ; RV64-LABEL: name: test_ret_nxv4i1
436 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s1>) = G_IMPLICIT_DEF
437 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s1>)
438 ; RV64-NEXT: PseudoRET implicit $v8
440 ret <vscale x 4 x i1> undef
443 define <vscale x 2 x i1> @test_ret_nxv2i1() {
444 ; RV32-LABEL: name: test_ret_nxv2i1
446 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s1>) = G_IMPLICIT_DEF
447 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s1>)
448 ; RV32-NEXT: PseudoRET implicit $v8
450 ; RV64-LABEL: name: test_ret_nxv2i1
452 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s1>) = G_IMPLICIT_DEF
453 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s1>)
454 ; RV64-NEXT: PseudoRET implicit $v8
456 ret <vscale x 2 x i1> undef
459 define <vscale x 1 x i1> @test_ret_nxv1i1() {
460 ; RV32-LABEL: name: test_ret_nxv1i1
462 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s1>) = G_IMPLICIT_DEF
463 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s1>)
464 ; RV32-NEXT: PseudoRET implicit $v8
466 ; RV64-LABEL: name: test_ret_nxv1i1
468 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s1>) = G_IMPLICIT_DEF
469 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s1>)
470 ; RV64-NEXT: PseudoRET implicit $v8
472 ret <vscale x 1 x i1> undef
475 define <vscale x 1 x float> @test_ret_nxv1f32() {
476 ; RV32-LABEL: name: test_ret_nxv1f32
478 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
479 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s32>)
480 ; RV32-NEXT: PseudoRET implicit $v8
482 ; RV64-LABEL: name: test_ret_nxv1f32
484 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
485 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s32>)
486 ; RV64-NEXT: PseudoRET implicit $v8
488 ret <vscale x 1 x float> undef
491 define <vscale x 2 x float> @test_ret_nxv2f32() {
492 ; RV32-LABEL: name: test_ret_nxv2f32
494 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
495 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s32>)
496 ; RV32-NEXT: PseudoRET implicit $v8
498 ; RV64-LABEL: name: test_ret_nxv2f32
500 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
501 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s32>)
502 ; RV64-NEXT: PseudoRET implicit $v8
504 ret <vscale x 2 x float> undef
507 define <vscale x 4 x float> @test_ret_nxv4f32() {
508 ; RV32-LABEL: name: test_ret_nxv4f32
510 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
511 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 4 x s32>)
512 ; RV32-NEXT: PseudoRET implicit $v8m2
514 ; RV64-LABEL: name: test_ret_nxv4f32
516 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
517 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 4 x s32>)
518 ; RV64-NEXT: PseudoRET implicit $v8m2
520 ret <vscale x 4 x float> undef
523 define <vscale x 8 x float> @test_ret_nxv8f32() {
524 ; RV32-LABEL: name: test_ret_nxv8f32
526 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s32>) = G_IMPLICIT_DEF
527 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 8 x s32>)
528 ; RV32-NEXT: PseudoRET implicit $v8m4
530 ; RV64-LABEL: name: test_ret_nxv8f32
532 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s32>) = G_IMPLICIT_DEF
533 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 8 x s32>)
534 ; RV64-NEXT: PseudoRET implicit $v8m4
536 ret <vscale x 8 x float> undef
539 define <vscale x 16 x float> @test_ret_nxv16f32() {
540 ; RV32-LABEL: name: test_ret_nxv16f32
542 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s32>) = G_IMPLICIT_DEF
543 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 16 x s32>)
544 ; RV32-NEXT: PseudoRET implicit $v8m8
546 ; RV64-LABEL: name: test_ret_nxv16f32
548 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s32>) = G_IMPLICIT_DEF
549 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 16 x s32>)
550 ; RV64-NEXT: PseudoRET implicit $v8m8
552 ret <vscale x 16 x float> undef
555 define <vscale x 1 x double> @test_ret_nxv1f64() {
556 ; RV32-LABEL: name: test_ret_nxv1f64
558 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s64>) = G_IMPLICIT_DEF
559 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s64>)
560 ; RV32-NEXT: PseudoRET implicit $v8
562 ; RV64-LABEL: name: test_ret_nxv1f64
564 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s64>) = G_IMPLICIT_DEF
565 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s64>)
566 ; RV64-NEXT: PseudoRET implicit $v8
568 ret <vscale x 1 x double> undef
571 define <vscale x 2 x double> @test_ret_nxv2f64() {
572 ; RV32-LABEL: name: test_ret_nxv2f64
574 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s64>) = G_IMPLICIT_DEF
575 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 2 x s64>)
576 ; RV32-NEXT: PseudoRET implicit $v8m2
578 ; RV64-LABEL: name: test_ret_nxv2f64
580 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s64>) = G_IMPLICIT_DEF
581 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 2 x s64>)
582 ; RV64-NEXT: PseudoRET implicit $v8m2
584 ret <vscale x 2 x double> undef
587 define <vscale x 4 x double> @test_ret_nxv4f64() {
588 ; RV32-LABEL: name: test_ret_nxv4f64
590 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s64>) = G_IMPLICIT_DEF
591 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 4 x s64>)
592 ; RV32-NEXT: PseudoRET implicit $v8m4
594 ; RV64-LABEL: name: test_ret_nxv4f64
596 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s64>) = G_IMPLICIT_DEF
597 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 4 x s64>)
598 ; RV64-NEXT: PseudoRET implicit $v8m4
600 ret <vscale x 4 x double> undef
603 define <vscale x 8 x double> @test_ret_nxv8f64() {
604 ; RV32-LABEL: name: test_ret_nxv8f64
606 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s64>) = G_IMPLICIT_DEF
607 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 8 x s64>)
608 ; RV32-NEXT: PseudoRET implicit $v8m8
610 ; RV64-LABEL: name: test_ret_nxv8f64
612 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s64>) = G_IMPLICIT_DEF
613 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 8 x s64>)
614 ; RV64-NEXT: PseudoRET implicit $v8m8
616 ret <vscale x 8 x double> undef
619 define <vscale x 1 x half> @test_ret_nxv1f16() {
620 ; RV32-LABEL: name: test_ret_nxv1f16
622 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
623 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
624 ; RV32-NEXT: PseudoRET implicit $v8
626 ; RV64-LABEL: name: test_ret_nxv1f16
628 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
629 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
630 ; RV64-NEXT: PseudoRET implicit $v8
632 ret <vscale x 1 x half> undef
635 define <vscale x 2 x half> @test_ret_nxv2f16() {
636 ; RV32-LABEL: name: test_ret_nxv2f16
638 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
639 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
640 ; RV32-NEXT: PseudoRET implicit $v8
642 ; RV64-LABEL: name: test_ret_nxv2f16
644 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
645 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
646 ; RV64-NEXT: PseudoRET implicit $v8
648 ret <vscale x 2 x half> undef
651 define <vscale x 4 x half> @test_ret_nxv4f16() {
652 ; RV32-LABEL: name: test_ret_nxv4f16
654 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
655 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
656 ; RV32-NEXT: PseudoRET implicit $v8
658 ; RV64-LABEL: name: test_ret_nxv4f16
660 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
661 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
662 ; RV64-NEXT: PseudoRET implicit $v8
664 ret <vscale x 4 x half> undef
667 define <vscale x 8 x half> @test_ret_nxv8f16() {
668 ; RV32-LABEL: name: test_ret_nxv8f16
670 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
671 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
672 ; RV32-NEXT: PseudoRET implicit $v8m2
674 ; RV64-LABEL: name: test_ret_nxv8f16
676 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
677 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
678 ; RV64-NEXT: PseudoRET implicit $v8m2
680 ret <vscale x 8 x half> undef
683 define <vscale x 16 x half> @test_ret_nxv16f16() {
684 ; RV32-LABEL: name: test_ret_nxv16f16
686 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
687 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
688 ; RV32-NEXT: PseudoRET implicit $v8m4
690 ; RV64-LABEL: name: test_ret_nxv16f16
692 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
693 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
694 ; RV64-NEXT: PseudoRET implicit $v8m4
696 ret <vscale x 16 x half> undef
699 define <vscale x 32 x half> @test_ret_nxv32f16() {
700 ; RV32-LABEL: name: test_ret_nxv32f16
702 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
703 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
704 ; RV32-NEXT: PseudoRET implicit $v8m8
706 ; RV64-LABEL: name: test_ret_nxv32f16
708 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
709 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
710 ; RV64-NEXT: PseudoRET implicit $v8m8
712 ret <vscale x 32 x half> undef
715 define <vscale x 1 x bfloat> @test_ret_nxv1b16() {
716 ; RV32-LABEL: name: test_ret_nxv1b16
718 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
719 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
720 ; RV32-NEXT: PseudoRET implicit $v8
722 ; RV64-LABEL: name: test_ret_nxv1b16
724 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
725 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
726 ; RV64-NEXT: PseudoRET implicit $v8
728 ret <vscale x 1 x bfloat> undef
731 define <vscale x 2 x bfloat> @test_ret_nxv2b16() {
732 ; RV32-LABEL: name: test_ret_nxv2b16
734 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
735 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
736 ; RV32-NEXT: PseudoRET implicit $v8
738 ; RV64-LABEL: name: test_ret_nxv2b16
740 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
741 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
742 ; RV64-NEXT: PseudoRET implicit $v8
744 ret <vscale x 2 x bfloat> undef
747 define <vscale x 4 x bfloat> @test_ret_nxv4b16() {
748 ; RV32-LABEL: name: test_ret_nxv4b16
750 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
751 ; RV32-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
752 ; RV32-NEXT: PseudoRET implicit $v8
754 ; RV64-LABEL: name: test_ret_nxv4b16
756 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
757 ; RV64-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
758 ; RV64-NEXT: PseudoRET implicit $v8
760 ret <vscale x 4 x bfloat> undef
763 define <vscale x 8 x bfloat> @test_ret_nxv8b16() {
764 ; RV32-LABEL: name: test_ret_nxv8b16
766 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
767 ; RV32-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
768 ; RV32-NEXT: PseudoRET implicit $v8m2
770 ; RV64-LABEL: name: test_ret_nxv8b16
772 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
773 ; RV64-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
774 ; RV64-NEXT: PseudoRET implicit $v8m2
776 ret <vscale x 8 x bfloat> undef
779 define <vscale x 16 x bfloat> @test_ret_nxv16b16() {
780 ; RV32-LABEL: name: test_ret_nxv16b16
782 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
783 ; RV32-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
784 ; RV32-NEXT: PseudoRET implicit $v8m4
786 ; RV64-LABEL: name: test_ret_nxv16b16
788 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
789 ; RV64-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
790 ; RV64-NEXT: PseudoRET implicit $v8m4
792 ret <vscale x 16 x bfloat> undef
795 define <vscale x 32 x bfloat> @test_ret_nxv32b16() {
796 ; RV32-LABEL: name: test_ret_nxv32b16
798 ; RV32-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
799 ; RV32-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
800 ; RV32-NEXT: PseudoRET implicit $v8m8
802 ; RV64-LABEL: name: test_ret_nxv32b16
804 ; RV64-NEXT: [[DEF:%[0-9]+]]:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
805 ; RV64-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
806 ; RV64-NEXT: PseudoRET implicit $v8m8
808 ret <vscale x 32 x bfloat> undef