Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / GlobalISel / inst-select-lshr.mir
blobd18677d4adf69c850f40ef9c94587501e65d4229
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX6 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX7 %s
4 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX8 %s
5 # RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX9 %s
6 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX10 %s
7 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck -check-prefix=GFX10 %s
9 ---
10 name: lshr_s32_ss
11 legalized: true
12 regBankSelected: true
14 body: |
15   bb.0:
16     liveins: $sgpr0, $sgpr1
17     ; GFX6-LABEL: name: lshr_s32_ss
18     ; GFX6: liveins: $sgpr0, $sgpr1
19     ; GFX6-NEXT: {{  $}}
20     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
21     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
22     ; GFX6-NEXT: [[S_LSHR_B32_:%[0-9]+]]:sreg_32 = S_LSHR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
23     ; GFX6-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B32_]]
24     ;
25     ; GFX7-LABEL: name: lshr_s32_ss
26     ; GFX7: liveins: $sgpr0, $sgpr1
27     ; GFX7-NEXT: {{  $}}
28     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
29     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
30     ; GFX7-NEXT: [[S_LSHR_B32_:%[0-9]+]]:sreg_32 = S_LSHR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
31     ; GFX7-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B32_]]
32     ;
33     ; GFX8-LABEL: name: lshr_s32_ss
34     ; GFX8: liveins: $sgpr0, $sgpr1
35     ; GFX8-NEXT: {{  $}}
36     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
37     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
38     ; GFX8-NEXT: [[S_LSHR_B32_:%[0-9]+]]:sreg_32 = S_LSHR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
39     ; GFX8-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B32_]]
40     ;
41     ; GFX9-LABEL: name: lshr_s32_ss
42     ; GFX9: liveins: $sgpr0, $sgpr1
43     ; GFX9-NEXT: {{  $}}
44     ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
45     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
46     ; GFX9-NEXT: [[S_LSHR_B32_:%[0-9]+]]:sreg_32 = S_LSHR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
47     ; GFX9-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B32_]]
48     ;
49     ; GFX10-LABEL: name: lshr_s32_ss
50     ; GFX10: liveins: $sgpr0, $sgpr1
51     ; GFX10-NEXT: {{  $}}
52     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
53     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
54     ; GFX10-NEXT: [[S_LSHR_B32_:%[0-9]+]]:sreg_32 = S_LSHR_B32 [[COPY]], [[COPY1]], implicit-def dead $scc
55     ; GFX10-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B32_]]
56     %0:sgpr(s32) = COPY $sgpr0
57     %1:sgpr(s32) = COPY $sgpr1
58     %2:sgpr(s32) = G_LSHR %0, %1
59     S_ENDPGM 0, implicit %2
60 ...
62 ---
63 name: lshr_s32_sv
64 legalized: true
65 regBankSelected: true
67 body: |
68   bb.0:
69     liveins: $sgpr0, $vgpr0
70     ; GFX6-LABEL: name: lshr_s32_sv
71     ; GFX6: liveins: $sgpr0, $vgpr0
72     ; GFX6-NEXT: {{  $}}
73     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
74     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
75     ; GFX6-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
76     ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
77     ;
78     ; GFX7-LABEL: name: lshr_s32_sv
79     ; GFX7: liveins: $sgpr0, $vgpr0
80     ; GFX7-NEXT: {{  $}}
81     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
82     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
83     ; GFX7-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
84     ; GFX7-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
85     ;
86     ; GFX8-LABEL: name: lshr_s32_sv
87     ; GFX8: liveins: $sgpr0, $vgpr0
88     ; GFX8-NEXT: {{  $}}
89     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
90     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
91     ; GFX8-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
92     ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
93     ;
94     ; GFX9-LABEL: name: lshr_s32_sv
95     ; GFX9: liveins: $sgpr0, $vgpr0
96     ; GFX9-NEXT: {{  $}}
97     ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
98     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
99     ; GFX9-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
100     ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
101     ;
102     ; GFX10-LABEL: name: lshr_s32_sv
103     ; GFX10: liveins: $sgpr0, $vgpr0
104     ; GFX10-NEXT: {{  $}}
105     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
106     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
107     ; GFX10-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
108     ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
109     %0:sgpr(s32) = COPY $sgpr0
110     %1:vgpr(s32) = COPY $vgpr0
111     %2:vgpr(s32) = G_LSHR %0, %1
112     S_ENDPGM 0, implicit %2
116 name: lshr_s32_vs
117 legalized: true
118 regBankSelected: true
120 body: |
121   bb.0:
122     liveins: $sgpr0, $vgpr0
123     ; GFX6-LABEL: name: lshr_s32_vs
124     ; GFX6: liveins: $sgpr0, $vgpr0
125     ; GFX6-NEXT: {{  $}}
126     ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
127     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
128     ; GFX6-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
129     ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
130     ;
131     ; GFX7-LABEL: name: lshr_s32_vs
132     ; GFX7: liveins: $sgpr0, $vgpr0
133     ; GFX7-NEXT: {{  $}}
134     ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
135     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
136     ; GFX7-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
137     ; GFX7-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
138     ;
139     ; GFX8-LABEL: name: lshr_s32_vs
140     ; GFX8: liveins: $sgpr0, $vgpr0
141     ; GFX8-NEXT: {{  $}}
142     ; GFX8-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
143     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
144     ; GFX8-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
145     ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
146     ;
147     ; GFX9-LABEL: name: lshr_s32_vs
148     ; GFX9: liveins: $sgpr0, $vgpr0
149     ; GFX9-NEXT: {{  $}}
150     ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
151     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
152     ; GFX9-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
153     ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
154     ;
155     ; GFX10-LABEL: name: lshr_s32_vs
156     ; GFX10: liveins: $sgpr0, $vgpr0
157     ; GFX10-NEXT: {{  $}}
158     ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
159     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
160     ; GFX10-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
161     ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
162     %0:vgpr(s32) = COPY $vgpr0
163     %1:sgpr(s32) = COPY $sgpr0
164     %2:vgpr(s32) = G_LSHR %0, %1
165     S_ENDPGM 0, implicit %2
169 name: lshr_s32_vv
170 legalized: true
171 regBankSelected: true
173 body: |
174   bb.0:
175     liveins: $vgpr0, $vgpr1
176     ; GFX6-LABEL: name: lshr_s32_vv
177     ; GFX6: liveins: $vgpr0, $vgpr1
178     ; GFX6-NEXT: {{  $}}
179     ; GFX6-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
180     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
181     ; GFX6-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
182     ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
183     ;
184     ; GFX7-LABEL: name: lshr_s32_vv
185     ; GFX7: liveins: $vgpr0, $vgpr1
186     ; GFX7-NEXT: {{  $}}
187     ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
188     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
189     ; GFX7-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
190     ; GFX7-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
191     ;
192     ; GFX8-LABEL: name: lshr_s32_vv
193     ; GFX8: liveins: $vgpr0, $vgpr1
194     ; GFX8-NEXT: {{  $}}
195     ; GFX8-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
196     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
197     ; GFX8-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
198     ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
199     ;
200     ; GFX9-LABEL: name: lshr_s32_vv
201     ; GFX9: liveins: $vgpr0, $vgpr1
202     ; GFX9-NEXT: {{  $}}
203     ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
204     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
205     ; GFX9-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
206     ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
207     ;
208     ; GFX10-LABEL: name: lshr_s32_vv
209     ; GFX10: liveins: $vgpr0, $vgpr1
210     ; GFX10-NEXT: {{  $}}
211     ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
212     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
213     ; GFX10-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 [[COPY1]], [[COPY]], implicit $exec
214     ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B32_e64_]]
215     %0:vgpr(s32) = COPY $vgpr0
216     %1:vgpr(s32) = COPY $vgpr1
217     %2:vgpr(s32) = G_LSHR %0, %1
218     S_ENDPGM 0, implicit %2
222 name: lshr_s64_ss
223 legalized: true
224 regBankSelected: true
226 body: |
227   bb.0:
228     liveins: $sgpr0_sgpr1, $sgpr2
229     ; GFX6-LABEL: name: lshr_s64_ss
230     ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2
231     ; GFX6-NEXT: {{  $}}
232     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
233     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
234     ; GFX6-NEXT: [[S_LSHR_B64_:%[0-9]+]]:sreg_64 = S_LSHR_B64 [[COPY]], [[COPY1]], implicit-def dead $scc
235     ; GFX6-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B64_]]
236     ;
237     ; GFX7-LABEL: name: lshr_s64_ss
238     ; GFX7: liveins: $sgpr0_sgpr1, $sgpr2
239     ; GFX7-NEXT: {{  $}}
240     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
241     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
242     ; GFX7-NEXT: [[S_LSHR_B64_:%[0-9]+]]:sreg_64 = S_LSHR_B64 [[COPY]], [[COPY1]], implicit-def dead $scc
243     ; GFX7-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B64_]]
244     ;
245     ; GFX8-LABEL: name: lshr_s64_ss
246     ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2
247     ; GFX8-NEXT: {{  $}}
248     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
249     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
250     ; GFX8-NEXT: [[S_LSHR_B64_:%[0-9]+]]:sreg_64 = S_LSHR_B64 [[COPY]], [[COPY1]], implicit-def dead $scc
251     ; GFX8-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B64_]]
252     ;
253     ; GFX9-LABEL: name: lshr_s64_ss
254     ; GFX9: liveins: $sgpr0_sgpr1, $sgpr2
255     ; GFX9-NEXT: {{  $}}
256     ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
257     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
258     ; GFX9-NEXT: [[S_LSHR_B64_:%[0-9]+]]:sreg_64 = S_LSHR_B64 [[COPY]], [[COPY1]], implicit-def dead $scc
259     ; GFX9-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B64_]]
260     ;
261     ; GFX10-LABEL: name: lshr_s64_ss
262     ; GFX10: liveins: $sgpr0_sgpr1, $sgpr2
263     ; GFX10-NEXT: {{  $}}
264     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
265     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
266     ; GFX10-NEXT: [[S_LSHR_B64_:%[0-9]+]]:sreg_64 = S_LSHR_B64 [[COPY]], [[COPY1]], implicit-def dead $scc
267     ; GFX10-NEXT: S_ENDPGM 0, implicit [[S_LSHR_B64_]]
268     %0:sgpr(s64) = COPY $sgpr0_sgpr1
269     %1:sgpr(s32) = COPY $sgpr2
270     %2:sgpr(s64) = G_LSHR %0, %1
271     S_ENDPGM 0, implicit %2
275 name: lshr_s64_sv
276 legalized: true
277 regBankSelected: true
279 body: |
280   bb.0:
281     liveins: $sgpr0_sgpr1, $vgpr0
282     ; GFX6-LABEL: name: lshr_s64_sv
283     ; GFX6: liveins: $sgpr0_sgpr1, $vgpr0
284     ; GFX6-NEXT: {{  $}}
285     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
286     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
287     ; GFX6-NEXT: [[V_LSHR_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHR_B64_e64 [[COPY]], [[COPY1]], implicit $exec
288     ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_LSHR_B64_e64_]]
289     ;
290     ; GFX7-LABEL: name: lshr_s64_sv
291     ; GFX7: liveins: $sgpr0_sgpr1, $vgpr0
292     ; GFX7-NEXT: {{  $}}
293     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
294     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
295     ; GFX7-NEXT: [[V_LSHR_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHR_B64_e64 [[COPY]], [[COPY1]], implicit $exec
296     ; GFX7-NEXT: S_ENDPGM 0, implicit [[V_LSHR_B64_e64_]]
297     ;
298     ; GFX8-LABEL: name: lshr_s64_sv
299     ; GFX8: liveins: $sgpr0_sgpr1, $vgpr0
300     ; GFX8-NEXT: {{  $}}
301     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
302     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
303     ; GFX8-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
304     ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
305     ;
306     ; GFX9-LABEL: name: lshr_s64_sv
307     ; GFX9: liveins: $sgpr0_sgpr1, $vgpr0
308     ; GFX9-NEXT: {{  $}}
309     ; GFX9-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
310     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
311     ; GFX9-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
312     ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
313     ;
314     ; GFX10-LABEL: name: lshr_s64_sv
315     ; GFX10: liveins: $sgpr0_sgpr1, $vgpr0
316     ; GFX10-NEXT: {{  $}}
317     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
318     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
319     ; GFX10-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
320     ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
321     %0:sgpr(s64) = COPY $sgpr0_sgpr1
322     %1:vgpr(s32) = COPY $vgpr0
323     %2:vgpr(s64) = G_LSHR %0, %1
324     S_ENDPGM 0, implicit %2
328 name: lshr_s64_vs
329 legalized: true
330 regBankSelected: true
332 body: |
333   bb.0:
334     liveins: $sgpr0, $vgpr0_vgpr1
335     ; GFX6-LABEL: name: lshr_s64_vs
336     ; GFX6: liveins: $sgpr0, $vgpr0_vgpr1
337     ; GFX6-NEXT: {{  $}}
338     ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
339     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
340     ; GFX6-NEXT: [[V_LSHR_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHR_B64_e64 [[COPY]], [[COPY1]], implicit $exec
341     ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_LSHR_B64_e64_]]
342     ;
343     ; GFX7-LABEL: name: lshr_s64_vs
344     ; GFX7: liveins: $sgpr0, $vgpr0_vgpr1
345     ; GFX7-NEXT: {{  $}}
346     ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
347     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
348     ; GFX7-NEXT: [[V_LSHR_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHR_B64_e64 [[COPY]], [[COPY1]], implicit $exec
349     ; GFX7-NEXT: S_ENDPGM 0, implicit [[V_LSHR_B64_e64_]]
350     ;
351     ; GFX8-LABEL: name: lshr_s64_vs
352     ; GFX8: liveins: $sgpr0, $vgpr0_vgpr1
353     ; GFX8-NEXT: {{  $}}
354     ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
355     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
356     ; GFX8-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
357     ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
358     ;
359     ; GFX9-LABEL: name: lshr_s64_vs
360     ; GFX9: liveins: $sgpr0, $vgpr0_vgpr1
361     ; GFX9-NEXT: {{  $}}
362     ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
363     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
364     ; GFX9-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
365     ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
366     ;
367     ; GFX10-LABEL: name: lshr_s64_vs
368     ; GFX10: liveins: $sgpr0, $vgpr0_vgpr1
369     ; GFX10-NEXT: {{  $}}
370     ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
371     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
372     ; GFX10-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
373     ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
374     %0:vgpr(s64) = COPY $vgpr0_vgpr1
375     %1:sgpr(s32) = COPY $sgpr0
376     %2:vgpr(s64) = G_LSHR %0, %1
377     S_ENDPGM 0, implicit %2
381 name: lshr_s64_vv
382 legalized: true
383 regBankSelected: true
385 body: |
386   bb.0:
387     liveins: $vgpr0_vgpr1, $vgpr2
388     ; GFX6-LABEL: name: lshr_s64_vv
389     ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2
390     ; GFX6-NEXT: {{  $}}
391     ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
392     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
393     ; GFX6-NEXT: [[V_LSHR_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHR_B64_e64 [[COPY]], [[COPY1]], implicit $exec
394     ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_LSHR_B64_e64_]]
395     ;
396     ; GFX7-LABEL: name: lshr_s64_vv
397     ; GFX7: liveins: $vgpr0_vgpr1, $vgpr2
398     ; GFX7-NEXT: {{  $}}
399     ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
400     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
401     ; GFX7-NEXT: [[V_LSHR_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHR_B64_e64 [[COPY]], [[COPY1]], implicit $exec
402     ; GFX7-NEXT: S_ENDPGM 0, implicit [[V_LSHR_B64_e64_]]
403     ;
404     ; GFX8-LABEL: name: lshr_s64_vv
405     ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2
406     ; GFX8-NEXT: {{  $}}
407     ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
408     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
409     ; GFX8-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
410     ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
411     ;
412     ; GFX9-LABEL: name: lshr_s64_vv
413     ; GFX9: liveins: $vgpr0_vgpr1, $vgpr2
414     ; GFX9-NEXT: {{  $}}
415     ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
416     ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
417     ; GFX9-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
418     ; GFX9-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
419     ;
420     ; GFX10-LABEL: name: lshr_s64_vv
421     ; GFX10: liveins: $vgpr0_vgpr1, $vgpr2
422     ; GFX10-NEXT: {{  $}}
423     ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
424     ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
425     ; GFX10-NEXT: [[V_LSHRREV_B64_e64_:%[0-9]+]]:vreg_64 = V_LSHRREV_B64_e64 [[COPY1]], [[COPY]], implicit $exec
426     ; GFX10-NEXT: S_ENDPGM 0, implicit [[V_LSHRREV_B64_e64_]]
427     %0:vgpr(s64) = COPY $vgpr0_vgpr1
428     %1:vgpr(s32) = COPY $vgpr2
429     %2:vgpr(s64) = G_LSHR %0, %1
430     S_ENDPGM 0, implicit %2