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: [[DEF1:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
80 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
81 ; CHECK-NEXT: $x11 = COPY [[DEF1]](s64)
82 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
83 %0:_(s72) = G_IMPLICIT_DEF
84 %1:_(s128) = G_ANYEXT %0(s72)
85 %2:_(s64), %3:_(s64) = G_UNMERGE_VALUES %1(s128)
86 $x10 = COPY %2(s64)
87 $x11 = COPY %3(s64)
88 PseudoRET implicit $x10, implicit $x11
89
90 ...
91 ---
92 name: implicit_def_i128
93 body: |
94 bb.0.entry:
95 ; CHECK-LABEL: name: implicit_def_i128
96 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
97 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
98 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
99 ; CHECK-NEXT: $x11 = COPY [[DEF1]](s64)
100 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
101 %0:_(s128) = G_IMPLICIT_DEF
102 %1:_(s64), %2:_(s64) = G_UNMERGE_VALUES %0(s128)
103 $x10 = COPY %1(s64)
104 $x11 = COPY %2(s64)
105 PseudoRET implicit $x10, implicit $x11
106
107 ...
108 ---
109 name: implicit_def_i192
110 body: |
111 bb.0.entry:
112 ; CHECK-LABEL: name: implicit_def_i192
113 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
114 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
115 ; CHECK-NEXT: [[DEF2:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
116 ; CHECK-NEXT: $x10 = COPY [[DEF]](s64)
117 ; CHECK-NEXT: $x11 = COPY [[DEF1]](s64)
118 ; CHECK-NEXT: $x12 = COPY [[DEF2]](s64)
119 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
120 %0:_(s192) = G_IMPLICIT_DEF
121 %1:_(s64), %2:_(s64), %3:_(s64) = G_UNMERGE_VALUES %0(s192)
122 $x10 = COPY %1(s64)
123 $x11 = COPY %2(s64)
124 $x12 = COPY %3(s64)
125 PseudoRET implicit $x10, implicit $x11, implicit $x12
126
127 ...