1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx908 -run-pass=amdgpu-regbankselect -regbankselect-fast -verify-machineinstrs %s -o - | FileCheck %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx908 -run-pass=amdgpu-regbankselect -regbankselect-greedy -verify-machineinstrs %s -o - | FileCheck %s
6 name: copy_s32_vgpr_to_vgpr
12 ; CHECK-LABEL: name: copy_s32_vgpr_to_vgpr
13 ; CHECK: liveins: $vgpr0
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
16 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
17 %0:_(s32) = COPY $vgpr0
23 name: copy_s32_sgpr_to_sgpr
29 ; CHECK-LABEL: name: copy_s32_sgpr_to_sgpr
30 ; CHECK: liveins: $sgpr0
32 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
33 ; CHECK-NEXT: $sgpr0 = COPY [[COPY]](s32)
34 %0:_(s32) = COPY $sgpr0
40 name: copy_s32_sgpr_to_vgpr
46 ; CHECK-LABEL: name: copy_s32_sgpr_to_vgpr
47 ; CHECK: liveins: $sgpr0
49 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
50 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
51 %0:_(s32) = COPY $sgpr0
57 name: copy_s32_vgpr_to_agpr
63 ; CHECK-LABEL: name: copy_s32_vgpr_to_agpr
64 ; CHECK: liveins: $vgpr0
66 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
67 ; CHECK-NEXT: $agpr0 = COPY [[COPY]](s32)
68 %0:_(s32) = COPY $vgpr0
74 name: copy_s32_sgpr_to_agpr
80 ; CHECK-LABEL: name: copy_s32_sgpr_to_agpr
81 ; CHECK: liveins: $sgpr0
83 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
84 ; CHECK-NEXT: $agpr0 = COPY [[COPY]](s32)
85 %0:_(s32) = COPY $sgpr0
91 name: copy_s32_agpr_to_vgpr
97 ; CHECK-LABEL: name: copy_s32_agpr_to_vgpr
98 ; CHECK: liveins: $agpr0
100 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
101 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
102 %0:_(s32) = COPY $agpr0
108 name: copy_s32_agpr_to_agpr
114 ; CHECK-LABEL: name: copy_s32_agpr_to_agpr
115 ; CHECK: liveins: $agpr0
117 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
118 ; CHECK-NEXT: $agpr0 = COPY [[COPY]](s32)
119 %0:_(s32) = COPY $agpr0
125 name: copy_s1_sgpr_to_vcc_preassigned
131 ; CHECK-LABEL: name: copy_s1_sgpr_to_vcc_preassigned
132 ; CHECK: liveins: $sgpr0
134 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
135 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
136 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
137 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]](s1)
138 %0:sgpr(s32) = COPY $sgpr0
139 %1:sgpr(s1) = G_TRUNC %0
141 S_ENDPGM 0, implicit %2
145 name: copy_s1_vgpr_to_vcc_preassigned
151 ; CHECK-LABEL: name: copy_s1_vgpr_to_vcc_preassigned
152 ; CHECK: liveins: $vgpr0
154 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
155 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
156 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
157 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]](s1)
158 %0:vgpr(s32) = COPY $vgpr0
159 %1:vgpr(s1) = G_TRUNC %0
161 S_ENDPGM 0, implicit %2
165 name: copy_s1_sgpr_to_vcc
171 ; CHECK-LABEL: name: copy_s1_sgpr_to_vcc
172 ; CHECK: liveins: $sgpr0
174 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
175 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
176 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
177 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]](s1)
178 %0:_(s32) = COPY $sgpr0
179 %1:_(s1) = G_TRUNC %0
181 S_ENDPGM 0, implicit %2
186 name: copy_s1_vgpr_to_vcc
192 ; CHECK-LABEL: name: copy_s1_vgpr_to_vcc
193 ; CHECK: liveins: $vgpr0
195 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
196 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
197 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
198 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]](s1)
199 %0:_(s32) = COPY $vgpr0
200 %1:_(s1) = G_TRUNC %0
202 S_ENDPGM 0, implicit %2