Debian Codegraph @

llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-implicit-def-rv32.mir

raw
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \
3 # RUN: | FileCheck %s
4 ---
5 name: implicit_def_i7
6 body: |
7 bb.0.entry:
8 ; CHECK-LABEL: name: implicit_def_i7
9 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
10 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
11 ; CHECK-NEXT: PseudoRET implicit $x10
12 %0:_(s7) = G_IMPLICIT_DEF
13 %1:_(s32) = G_ANYEXT %0(s7)
14 $x10 = COPY %1(s32)
15 PseudoRET implicit $x10
16
17 ...
18 ---
19 name: implicit_def_i8
20 body: |
21 bb.0.entry:
22 ; CHECK-LABEL: name: implicit_def_i8
23 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
24 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
25 ; CHECK-NEXT: PseudoRET implicit $x10
26 %0:_(s8) = G_IMPLICIT_DEF
27 %1:_(s32) = G_ANYEXT %0(s8)
28 $x10 = COPY %1(s32)
29 PseudoRET implicit $x10
30
31 ...
32 ---
33 name: implicit_def_i16
34 body: |
35 bb.0.entry:
36 ; CHECK-LABEL: name: implicit_def_i16
37 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
38 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
39 ; CHECK-NEXT: PseudoRET implicit $x10
40 %0:_(s16) = G_IMPLICIT_DEF
41 %1:_(s32) = G_ANYEXT %0(s16)
42 $x10 = COPY %1(s32)
43 PseudoRET implicit $x10
44
45 ...
46 ---
47 name: implicit_def_i32
48 body: |
49 bb.0.entry:
50 ; CHECK-LABEL: name: implicit_def_i32
51 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
52 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
53 ; CHECK-NEXT: PseudoRET implicit $x10
54 %0:_(s32) = G_IMPLICIT_DEF
55 $x10 = COPY %0(s32)
56 PseudoRET implicit $x10
57
58 ...
59 ---
60 name: implicit_def_i48
61 body: |
62 bb.0.entry:
63 ; CHECK-LABEL: name: implicit_def_i48
64 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
65 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
66 ; CHECK-NEXT: $x11 = COPY [[DEF]](s32)
67 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
68 %0:_(s48) = G_IMPLICIT_DEF
69 %1:_(s64) = G_ANYEXT %0(s48)
70 %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %1(s64)
71 $x10 = COPY %2(s32)
72 $x11 = COPY %3(s32)
73 PseudoRET implicit $x10, implicit $x11
74
75 ...
76 ---
77 name: implicit_def_i64
78 body: |
79 bb.0.entry:
80 ; CHECK-LABEL: name: implicit_def_i64
81 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
82 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
83 ; CHECK-NEXT: $x11 = COPY [[DEF]](s32)
84 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
85 %0:_(s64) = G_IMPLICIT_DEF
86 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0(s64)
87 $x10 = COPY %1(s32)
88 $x11 = COPY %2(s32)
89 PseudoRET implicit $x10, implicit $x11
90
91 ...
92 ---
93 name: implicit_def_i96
94 body: |
95 bb.0.entry:
96 ; CHECK-LABEL: name: implicit_def_i96
97 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
98 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
99 ; CHECK-NEXT: $x11 = COPY [[DEF]](s32)
100 ; CHECK-NEXT: $x12 = COPY [[DEF]](s32)
101 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
102 %0:_(s96) = G_IMPLICIT_DEF
103 %1:_(s32), %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %0(s96)
104 $x10 = COPY %1(s32)
105 $x11 = COPY %2(s32)
106 $x12 = COPY %3(s32)
107 PseudoRET implicit $x10, implicit $x11, implicit $x12
108
109 ...