1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
6 name: insert_lo32_i64_ss
11 liveins: $sgpr0_sgpr1, $sgpr2
12 ; CHECK-LABEL: name: insert_lo32_i64_ss
13 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
16 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
17 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:sgpr(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0
18 %0:_(s64) = COPY $sgpr0_sgpr1
19 %1:_(s32) = COPY $sgpr2
20 %2:_(s64) = G_INSERT %0, %1, 0
24 name: insert_lo32_i64_sv
29 liveins: $sgpr0_sgpr1, $vgpr2
30 ; CHECK-LABEL: name: insert_lo32_i64_sv
31 ; CHECK: liveins: $sgpr0_sgpr1, $vgpr2
33 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
34 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
35 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
36 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY1]](s32), 0
37 %0:_(s64) = COPY $sgpr0_sgpr1
38 %1:_(s32) = COPY $vgpr2
39 %2:_(s64) = G_INSERT %0, %1, 0
42 name: insert_lo32_i64_vs
47 liveins: $vgpr0_vgpr1, $sgpr2
48 ; CHECK-LABEL: name: insert_lo32_i64_vs
49 ; CHECK: liveins: $vgpr0_vgpr1, $sgpr2
51 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
52 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
53 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
54 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY]], [[COPY2]](s32), 0
55 %0:_(s64) = COPY $vgpr0_vgpr1
56 %1:_(s32) = COPY $sgpr2
57 %2:_(s64) = G_INSERT %0, %1, 0
60 name: insert_lo32_i64_vv
65 liveins: $vgpr0_vgpr1, $vgpr2
66 ; CHECK-LABEL: name: insert_lo32_i64_vv
67 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
69 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
70 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
71 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:sgpr(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0
72 %0:_(s64) = COPY $sgpr0_sgpr1
73 %1:_(s32) = COPY $sgpr2
74 %2:_(s64) = G_INSERT %0, %1, 0
78 name: insert_lo32_i96_v
83 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
84 ; CHECK-LABEL: name: insert_lo32_i96_v
85 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
87 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s96) = COPY $vgpr0_vgpr1_vgpr2
88 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr3
89 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:vgpr(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 0
90 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
91 %1:_(s32) = COPY $vgpr3
92 %2:_(s96) = G_INSERT %0, %1, 0
96 name: insert_lo32_i64_aa
101 liveins: $agpr0_agpr1, $agpr2
102 ; CHECK-LABEL: name: insert_lo32_i64_aa
103 ; CHECK: liveins: $agpr0_agpr1, $agpr2
105 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(s64) = COPY $agpr0_agpr1
106 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr2
107 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:agpr(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0
108 %0:_(s64) = COPY $agpr0_agpr1
109 %1:_(s32) = COPY $agpr2
110 %2:_(s64) = G_INSERT %0, %1, 0
114 name: insert_lo32_i64_av
119 liveins: $agpr0_agpr1, $vgpr2
120 ; CHECK-LABEL: name: insert_lo32_i64_av
121 ; CHECK: liveins: $agpr0_agpr1, $vgpr2
123 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(s64) = COPY $agpr0_agpr1
124 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
125 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
126 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY1]](s32), 0
127 %0:_(s64) = COPY $agpr0_agpr1
128 %1:_(s32) = COPY $vgpr2
129 %2:_(s64) = G_INSERT %0, %1, 0
132 name: insert_lo32_i64_va
137 liveins: $vgpr0_vgpr1, $agpr2
138 ; CHECK-LABEL: name: insert_lo32_i64_va
139 ; CHECK: liveins: $vgpr0_vgpr1, $agpr2
141 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
142 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr2
143 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
144 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY]], [[COPY2]](s32), 0
145 %0:_(s64) = COPY $vgpr0_vgpr1
146 %1:_(s32) = COPY $agpr2
147 %2:_(s64) = G_INSERT %0, %1, 0
151 name: insert_lo32_i64_as
156 liveins: $agpr0_agpr1, $sgpr2
157 ; CHECK-LABEL: name: insert_lo32_i64_as
158 ; CHECK: liveins: $agpr0_agpr1, $sgpr2
160 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(s64) = COPY $agpr0_agpr1
161 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
162 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
163 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
164 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY3]](s32), 0
165 %0:_(s64) = COPY $agpr0_agpr1
166 %1:_(s32) = COPY $sgpr2
167 %2:_(s64) = G_INSERT %0, %1, 0
170 name: insert_lo32_i64_sa
175 liveins: $sgpr0_sgpr1, $agpr2
176 ; CHECK-LABEL: name: insert_lo32_i64_sa
177 ; CHECK: liveins: $sgpr0_sgpr1, $agpr2
179 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
180 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr2
181 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
182 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
183 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY3]](s32), 0
184 %0:_(s64) = COPY $sgpr0_sgpr1
185 %1:_(s32) = COPY $agpr2
186 %2:_(s64) = G_INSERT %0, %1, 0