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: [[DEF1:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
66 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
67 ; CHECK-NEXT: $x11 = COPY [[DEF1]](s32)
68 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
69 %0:_(s48) = G_IMPLICIT_DEF
70 %1:_(s64) = G_ANYEXT %0(s48)
71 %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %1(s64)
72 $x10 = COPY %2(s32)
73 $x11 = COPY %3(s32)
74 PseudoRET implicit $x10, implicit $x11
75
76 ...
77 ---
78 name: implicit_def_i64
79 body: |
80 bb.0.entry:
81 ; CHECK-LABEL: name: implicit_def_i64
82 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
83 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
84 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
85 ; CHECK-NEXT: $x11 = COPY [[DEF1]](s32)
86 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
87 %0:_(s64) = G_IMPLICIT_DEF
88 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0(s64)
89 $x10 = COPY %1(s32)
90 $x11 = COPY %2(s32)
91 PseudoRET implicit $x10, implicit $x11
92
93 ...
94 ---
95 name: implicit_def_i96
96 body: |
97 bb.0.entry:
98 ; CHECK-LABEL: name: implicit_def_i96
99 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
100 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
101 ; CHECK-NEXT: [[DEF2:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
102 ; CHECK-NEXT: $x10 = COPY [[DEF]](s32)
103 ; CHECK-NEXT: $x11 = COPY [[DEF1]](s32)
104 ; CHECK-NEXT: $x12 = COPY [[DEF2]](s32)
105 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
106 %0:_(s96) = G_IMPLICIT_DEF
107 %1:_(s32), %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %0(s96)
108 $x10 = COPY %1(s32)
109 $x11 = COPY %2(s32)
110 $x12 = COPY %3(s32)
111 PseudoRET implicit $x10, implicit $x11, implicit $x12
112
113 ...