1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs %s -o - | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=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: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
14 ; CHECK: $vgpr0 = COPY [[COPY]](s32)
15 %0:_(s32) = COPY $vgpr0
21 name: copy_s32_sgpr_to_sgpr
27 ; CHECK-LABEL: name: copy_s32_sgpr_to_sgpr
28 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
29 ; CHECK: $sgpr0 = COPY [[COPY]](s32)
30 %0:_(s32) = COPY $sgpr0
36 name: copy_s32_sgpr_to_vgpr
42 ; CHECK-LABEL: name: copy_s32_sgpr_to_vgpr
43 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
44 ; CHECK: $vgpr0 = COPY [[COPY]](s32)
45 %0:_(s32) = COPY $sgpr0
51 name: copy_s32_vgpr_to_agpr
57 ; CHECK-LABEL: name: copy_s32_vgpr_to_agpr
58 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
59 ; CHECK: $agpr0 = COPY [[COPY]](s32)
60 %0:_(s32) = COPY $vgpr0
66 name: copy_s32_sgpr_to_agpr
72 ; CHECK-LABEL: name: copy_s32_sgpr_to_agpr
73 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
74 ; CHECK: $agpr0 = COPY [[COPY]](s32)
75 %0:_(s32) = COPY $sgpr0
81 name: copy_s32_agpr_to_vgpr
87 ; CHECK-LABEL: name: copy_s32_agpr_to_vgpr
88 ; CHECK: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
89 ; CHECK: $vgpr0 = COPY [[COPY]](s32)
90 %0:_(s32) = COPY $agpr0
96 name: copy_s32_agpr_to_agpr
102 ; CHECK-LABEL: name: copy_s32_agpr_to_agpr
103 ; CHECK: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
104 ; CHECK: $agpr0 = COPY [[COPY]](s32)
105 %0:_(s32) = COPY $agpr0
111 name: copy_s1_sgpr_to_vcc_preassigned
117 ; CHECK-LABEL: name: copy_s1_sgpr_to_vcc_preassigned
118 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
119 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
120 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
121 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1)
122 %0:sgpr(s32) = COPY $sgpr0
123 %1:sgpr(s1) = G_TRUNC %0
125 S_ENDPGM 0, implicit %2
129 name: copy_s1_vgpr_to_vcc_preassigned
135 ; CHECK-LABEL: name: copy_s1_vgpr_to_vcc_preassigned
136 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
137 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
138 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
139 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1)
140 %0:vgpr(s32) = COPY $vgpr0
141 %1:vgpr(s1) = G_TRUNC %0
143 S_ENDPGM 0, implicit %2
147 name: copy_s1_sgpr_to_vcc
153 ; CHECK-LABEL: name: copy_s1_sgpr_to_vcc
154 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
155 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
156 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
157 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1)
158 %0:_(s32) = COPY $sgpr0
159 %1:_(s1) = G_TRUNC %0
161 S_ENDPGM 0, implicit %2
166 name: copy_s1_vgpr_to_vcc
172 ; CHECK-LABEL: name: copy_s1_vgpr_to_vcc
173 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
174 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
175 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
176 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1)
177 %0:_(s32) = COPY $vgpr0
178 %1:_(s1) = G_TRUNC %0
180 S_ENDPGM 0, implicit %2