Debian Codegraph @

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

raw
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=legalizer %s -o - \
3 # RUN: | FileCheck %s
4 ---
5 name: implicit_def_i8
6 body: |
7 bb.0.entry:
8 ; CHECK-LABEL: name: implicit_def_i8
9 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
10 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
11 ; CHECK-NEXT: PseudoRET implicit $x10
12 %0:_(s8) = G_IMPLICIT_DEF
13 %1:_(s64) = G_ANYEXT %0(s8)
14 $x10 = COPY %1(s64)
15 PseudoRET implicit $x10
16
17 ...
18 ---
19 name: implicit_def_i15
20 body: |
21 bb.0.entry:
22 ; CHECK-LABEL: name: implicit_def_i15
23 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
24 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
25 ; CHECK-NEXT: PseudoRET implicit $x10
26 %0:_(s15) = G_IMPLICIT_DEF
27 %1:_(s64) = G_ANYEXT %0(s15)
28 $x10 = COPY %1(s64)
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]+]]:_(s64) = G_IMPLICIT_DEF
38 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
39 ; CHECK-NEXT: PseudoRET implicit $x10
40 %0:_(s16) = G_IMPLICIT_DEF
41 %1:_(s64) = G_ANYEXT %0(s16)
42 $x10 = COPY %1(s64)
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]+]]:_(s64) = G_IMPLICIT_DEF
52 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
53 ; CHECK-NEXT: PseudoRET implicit $x10
54 %0:_(s32) = G_IMPLICIT_DEF
55 %1:_(s64) = G_ANYEXT %0(s32)
56 $x10 = COPY %1(s64)
57 PseudoRET implicit $x10
58
59 ...
60 ---
61 name: implicit_def_i64
62 body: |
63 bb.0.entry:
64 ; CHECK-LABEL: name: implicit_def_i64
65 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
66 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
67 ; CHECK-NEXT: PseudoRET implicit $x10
68 %0:_(s64) = G_IMPLICIT_DEF
69 $x10 = COPY %0(s64)
70 PseudoRET implicit $x10
71
72 ...
73 ---
74 name: implicit_def_i72
75 body: |
76 bb.0.entry:
77 ; CHECK-LABEL: name: implicit_def_i72
78 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
79 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
80 ; CHECK-NEXT: $x11 = COPY [[DEF]](s64)
81 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
82 %0:_(s72) = G_IMPLICIT_DEF
83 %1:_(s128) = G_ANYEXT %0(s72)
84 %2:_(s64), %3:_(s64) = G_UNMERGE_VALUES %1(s128)
85 $x10 = COPY %2(s64)
86 $x11 = COPY %3(s64)
87 PseudoRET implicit $x10, implicit $x11
88
89 ...
90 ---
91 name: implicit_def_i128
92 body: |
93 bb.0.entry:
94 ; CHECK-LABEL: name: implicit_def_i128
95 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
96 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
97 ; CHECK-NEXT: $x11 = COPY [[DEF]](s64)
98 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
99 %0:_(s128) = G_IMPLICIT_DEF
100 %1:_(s64), %2:_(s64) = G_UNMERGE_VALUES %0(s128)
101 $x10 = COPY %1(s64)
102 $x11 = COPY %2(s64)
103 PseudoRET implicit $x10, implicit $x11
104
105 ...
106 ---
107 name: implicit_def_i192
108 body: |
109 bb.0.entry:
110 ; CHECK-LABEL: name: implicit_def_i192
111 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
112 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
113 ; CHECK-NEXT: $x11 = COPY [[DEF]](s64)
114 ; CHECK-NEXT: $x12 = COPY [[DEF]](s64)
115 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
116 %0:_(s192) = G_IMPLICIT_DEF
117 %1:_(s64), %2:_(s64), %3:_(s64) = G_UNMERGE_VALUES %0(s192)
118 $x10 = COPY %1(s64)
119 $x11 = COPY %2(s64)
120 $x12 = COPY %3(s64)
121 PseudoRET implicit $x10, implicit $x11, implicit $x12
122
123 ...