1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
6 name: anyext_s32_to_s64_s
12 ; CHECK-LABEL: name: anyext_s32_to_s64_s
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; CHECK: [[ANYEXT:%[0-9]+]]:sgpr(s64) = G_ANYEXT [[COPY]](s32)
15 %0:_(s32) = COPY $sgpr0
16 %1:_(s64) = G_ANYEXT %0
20 name: anyext_s32_to_s64_v
26 ; CHECK-LABEL: name: anyext_s32_to_s64_v
27 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
28 ; CHECK: [[ANYEXT:%[0-9]+]]:vgpr(s64) = G_ANYEXT [[COPY]](s32)
29 %0:_(s32) = COPY $vgpr0
30 %1:_(s64) = G_ANYEXT %0
34 name: anyext_s1_to_s16_scc
39 liveins: $sgpr0, $sgpr1
40 ; CHECK-LABEL: name: anyext_s1_to_s16_scc
41 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
42 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
43 ; CHECK: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
44 ; CHECK: [[ANYEXT:%[0-9]+]]:sgpr(s16) = G_ANYEXT [[ICMP]](s1)
45 %0:_(s32) = COPY $sgpr0
46 %1:_(s32) = COPY $sgpr1
47 %2:_(s1) = G_ICMP intpred(eq), %0, %1
48 %3:_(s16) = G_ANYEXT %2
52 name: anyext_s1_to_s32_scc
57 liveins: $sgpr0, $sgpr1
58 ; CHECK-LABEL: name: anyext_s1_to_s32_scc
59 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
60 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
61 ; CHECK: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
62 ; CHECK: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[ICMP]](s1)
63 %0:_(s32) = COPY $sgpr0
64 %1:_(s32) = COPY $sgpr1
65 %2:_(s1) = G_ICMP intpred(eq), %0, %1
66 %3:_(s32) = G_ANYEXT %2
70 name: anyext_s1_to_s64_scc
75 liveins: $sgpr0, $sgpr1
76 ; CHECK-LABEL: name: anyext_s1_to_s64_scc
77 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
78 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
79 ; CHECK: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
80 ; CHECK: [[ANYEXT:%[0-9]+]]:sgpr(s64) = G_ANYEXT [[ICMP]](s1)
81 %0:_(s32) = COPY $sgpr0
82 %1:_(s32) = COPY $sgpr1
83 %2:_(s1) = G_ICMP intpred(eq), %0, %1
84 %3:_(s64) = G_ANYEXT %2
88 name: anyext_s1_to_s16_vcc
93 liveins: $vgpr0, $vgpr1
94 ; CHECK-LABEL: name: anyext_s1_to_s16_vcc
95 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
96 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
97 ; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
98 ; CHECK: [[ANYEXT:%[0-9]+]]:vgpr(s16) = G_ANYEXT [[ICMP]](s1)
99 %0:_(s32) = COPY $vgpr0
100 %1:_(s32) = COPY $vgpr1
101 %2:_(s1) = G_ICMP intpred(eq), %0, %1
102 %3:_(s16) = G_ANYEXT %2
106 name: anyext_s1_to_s32_vcc
111 liveins: $vgpr0, $vgpr1
112 ; CHECK-LABEL: name: anyext_s1_to_s32_vcc
113 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
114 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
115 ; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
116 ; CHECK: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[ICMP]](s1)
117 %0:_(s32) = COPY $vgpr0
118 %1:_(s32) = COPY $vgpr1
119 %2:_(s1) = G_ICMP intpred(eq), %0, %1
120 %3:_(s32) = G_ANYEXT %2
124 name: anyext_s1_to_s64_vcc
129 liveins: $vgpr0, $vgpr1
130 ; CHECK-LABEL: name: anyext_s1_to_s64_vcc
131 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
132 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
133 ; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
134 ; CHECK: [[ANYEXT:%[0-9]+]]:vgpr(s64) = G_ANYEXT [[ICMP]](s1)
135 %0:_(s32) = COPY $vgpr0
136 %1:_(s32) = COPY $vgpr1
137 %2:_(s1) = G_ICMP intpred(eq), %0, %1
138 %3:_(s64) = G_ANYEXT %2
142 name: anyext_s1_to_s16_sgpr
148 ; CHECK-LABEL: name: anyext_s1_to_s16_sgpr
149 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
150 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
151 ; CHECK: [[ANYEXT:%[0-9]+]]:sgpr(s16) = G_ANYEXT [[TRUNC]](s1)
152 %0:_(s32) = COPY $sgpr0
153 %1:_(s1) = G_TRUNC %0
154 %2:_(s16) = G_ANYEXT %1
158 name: anyext_s1_to_s32_sgpr
164 ; CHECK-LABEL: name: anyext_s1_to_s32_sgpr
165 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
166 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
167 ; CHECK: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
168 %0:_(s32) = COPY $sgpr0
169 %1:_(s1) = G_TRUNC %0
170 %2:_(s32) = G_ANYEXT %1
174 name: anyext_s1_to_s64_sgpr
180 ; CHECK-LABEL: name: anyext_s1_to_s64_sgpr
181 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
182 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
183 ; CHECK: [[ANYEXT:%[0-9]+]]:sgpr(s64) = G_ANYEXT [[TRUNC]](s1)
184 %0:_(s32) = COPY $sgpr0
185 %1:_(s1) = G_TRUNC %0
186 %2:_(s64) = G_ANYEXT %1
190 name: anyext_s1_to_s16_vgpr
196 ; CHECK-LABEL: name: anyext_s1_to_s16_vgpr
197 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
198 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
199 ; CHECK: [[ANYEXT:%[0-9]+]]:vgpr(s16) = G_ANYEXT [[TRUNC]](s1)
200 %0:_(s32) = COPY $vgpr0
201 %1:_(s1) = G_TRUNC %0
202 %2:_(s16) = G_ANYEXT %1
206 name: anyext_s1_to_s32_vgpr
212 ; CHECK-LABEL: name: anyext_s1_to_s32_vgpr
213 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
214 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
215 ; CHECK: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
216 %0:_(s32) = COPY $vgpr0
217 %1:_(s1) = G_TRUNC %0
218 %2:_(s32) = G_ANYEXT %1
222 name: anyext_s1_to_s64_vgpr
228 ; CHECK-LABEL: name: anyext_s1_to_s64_vgpr
229 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
230 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
231 ; CHECK: [[ANYEXT:%[0-9]+]]:vgpr(s64) = G_ANYEXT [[TRUNC]](s1)
232 %0:_(s32) = COPY $vgpr0
233 %1:_(s1) = G_TRUNC %0
234 %2:_(s64) = G_ANYEXT %1