1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+m,+v -run-pass=regbankselect \
3 # RUN: -simplify-mir -verify-machineinstrs %s \
4 # RUN: -o - | FileCheck -check-prefix=RV32I %s
5 # RUN: llc -mtriple=riscv64 -mattr=+m,+v -run-pass=regbankselect \
6 # RUN: -simplify-mir -verify-machineinstrs %s \
7 # RUN: -o - | FileCheck -check-prefix=RV64I %s
9 name: implicitdef_nxv1i8
11 tracksRegLiveness: true
14 ; RV32I-LABEL: name: implicitdef_nxv1i8
15 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s8>) = G_IMPLICIT_DEF
16 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s8>)
17 ; RV32I-NEXT: PseudoRET implicit $v8
19 ; RV64I-LABEL: name: implicitdef_nxv1i8
20 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s8>) = G_IMPLICIT_DEF
21 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s8>)
22 ; RV64I-NEXT: PseudoRET implicit $v8
23 %0:_(<vscale x 1 x s8>) = G_IMPLICIT_DEF
24 $v8 = COPY %0(<vscale x 1 x s8>)
25 PseudoRET implicit $v8
28 name: implicitdef_nxv2i8
30 tracksRegLiveness: true
33 ; RV32I-LABEL: name: implicitdef_nxv2i8
34 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s8>) = G_IMPLICIT_DEF
35 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s8>)
36 ; RV32I-NEXT: PseudoRET implicit $v8
38 ; RV64I-LABEL: name: implicitdef_nxv2i8
39 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s8>) = G_IMPLICIT_DEF
40 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s8>)
41 ; RV64I-NEXT: PseudoRET implicit $v8
42 %0:_(<vscale x 2 x s8>) = G_IMPLICIT_DEF
43 $v8 = COPY %0(<vscale x 2 x s8>)
44 PseudoRET implicit $v8
47 name: implicitdef_nxv4i8
49 tracksRegLiveness: true
52 ; RV32I-LABEL: name: implicitdef_nxv4i8
53 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s8>) = G_IMPLICIT_DEF
54 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s8>)
55 ; RV32I-NEXT: PseudoRET implicit $v8
57 ; RV64I-LABEL: name: implicitdef_nxv4i8
58 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s8>) = G_IMPLICIT_DEF
59 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s8>)
60 ; RV64I-NEXT: PseudoRET implicit $v8
61 %0:_(<vscale x 4 x s8>) = G_IMPLICIT_DEF
62 $v8 = COPY %0(<vscale x 4 x s8>)
63 PseudoRET implicit $v8
66 name: implicitdef_nxv8i8
68 tracksRegLiveness: true
71 ; RV32I-LABEL: name: implicitdef_nxv8i8
72 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s8>) = G_IMPLICIT_DEF
73 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 8 x s8>)
74 ; RV32I-NEXT: PseudoRET implicit $v8
76 ; RV64I-LABEL: name: implicitdef_nxv8i8
77 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s8>) = G_IMPLICIT_DEF
78 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 8 x s8>)
79 ; RV64I-NEXT: PseudoRET implicit $v8
80 %0:_(<vscale x 8 x s8>) = G_IMPLICIT_DEF
81 $v8 = COPY %0(<vscale x 8 x s8>)
82 PseudoRET implicit $v8
85 name: implicitdef_nxv16i8
87 tracksRegLiveness: true
90 ; RV32I-LABEL: name: implicitdef_nxv16i8
91 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s8>) = G_IMPLICIT_DEF
92 ; RV32I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 16 x s8>)
93 ; RV32I-NEXT: PseudoRET implicit $v8m2
95 ; RV64I-LABEL: name: implicitdef_nxv16i8
96 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s8>) = G_IMPLICIT_DEF
97 ; RV64I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 16 x s8>)
98 ; RV64I-NEXT: PseudoRET implicit $v8m2
99 %0:_(<vscale x 16 x s8>) = G_IMPLICIT_DEF
100 $v8m2 = COPY %0(<vscale x 16 x s8>)
101 PseudoRET implicit $v8m2
104 name: implicitdef_nxv32i8
106 tracksRegLiveness: true
109 ; RV32I-LABEL: name: implicitdef_nxv32i8
110 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s8>) = G_IMPLICIT_DEF
111 ; RV32I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 32 x s8>)
112 ; RV32I-NEXT: PseudoRET implicit $v8m4
114 ; RV64I-LABEL: name: implicitdef_nxv32i8
115 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s8>) = G_IMPLICIT_DEF
116 ; RV64I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 32 x s8>)
117 ; RV64I-NEXT: PseudoRET implicit $v8m4
118 %0:_(<vscale x 32 x s8>) = G_IMPLICIT_DEF
119 $v8m4 = COPY %0(<vscale x 32 x s8>)
120 PseudoRET implicit $v8m4
123 name: implicitdef_nxv64i8
125 tracksRegLiveness: true
128 ; RV32I-LABEL: name: implicitdef_nxv64i8
129 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 64 x s8>) = G_IMPLICIT_DEF
130 ; RV32I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 64 x s8>)
131 ; RV32I-NEXT: PseudoRET implicit $v8m8
133 ; RV64I-LABEL: name: implicitdef_nxv64i8
134 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 64 x s8>) = G_IMPLICIT_DEF
135 ; RV64I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 64 x s8>)
136 ; RV64I-NEXT: PseudoRET implicit $v8m8
137 %0:_(<vscale x 64 x s8>) = G_IMPLICIT_DEF
138 $v8m8 = COPY %0(<vscale x 64 x s8>)
139 PseudoRET implicit $v8m8
142 name: implicitdef_nxv1i16
144 tracksRegLiveness: true
147 ; RV32I-LABEL: name: implicitdef_nxv1i16
148 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s16>) = G_IMPLICIT_DEF
149 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
150 ; RV32I-NEXT: PseudoRET implicit $v8
152 ; RV64I-LABEL: name: implicitdef_nxv1i16
153 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s16>) = G_IMPLICIT_DEF
154 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s16>)
155 ; RV64I-NEXT: PseudoRET implicit $v8
156 %0:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
157 $v8 = COPY %0(<vscale x 1 x s16>)
158 PseudoRET implicit $v8
161 name: implicitdef_nxv2i16
163 tracksRegLiveness: true
166 ; RV32I-LABEL: name: implicitdef_nxv2i16
167 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s16>) = G_IMPLICIT_DEF
168 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
169 ; RV32I-NEXT: PseudoRET implicit $v8
171 ; RV64I-LABEL: name: implicitdef_nxv2i16
172 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s16>) = G_IMPLICIT_DEF
173 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s16>)
174 ; RV64I-NEXT: PseudoRET implicit $v8
175 %0:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
176 $v8 = COPY %0(<vscale x 2 x s16>)
177 PseudoRET implicit $v8
180 name: implicitdef_nxv4i16
182 tracksRegLiveness: true
185 ; RV32I-LABEL: name: implicitdef_nxv4i16
186 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s16>) = G_IMPLICIT_DEF
187 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
188 ; RV32I-NEXT: PseudoRET implicit $v8
190 ; RV64I-LABEL: name: implicitdef_nxv4i16
191 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s16>) = G_IMPLICIT_DEF
192 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 4 x s16>)
193 ; RV64I-NEXT: PseudoRET implicit $v8
194 %0:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
195 $v8 = COPY %0(<vscale x 4 x s16>)
196 PseudoRET implicit $v8
199 name: implicitdef_nxv8i16
201 tracksRegLiveness: true
204 ; RV32I-LABEL: name: implicitdef_nxv8i16
205 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s16>) = G_IMPLICIT_DEF
206 ; RV32I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
207 ; RV32I-NEXT: PseudoRET implicit $v8m2
209 ; RV64I-LABEL: name: implicitdef_nxv8i16
210 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s16>) = G_IMPLICIT_DEF
211 ; RV64I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 8 x s16>)
212 ; RV64I-NEXT: PseudoRET implicit $v8m2
213 %0:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
214 $v8m2 = COPY %0(<vscale x 8 x s16>)
215 PseudoRET implicit $v8m2
218 name: implicitdef_nxv16i16
220 tracksRegLiveness: true
223 ; RV32I-LABEL: name: implicitdef_nxv16i16
224 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s16>) = G_IMPLICIT_DEF
225 ; RV32I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
226 ; RV32I-NEXT: PseudoRET implicit $v8m4
228 ; RV64I-LABEL: name: implicitdef_nxv16i16
229 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s16>) = G_IMPLICIT_DEF
230 ; RV64I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 16 x s16>)
231 ; RV64I-NEXT: PseudoRET implicit $v8m4
232 %0:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
233 $v8m4 = COPY %0(<vscale x 16 x s16>)
234 PseudoRET implicit $v8m4
237 name: implicitdef_nxv32i16
239 tracksRegLiveness: true
242 ; RV32I-LABEL: name: implicitdef_nxv32i16
243 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s16>) = G_IMPLICIT_DEF
244 ; RV32I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
245 ; RV32I-NEXT: PseudoRET implicit $v8m8
247 ; RV64I-LABEL: name: implicitdef_nxv32i16
248 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s16>) = G_IMPLICIT_DEF
249 ; RV64I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 32 x s16>)
250 ; RV64I-NEXT: PseudoRET implicit $v8m8
251 %0:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
252 $v8m8 = COPY %0(<vscale x 32 x s16>)
253 PseudoRET implicit $v8m8
256 name: implicitdef_nxv1i32
258 tracksRegLiveness: true
261 ; RV32I-LABEL: name: implicitdef_nxv1i32
262 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s32>) = G_IMPLICIT_DEF
263 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s32>)
264 ; RV32I-NEXT: PseudoRET implicit $v8
266 ; RV64I-LABEL: name: implicitdef_nxv1i32
267 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s32>) = G_IMPLICIT_DEF
268 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s32>)
269 ; RV64I-NEXT: PseudoRET implicit $v8
270 %0:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
271 $v8 = COPY %0(<vscale x 1 x s32>)
272 PseudoRET implicit $v8
275 name: implicitdef_nxv2i32
277 tracksRegLiveness: true
280 ; RV32I-LABEL: name: implicitdef_nxv2i32
281 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s32>) = G_IMPLICIT_DEF
282 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s32>)
283 ; RV32I-NEXT: PseudoRET implicit $v8
285 ; RV64I-LABEL: name: implicitdef_nxv2i32
286 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s32>) = G_IMPLICIT_DEF
287 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 2 x s32>)
288 ; RV64I-NEXT: PseudoRET implicit $v8
289 %0:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
290 $v8 = COPY %0(<vscale x 2 x s32>)
291 PseudoRET implicit $v8
294 name: implicitdef_nxv4i32
296 tracksRegLiveness: true
299 ; RV32I-LABEL: name: implicitdef_nxv4i32
300 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s32>) = G_IMPLICIT_DEF
301 ; RV32I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 4 x s32>)
302 ; RV32I-NEXT: PseudoRET implicit $v8m2
304 ; RV64I-LABEL: name: implicitdef_nxv4i32
305 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s32>) = G_IMPLICIT_DEF
306 ; RV64I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 4 x s32>)
307 ; RV64I-NEXT: PseudoRET implicit $v8m2
308 %0:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
309 $v8m2 = COPY %0(<vscale x 4 x s32>)
310 PseudoRET implicit $v8m2
313 name: implicitdef_nxv8i32
315 tracksRegLiveness: true
318 ; RV32I-LABEL: name: implicitdef_nxv8i32
319 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s32>) = G_IMPLICIT_DEF
320 ; RV32I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 8 x s32>)
321 ; RV32I-NEXT: PseudoRET implicit $v8m4
323 ; RV64I-LABEL: name: implicitdef_nxv8i32
324 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s32>) = G_IMPLICIT_DEF
325 ; RV64I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 8 x s32>)
326 ; RV64I-NEXT: PseudoRET implicit $v8m4
327 %0:_(<vscale x 8 x s32>) = G_IMPLICIT_DEF
328 $v8m4 = COPY %0(<vscale x 8 x s32>)
329 PseudoRET implicit $v8m4
332 name: implicitdef_nxv16i32
334 tracksRegLiveness: true
337 ; RV32I-LABEL: name: implicitdef_nxv16i32
338 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s32>) = G_IMPLICIT_DEF
339 ; RV32I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 16 x s32>)
340 ; RV32I-NEXT: PseudoRET implicit $v8m8
342 ; RV64I-LABEL: name: implicitdef_nxv16i32
343 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s32>) = G_IMPLICIT_DEF
344 ; RV64I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 16 x s32>)
345 ; RV64I-NEXT: PseudoRET implicit $v8m8
346 %0:_(<vscale x 16 x s32>) = G_IMPLICIT_DEF
347 $v8m8 = COPY %0(<vscale x 16 x s32>)
348 PseudoRET implicit $v8m8
351 name: implicitdef_nxv1i64
353 tracksRegLiveness: true
356 ; RV32I-LABEL: name: implicitdef_nxv1i64
357 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s64>) = G_IMPLICIT_DEF
358 ; RV32I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s64>)
359 ; RV32I-NEXT: PseudoRET implicit $v8
361 ; RV64I-LABEL: name: implicitdef_nxv1i64
362 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s64>) = G_IMPLICIT_DEF
363 ; RV64I-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s64>)
364 ; RV64I-NEXT: PseudoRET implicit $v8
365 %0:_(<vscale x 1 x s64>) = G_IMPLICIT_DEF
366 $v8 = COPY %0(<vscale x 1 x s64>)
367 PseudoRET implicit $v8
370 name: implicitdef_nxv2i64
372 tracksRegLiveness: true
375 ; RV32I-LABEL: name: implicitdef_nxv2i64
376 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s64>) = G_IMPLICIT_DEF
377 ; RV32I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 2 x s64>)
378 ; RV32I-NEXT: PseudoRET implicit $v8m2
380 ; RV64I-LABEL: name: implicitdef_nxv2i64
381 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s64>) = G_IMPLICIT_DEF
382 ; RV64I-NEXT: $v8m2 = COPY [[DEF]](<vscale x 2 x s64>)
383 ; RV64I-NEXT: PseudoRET implicit $v8m2
384 %0:_(<vscale x 2 x s64>) = G_IMPLICIT_DEF
385 $v8m2 = COPY %0(<vscale x 2 x s64>)
386 PseudoRET implicit $v8m2
389 name: implicitdef_nxv4i64
391 tracksRegLiveness: true
394 ; RV32I-LABEL: name: implicitdef_nxv4i64
395 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s64>) = G_IMPLICIT_DEF
396 ; RV32I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 4 x s64>)
397 ; RV32I-NEXT: PseudoRET implicit $v8m4
399 ; RV64I-LABEL: name: implicitdef_nxv4i64
400 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s64>) = G_IMPLICIT_DEF
401 ; RV64I-NEXT: $v8m4 = COPY [[DEF]](<vscale x 4 x s64>)
402 ; RV64I-NEXT: PseudoRET implicit $v8m4
403 %0:_(<vscale x 4 x s64>) = G_IMPLICIT_DEF
404 $v8m4 = COPY %0(<vscale x 4 x s64>)
405 PseudoRET implicit $v8m4
408 name: implicitdef_nxv8i64
410 tracksRegLiveness: true
413 ; RV32I-LABEL: name: implicitdef_nxv8i64
414 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s64>) = G_IMPLICIT_DEF
415 ; RV32I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 8 x s64>)
416 ; RV32I-NEXT: PseudoRET implicit $v8m8
418 ; RV64I-LABEL: name: implicitdef_nxv8i64
419 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s64>) = G_IMPLICIT_DEF
420 ; RV64I-NEXT: $v8m8 = COPY [[DEF]](<vscale x 8 x s64>)
421 ; RV64I-NEXT: PseudoRET implicit $v8m8
422 %0:_(<vscale x 8 x s64>) = G_IMPLICIT_DEF
423 $v8m8 = COPY %0(<vscale x 8 x s64>)
424 PseudoRET implicit $v8m8