[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / GlobalISel / inst-select-load-constant.mir
bloba53fd81f351a2d06fab16c79783489fab066cf24
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs  -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s
3 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs  -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
4 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX8 %s
5 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX10 %s
6 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX10 %s
8 ---
10 name: load_constant_s32_from_4
11 legalized:       true
12 regBankSelected: true
13 tracksRegLiveness: true
16 body: |
17   bb.0:
18     liveins:  $sgpr0_sgpr1
20     ; GFX6-LABEL: name: load_constant_s32_from_4
21     ; GFX6: liveins: $sgpr0_sgpr1
22     ; GFX6-NEXT: {{  $}}
23     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
24     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
25     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
26     ;
27     ; GFX7-LABEL: name: load_constant_s32_from_4
28     ; GFX7: liveins: $sgpr0_sgpr1
29     ; GFX7-NEXT: {{  $}}
30     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
31     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
32     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
33     ;
34     ; GFX8-LABEL: name: load_constant_s32_from_4
35     ; GFX8: liveins: $sgpr0_sgpr1
36     ; GFX8-NEXT: {{  $}}
37     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
38     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
39     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
40     ;
41     ; GFX10-LABEL: name: load_constant_s32_from_4
42     ; GFX10: liveins: $sgpr0_sgpr1
43     ; GFX10-NEXT: {{  $}}
44     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
45     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
46     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
47     %0:sgpr(p4) = COPY $sgpr0_sgpr1
48     %1:sgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 4)
49     $sgpr0 = COPY %1
51 ...
53 ---
55 name: load_constant_v2s16_from_4
56 legalized:       true
57 regBankSelected: true
58 tracksRegLiveness: true
61 body: |
62   bb.0:
63     liveins:  $sgpr0_sgpr1
65     ; GFX6-LABEL: name: load_constant_v2s16_from_4
66     ; GFX6: liveins: $sgpr0_sgpr1
67     ; GFX6-NEXT: {{  $}}
68     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
69     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
70     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
71     ;
72     ; GFX7-LABEL: name: load_constant_v2s16_from_4
73     ; GFX7: liveins: $sgpr0_sgpr1
74     ; GFX7-NEXT: {{  $}}
75     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
76     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
77     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
78     ;
79     ; GFX8-LABEL: name: load_constant_v2s16_from_4
80     ; GFX8: liveins: $sgpr0_sgpr1
81     ; GFX8-NEXT: {{  $}}
82     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
83     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
84     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
85     ;
86     ; GFX10-LABEL: name: load_constant_v2s16_from_4
87     ; GFX10: liveins: $sgpr0_sgpr1
88     ; GFX10-NEXT: {{  $}}
89     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
90     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
91     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
92     %0:sgpr(p4) = COPY $sgpr0_sgpr1
93     %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>), align 4, addrspace 4)
94     $sgpr0 = COPY %1
96 ...
99 ---
100 name: load_constant_v2s32
101 legalized:       true
102 regBankSelected: true
103 tracksRegLiveness: true
105 body: |
106   bb.0:
107     liveins:  $sgpr0_sgpr1
109     ; GFX6-LABEL: name: load_constant_v2s32
110     ; GFX6: liveins: $sgpr0_sgpr1
111     ; GFX6-NEXT: {{  $}}
112     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
113     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
114     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
115     ;
116     ; GFX7-LABEL: name: load_constant_v2s32
117     ; GFX7: liveins: $sgpr0_sgpr1
118     ; GFX7-NEXT: {{  $}}
119     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
120     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
121     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
122     ;
123     ; GFX8-LABEL: name: load_constant_v2s32
124     ; GFX8: liveins: $sgpr0_sgpr1
125     ; GFX8-NEXT: {{  $}}
126     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
127     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
128     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
129     ;
130     ; GFX10-LABEL: name: load_constant_v2s32
131     ; GFX10: liveins: $sgpr0_sgpr1
132     ; GFX10-NEXT: {{  $}}
133     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
134     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
135     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
136     %0:sgpr(p4) = COPY $sgpr0_sgpr1
137     %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>), align 8, addrspace 4)
138     $sgpr0_sgpr1 = COPY %1
143 name: load_constant_v2s32_align4
144 legalized:       true
145 regBankSelected: true
146 tracksRegLiveness: true
148 body: |
149   bb.0:
150     liveins:  $sgpr0_sgpr1
152     ; GFX6-LABEL: name: load_constant_v2s32_align4
153     ; GFX6: liveins: $sgpr0_sgpr1
154     ; GFX6-NEXT: {{  $}}
155     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
156     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
157     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
158     ;
159     ; GFX7-LABEL: name: load_constant_v2s32_align4
160     ; GFX7: liveins: $sgpr0_sgpr1
161     ; GFX7-NEXT: {{  $}}
162     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
163     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
164     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
165     ;
166     ; GFX8-LABEL: name: load_constant_v2s32_align4
167     ; GFX8: liveins: $sgpr0_sgpr1
168     ; GFX8-NEXT: {{  $}}
169     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
170     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
171     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
172     ;
173     ; GFX10-LABEL: name: load_constant_v2s32_align4
174     ; GFX10: liveins: $sgpr0_sgpr1
175     ; GFX10-NEXT: {{  $}}
176     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
177     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
178     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
179     %0:sgpr(p4) = COPY $sgpr0_sgpr1
180     %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>), align 4, addrspace 4)
181     $sgpr0_sgpr1 = COPY %1
186 name: load_constant_v4s16_align4
187 legalized:       true
188 regBankSelected: true
189 tracksRegLiveness: true
191 body: |
192   bb.0:
193     liveins:  $sgpr0_sgpr1
195     ; GFX6-LABEL: name: load_constant_v4s16_align4
196     ; GFX6: liveins: $sgpr0_sgpr1
197     ; GFX6-NEXT: {{  $}}
198     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
199     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
200     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
201     ;
202     ; GFX7-LABEL: name: load_constant_v4s16_align4
203     ; GFX7: liveins: $sgpr0_sgpr1
204     ; GFX7-NEXT: {{  $}}
205     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
206     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
207     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
208     ;
209     ; GFX8-LABEL: name: load_constant_v4s16_align4
210     ; GFX8: liveins: $sgpr0_sgpr1
211     ; GFX8-NEXT: {{  $}}
212     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
213     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
214     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
215     ;
216     ; GFX10-LABEL: name: load_constant_v4s16_align4
217     ; GFX10: liveins: $sgpr0_sgpr1
218     ; GFX10-NEXT: {{  $}}
219     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
220     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
221     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
222     %0:sgpr(p4) = COPY $sgpr0_sgpr1
223     %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load (<4 x s16>), align 4, addrspace 4)
224     $sgpr0_sgpr1 = COPY %1
230 name: load_constant_v4s32_align4
231 legalized:       true
232 regBankSelected: true
233 tracksRegLiveness: true
235 body: |
236   bb.0:
237     liveins:  $sgpr0_sgpr1
239     ; GFX6-LABEL: name: load_constant_v4s32_align4
240     ; GFX6: liveins: $sgpr0_sgpr1
241     ; GFX6-NEXT: {{  $}}
242     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
243     ; GFX6-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
244     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
245     ;
246     ; GFX7-LABEL: name: load_constant_v4s32_align4
247     ; GFX7: liveins: $sgpr0_sgpr1
248     ; GFX7-NEXT: {{  $}}
249     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
250     ; GFX7-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
251     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
252     ;
253     ; GFX8-LABEL: name: load_constant_v4s32_align4
254     ; GFX8: liveins: $sgpr0_sgpr1
255     ; GFX8-NEXT: {{  $}}
256     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
257     ; GFX8-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
258     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
259     ;
260     ; GFX10-LABEL: name: load_constant_v4s32_align4
261     ; GFX10: liveins: $sgpr0_sgpr1
262     ; GFX10-NEXT: {{  $}}
263     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
264     ; GFX10-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
265     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
266     %0:sgpr(p4) = COPY $sgpr0_sgpr1
267     %1:sgpr(<4 x  s32>) = G_LOAD %0 :: (load (<4 x s32>), align 4, addrspace 4)
268     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
274 name: load_constant_s64
275 legalized:       true
276 regBankSelected: true
277 tracksRegLiveness: true
279 body: |
280   bb.0:
281     liveins:  $sgpr0_sgpr1
283     ; GFX6-LABEL: name: load_constant_s64
284     ; GFX6: liveins: $sgpr0_sgpr1
285     ; GFX6-NEXT: {{  $}}
286     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
287     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
288     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
289     ;
290     ; GFX7-LABEL: name: load_constant_s64
291     ; GFX7: liveins: $sgpr0_sgpr1
292     ; GFX7-NEXT: {{  $}}
293     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
294     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
295     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
296     ;
297     ; GFX8-LABEL: name: load_constant_s64
298     ; GFX8: liveins: $sgpr0_sgpr1
299     ; GFX8-NEXT: {{  $}}
300     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
301     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
302     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
303     ;
304     ; GFX10-LABEL: name: load_constant_s64
305     ; GFX10: liveins: $sgpr0_sgpr1
306     ; GFX10-NEXT: {{  $}}
307     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
308     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
309     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
310     %0:sgpr(p4) = COPY $sgpr0_sgpr1
311     %1:sgpr(s64) = G_LOAD %0 :: (load (s64), align 8, addrspace 4)
312     $sgpr0_sgpr1 = COPY %1
318 name: load_constant_s64_align4
319 legalized:       true
320 regBankSelected: true
321 tracksRegLiveness: true
323 body: |
324   bb.0:
325     liveins:  $sgpr0_sgpr1
327     ; GFX6-LABEL: name: load_constant_s64_align4
328     ; GFX6: liveins: $sgpr0_sgpr1
329     ; GFX6-NEXT: {{  $}}
330     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
331     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
332     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
333     ;
334     ; GFX7-LABEL: name: load_constant_s64_align4
335     ; GFX7: liveins: $sgpr0_sgpr1
336     ; GFX7-NEXT: {{  $}}
337     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
338     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
339     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
340     ;
341     ; GFX8-LABEL: name: load_constant_s64_align4
342     ; GFX8: liveins: $sgpr0_sgpr1
343     ; GFX8-NEXT: {{  $}}
344     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
345     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
346     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
347     ;
348     ; GFX10-LABEL: name: load_constant_s64_align4
349     ; GFX10: liveins: $sgpr0_sgpr1
350     ; GFX10-NEXT: {{  $}}
351     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
352     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
353     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
354     %0:sgpr(p4) = COPY $sgpr0_sgpr1
355     %1:sgpr(s64) = G_LOAD %0 :: (load (s64), align 4, addrspace 4)
356     $sgpr0_sgpr1 = COPY %1
362 name: load_constant_v2s64
363 legalized:       true
364 regBankSelected: true
365 tracksRegLiveness: true
367 body: |
368   bb.0:
369     liveins:  $sgpr0_sgpr1
371     ; GFX6-LABEL: name: load_constant_v2s64
372     ; GFX6: liveins: $sgpr0_sgpr1
373     ; GFX6-NEXT: {{  $}}
374     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
375     ; GFX6-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
376     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
377     ;
378     ; GFX7-LABEL: name: load_constant_v2s64
379     ; GFX7: liveins: $sgpr0_sgpr1
380     ; GFX7-NEXT: {{  $}}
381     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
382     ; GFX7-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
383     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
384     ;
385     ; GFX8-LABEL: name: load_constant_v2s64
386     ; GFX8: liveins: $sgpr0_sgpr1
387     ; GFX8-NEXT: {{  $}}
388     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
389     ; GFX8-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
390     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
391     ;
392     ; GFX10-LABEL: name: load_constant_v2s64
393     ; GFX10: liveins: $sgpr0_sgpr1
394     ; GFX10-NEXT: {{  $}}
395     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
396     ; GFX10-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
397     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
398     %0:sgpr(p4) = COPY $sgpr0_sgpr1
399     %1:sgpr(<2 x s64>) = G_LOAD %0 :: (load (<2 x s64>), align 4, addrspace 4)
400     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
406 name: load_constant_v2p1
407 legalized:       true
408 regBankSelected: true
409 tracksRegLiveness: true
411 body: |
412   bb.0:
413     liveins:  $sgpr0_sgpr1
415     ; GFX6-LABEL: name: load_constant_v2p1
416     ; GFX6: liveins: $sgpr0_sgpr1
417     ; GFX6-NEXT: {{  $}}
418     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
419     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
420     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
421     ;
422     ; GFX7-LABEL: name: load_constant_v2p1
423     ; GFX7: liveins: $sgpr0_sgpr1
424     ; GFX7-NEXT: {{  $}}
425     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
426     ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
427     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
428     ;
429     ; GFX8-LABEL: name: load_constant_v2p1
430     ; GFX8: liveins: $sgpr0_sgpr1
431     ; GFX8-NEXT: {{  $}}
432     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
433     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
434     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
435     ;
436     ; GFX10-LABEL: name: load_constant_v2p1
437     ; GFX10: liveins: $sgpr0_sgpr1
438     ; GFX10-NEXT: {{  $}}
439     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
440     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
441     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
442     %0:sgpr(p4) = COPY $sgpr0_sgpr1
443     %1:sgpr(<2 x p1>) = G_LOAD %0 :: (load (<2 x p1>), align 4, addrspace 4)
444     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
450 name: load_constant_s128_align4
451 legalized:       true
452 regBankSelected: true
453 tracksRegLiveness: true
455 body: |
456   bb.0:
457     liveins:  $sgpr0_sgpr1
459     ; GFX6-LABEL: name: load_constant_s128_align4
460     ; GFX6: liveins: $sgpr0_sgpr1
461     ; GFX6-NEXT: {{  $}}
462     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
463     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
464     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
465     ;
466     ; GFX7-LABEL: name: load_constant_s128_align4
467     ; GFX7: liveins: $sgpr0_sgpr1
468     ; GFX7-NEXT: {{  $}}
469     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
470     ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
471     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
472     ;
473     ; GFX8-LABEL: name: load_constant_s128_align4
474     ; GFX8: liveins: $sgpr0_sgpr1
475     ; GFX8-NEXT: {{  $}}
476     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
477     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
478     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
479     ;
480     ; GFX10-LABEL: name: load_constant_s128_align4
481     ; GFX10: liveins: $sgpr0_sgpr1
482     ; GFX10-NEXT: {{  $}}
483     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
484     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
485     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
486     %0:sgpr(p4) = COPY $sgpr0_sgpr1
487     %1:sgpr(s128) = G_LOAD %0 :: (load (s128), align 4, addrspace 4)
488     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
494 name: load_constant_p3_from_4
495 legalized:       true
496 regBankSelected: true
497 tracksRegLiveness: true
499 body: |
500   bb.0:
501     liveins:  $sgpr0_sgpr1
503     ; GFX6-LABEL: name: load_constant_p3_from_4
504     ; GFX6: liveins: $sgpr0_sgpr1
505     ; GFX6-NEXT: {{  $}}
506     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
507     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
508     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
509     ;
510     ; GFX7-LABEL: name: load_constant_p3_from_4
511     ; GFX7: liveins: $sgpr0_sgpr1
512     ; GFX7-NEXT: {{  $}}
513     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
514     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
515     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
516     ;
517     ; GFX8-LABEL: name: load_constant_p3_from_4
518     ; GFX8: liveins: $sgpr0_sgpr1
519     ; GFX8-NEXT: {{  $}}
520     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
521     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
522     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
523     ;
524     ; GFX10-LABEL: name: load_constant_p3_from_4
525     ; GFX10: liveins: $sgpr0_sgpr1
526     ; GFX10-NEXT: {{  $}}
527     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
528     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
529     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
530     %0:sgpr(p4) = COPY $sgpr0_sgpr1
531     %1:sgpr(p3) = G_LOAD %0 :: (load (p3), align 4, addrspace 4)
532     $sgpr0 = COPY %1
538 name: load_constant_p4_from_8
539 legalized:       true
540 regBankSelected: true
541 tracksRegLiveness: true
543 body: |
544   bb.0:
545     liveins:  $sgpr0_sgpr1
547     ; GFX6-LABEL: name: load_constant_p4_from_8
548     ; GFX6: liveins: $sgpr0_sgpr1
549     ; GFX6-NEXT: {{  $}}
550     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
551     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
552     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
553     ;
554     ; GFX7-LABEL: name: load_constant_p4_from_8
555     ; GFX7: liveins: $sgpr0_sgpr1
556     ; GFX7-NEXT: {{  $}}
557     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
558     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
559     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
560     ;
561     ; GFX8-LABEL: name: load_constant_p4_from_8
562     ; GFX8: liveins: $sgpr0_sgpr1
563     ; GFX8-NEXT: {{  $}}
564     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
565     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
566     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
567     ;
568     ; GFX10-LABEL: name: load_constant_p4_from_8
569     ; GFX10: liveins: $sgpr0_sgpr1
570     ; GFX10-NEXT: {{  $}}
571     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
572     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
573     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
574     %0:sgpr(p4) = COPY $sgpr0_sgpr1
575     %1:sgpr(p4) = G_LOAD %0 :: (load (p4), align 8, addrspace 4)
576     $sgpr0_sgpr1 = COPY %1
582 name: load_constant_p999_from_8
583 legalized:       true
584 regBankSelected: true
585 tracksRegLiveness: true
587 body: |
588   bb.0:
589     liveins:  $sgpr0_sgpr1
591     ; GFX6-LABEL: name: load_constant_p999_from_8
592     ; GFX6: liveins: $sgpr0_sgpr1
593     ; GFX6-NEXT: {{  $}}
594     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
595     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
596     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
597     ;
598     ; GFX7-LABEL: name: load_constant_p999_from_8
599     ; GFX7: liveins: $sgpr0_sgpr1
600     ; GFX7-NEXT: {{  $}}
601     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
602     ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
603     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
604     ;
605     ; GFX8-LABEL: name: load_constant_p999_from_8
606     ; GFX8: liveins: $sgpr0_sgpr1
607     ; GFX8-NEXT: {{  $}}
608     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
609     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
610     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
611     ;
612     ; GFX10-LABEL: name: load_constant_p999_from_8
613     ; GFX10: liveins: $sgpr0_sgpr1
614     ; GFX10-NEXT: {{  $}}
615     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
616     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
617     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
618     %0:sgpr(p4) = COPY $sgpr0_sgpr1
619     %1:sgpr(p999) = G_LOAD %0 :: (load (p999), align 8, addrspace 4)
620     $sgpr0_sgpr1 = COPY %1
626 name: load_constant_v2p3
627 legalized:       true
628 regBankSelected: true
629 tracksRegLiveness: true
631 body: |
632   bb.0:
633     liveins:  $sgpr0_sgpr1
635     ; GFX6-LABEL: name: load_constant_v2p3
636     ; GFX6: liveins: $sgpr0_sgpr1
637     ; GFX6-NEXT: {{  $}}
638     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
639     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
640     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
641     ;
642     ; GFX7-LABEL: name: load_constant_v2p3
643     ; GFX7: liveins: $sgpr0_sgpr1
644     ; GFX7-NEXT: {{  $}}
645     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
646     ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
647     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
648     ;
649     ; GFX8-LABEL: name: load_constant_v2p3
650     ; GFX8: liveins: $sgpr0_sgpr1
651     ; GFX8-NEXT: {{  $}}
652     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
653     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
654     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
655     ;
656     ; GFX10-LABEL: name: load_constant_v2p3
657     ; GFX10: liveins: $sgpr0_sgpr1
658     ; GFX10-NEXT: {{  $}}
659     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
660     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
661     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
662     %0:sgpr(p4) = COPY $sgpr0_sgpr1
663     %1:sgpr(<2 x p3>) = G_LOAD %0 :: (load (<2 x p3>), align 8, addrspace 4)
664     $sgpr0_sgpr1 = COPY %1
670 name: load_constant_v2s16
671 legalized:       true
672 regBankSelected: true
673 tracksRegLiveness: true
675 body: |
676   bb.0:
677     liveins:  $sgpr0_sgpr1
679     ; GFX6-LABEL: name: load_constant_v2s16
680     ; GFX6: liveins: $sgpr0_sgpr1
681     ; GFX6-NEXT: {{  $}}
682     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
683     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
684     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
685     ;
686     ; GFX7-LABEL: name: load_constant_v2s16
687     ; GFX7: liveins: $sgpr0_sgpr1
688     ; GFX7-NEXT: {{  $}}
689     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
690     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
691     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
692     ;
693     ; GFX8-LABEL: name: load_constant_v2s16
694     ; GFX8: liveins: $sgpr0_sgpr1
695     ; GFX8-NEXT: {{  $}}
696     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
697     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
698     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
699     ;
700     ; GFX10-LABEL: name: load_constant_v2s16
701     ; GFX10: liveins: $sgpr0_sgpr1
702     ; GFX10-NEXT: {{  $}}
703     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
704     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
705     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
706     %0:sgpr(p4) = COPY $sgpr0_sgpr1
707     %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>), align 4, addrspace 4)
708     $sgpr0 = COPY %1
714 name: load_constant_v4s16
715 legalized:       true
716 regBankSelected: true
717 tracksRegLiveness: true
719 body: |
720   bb.0:
721     liveins:  $sgpr0_sgpr1
723     ; GFX6-LABEL: name: load_constant_v4s16
724     ; GFX6: liveins: $sgpr0_sgpr1
725     ; GFX6-NEXT: {{  $}}
726     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
727     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
728     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
729     ;
730     ; GFX7-LABEL: name: load_constant_v4s16
731     ; GFX7: liveins: $sgpr0_sgpr1
732     ; GFX7-NEXT: {{  $}}
733     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
734     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
735     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
736     ;
737     ; GFX8-LABEL: name: load_constant_v4s16
738     ; GFX8: liveins: $sgpr0_sgpr1
739     ; GFX8-NEXT: {{  $}}
740     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
741     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
742     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
743     ;
744     ; GFX10-LABEL: name: load_constant_v4s16
745     ; GFX10: liveins: $sgpr0_sgpr1
746     ; GFX10-NEXT: {{  $}}
747     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
748     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
749     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
750     %0:sgpr(p4) = COPY $sgpr0_sgpr1
751     %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load (<4 x s16>), align 8, addrspace 4)
752     $sgpr0_sgpr1 = COPY %1
758 name: load_constant_v8s16
759 legalized:       true
760 regBankSelected: true
761 tracksRegLiveness: true
763 body: |
764   bb.0:
765     liveins:  $sgpr0_sgpr1
767     ; GFX6-LABEL: name: load_constant_v8s16
768     ; GFX6: liveins: $sgpr0_sgpr1
769     ; GFX6-NEXT: {{  $}}
770     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
771     ; GFX6-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
772     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
773     ;
774     ; GFX7-LABEL: name: load_constant_v8s16
775     ; GFX7: liveins: $sgpr0_sgpr1
776     ; GFX7-NEXT: {{  $}}
777     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
778     ; GFX7-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
779     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
780     ;
781     ; GFX8-LABEL: name: load_constant_v8s16
782     ; GFX8: liveins: $sgpr0_sgpr1
783     ; GFX8-NEXT: {{  $}}
784     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
785     ; GFX8-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
786     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
787     ;
788     ; GFX10-LABEL: name: load_constant_v8s16
789     ; GFX10: liveins: $sgpr0_sgpr1
790     ; GFX10-NEXT: {{  $}}
791     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
792     ; GFX10-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
793     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
794     %0:sgpr(p4) = COPY $sgpr0_sgpr1
795     %1:sgpr(<8 x s16>) = G_LOAD %0 :: (load (<8 x s16>), align 4, addrspace 4)
796     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
802 name: load_constant_v8s32
803 legalized:       true
804 regBankSelected: true
805 tracksRegLiveness: true
807 body: |
808   bb.0:
809     liveins:  $sgpr0_sgpr1
811     ; GFX6-LABEL: name: load_constant_v8s32
812     ; GFX6: liveins: $sgpr0_sgpr1
813     ; GFX6-NEXT: {{  $}}
814     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
815     ; GFX6-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
816     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
817     ;
818     ; GFX7-LABEL: name: load_constant_v8s32
819     ; GFX7: liveins: $sgpr0_sgpr1
820     ; GFX7-NEXT: {{  $}}
821     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
822     ; GFX7-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
823     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
824     ;
825     ; GFX8-LABEL: name: load_constant_v8s32
826     ; GFX8: liveins: $sgpr0_sgpr1
827     ; GFX8-NEXT: {{  $}}
828     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
829     ; GFX8-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
830     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
831     ;
832     ; GFX10-LABEL: name: load_constant_v8s32
833     ; GFX10: liveins: $sgpr0_sgpr1
834     ; GFX10-NEXT: {{  $}}
835     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
836     ; GFX10-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
837     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
838     %0:sgpr(p4) = COPY $sgpr0_sgpr1
839     %1:sgpr(<8 x s32>) = G_LOAD %0 :: (load (<8 x s32>), align 4, addrspace 4)
840     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %1
846 name: load_constant_v16s32
847 legalized:       true
848 regBankSelected: true
849 tracksRegLiveness: true
851 body: |
852   bb.0:
853     liveins:  $sgpr0_sgpr1
855     ; GFX6-LABEL: name: load_constant_v16s32
856     ; GFX6: liveins: $sgpr0_sgpr1
857     ; GFX6-NEXT: {{  $}}
858     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
859     ; GFX6-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
860     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
861     ;
862     ; GFX7-LABEL: name: load_constant_v16s32
863     ; GFX7: liveins: $sgpr0_sgpr1
864     ; GFX7-NEXT: {{  $}}
865     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
866     ; GFX7-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
867     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
868     ;
869     ; GFX8-LABEL: name: load_constant_v16s32
870     ; GFX8: liveins: $sgpr0_sgpr1
871     ; GFX8-NEXT: {{  $}}
872     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
873     ; GFX8-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
874     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
875     ;
876     ; GFX10-LABEL: name: load_constant_v16s32
877     ; GFX10: liveins: $sgpr0_sgpr1
878     ; GFX10-NEXT: {{  $}}
879     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
880     ; GFX10-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
881     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
882     %0:sgpr(p4) = COPY $sgpr0_sgpr1
883     %1:sgpr(<16 x s32>) = G_LOAD %0 :: (load (<16 x s32>), align 4, addrspace 4)
884     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1
890 name: load_constant_v8s64
891 legalized:       true
892 regBankSelected: true
893 tracksRegLiveness: true
895 body: |
896   bb.0:
897     liveins:  $sgpr0_sgpr1
899     ; GFX6-LABEL: name: load_constant_v8s64
900     ; GFX6: liveins: $sgpr0_sgpr1
901     ; GFX6-NEXT: {{  $}}
902     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
903     ; GFX6-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
904     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
905     ;
906     ; GFX7-LABEL: name: load_constant_v8s64
907     ; GFX7: liveins: $sgpr0_sgpr1
908     ; GFX7-NEXT: {{  $}}
909     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
910     ; GFX7-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
911     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
912     ;
913     ; GFX8-LABEL: name: load_constant_v8s64
914     ; GFX8: liveins: $sgpr0_sgpr1
915     ; GFX8-NEXT: {{  $}}
916     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
917     ; GFX8-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
918     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
919     ;
920     ; GFX10-LABEL: name: load_constant_v8s64
921     ; GFX10: liveins: $sgpr0_sgpr1
922     ; GFX10-NEXT: {{  $}}
923     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
924     ; GFX10-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
925     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
926     %0:sgpr(p4) = COPY $sgpr0_sgpr1
927     %1:sgpr(<8 x s64>) = G_LOAD %0 :: (load (<8 x s64>), align 4, addrspace 4)
928     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1
932 ################################################################################
933 ### Stress addressing modes
934 ################################################################################
938 name: load_constant_s32_from_4_gep_1020
939 legalized:       true
940 regBankSelected: true
941 tracksRegLiveness: true
943 body: |
944   bb.0:
945     liveins:  $sgpr0_sgpr1
947     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1020
948     ; GFX6: liveins: $sgpr0_sgpr1
949     ; GFX6-NEXT: {{  $}}
950     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
951     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0 :: (load (s32), addrspace 4)
952     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
953     ;
954     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1020
955     ; GFX7: liveins: $sgpr0_sgpr1
956     ; GFX7-NEXT: {{  $}}
957     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
958     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0 :: (load (s32), addrspace 4)
959     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
960     ;
961     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1020
962     ; GFX8: liveins: $sgpr0_sgpr1
963     ; GFX8-NEXT: {{  $}}
964     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
965     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0 :: (load (s32), addrspace 4)
966     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
967     ;
968     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1020
969     ; GFX10: liveins: $sgpr0_sgpr1
970     ; GFX10-NEXT: {{  $}}
971     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
972     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0 :: (load (s32), addrspace 4)
973     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
974     %0:sgpr(p4) = COPY $sgpr0_sgpr1
975     %1:sgpr(s64) = G_CONSTANT i64 1020
976     %2:sgpr(p4) = G_PTR_ADD %0, %1
977     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
978     $sgpr0 = COPY %3
984 name: load_constant_s32_from_4_gep_1024
985 legalized:       true
986 regBankSelected: true
987 tracksRegLiveness: true
989 body: |
990   bb.0:
991     liveins:  $sgpr0_sgpr1
993     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1024
994     ; GFX6: liveins: $sgpr0_sgpr1
995     ; GFX6-NEXT: {{  $}}
996     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
997     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1024
998     ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
999     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1000     ;
1001     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1024
1002     ; GFX7: liveins: $sgpr0_sgpr1
1003     ; GFX7-NEXT: {{  $}}
1004     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1005     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 256, 0 :: (load (s32), addrspace 4)
1006     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
1007     ;
1008     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1024
1009     ; GFX8: liveins: $sgpr0_sgpr1
1010     ; GFX8-NEXT: {{  $}}
1011     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1012     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0 :: (load (s32), addrspace 4)
1013     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1014     ;
1015     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1024
1016     ; GFX10: liveins: $sgpr0_sgpr1
1017     ; GFX10-NEXT: {{  $}}
1018     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1019     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0 :: (load (s32), addrspace 4)
1020     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1021     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1022     %1:sgpr(s64) = G_CONSTANT i64 1024
1023     %2:sgpr(p4) = G_PTR_ADD %0, %1
1024     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1025     $sgpr0 = COPY %3
1031 name: load_constant_s32_from_4_gep_1048575
1032 legalized:       true
1033 regBankSelected: true
1034 tracksRegLiveness: true
1036 body: |
1037   bb.0:
1038     liveins:  $sgpr0_sgpr1
1040     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048575
1041     ; GFX6: liveins: $sgpr0_sgpr1
1042     ; GFX6-NEXT: {{  $}}
1043     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1044     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
1045     ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1046     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1047     ;
1048     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048575
1049     ; GFX7: liveins: $sgpr0_sgpr1
1050     ; GFX7-NEXT: {{  $}}
1051     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1052     ; GFX7-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
1053     ; GFX7-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1054     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1055     ;
1056     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048575
1057     ; GFX8: liveins: $sgpr0_sgpr1
1058     ; GFX8-NEXT: {{  $}}
1059     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1060     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1048575, 0 :: (load (s32), addrspace 4)
1061     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1062     ;
1063     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048575
1064     ; GFX10: liveins: $sgpr0_sgpr1
1065     ; GFX10-NEXT: {{  $}}
1066     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1067     ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
1068     ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR_IMM [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load (s32), addrspace 4)
1069     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR_IMM]]
1070     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1071     %1:sgpr(s64) = G_CONSTANT i64 1048575
1072     %2:sgpr(p4) = G_PTR_ADD %0, %1
1073     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1074     $sgpr0 = COPY %3
1080 name: load_constant_s32_from_4_gep_1048576
1081 legalized:       true
1082 regBankSelected: true
1083 tracksRegLiveness: true
1085 body: |
1086   bb.0:
1087     liveins:  $sgpr0_sgpr1
1089     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048576
1090     ; GFX6: liveins: $sgpr0_sgpr1
1091     ; GFX6-NEXT: {{  $}}
1092     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1093     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1094     ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1095     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1096     ;
1097     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048576
1098     ; GFX7: liveins: $sgpr0_sgpr1
1099     ; GFX7-NEXT: {{  $}}
1100     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1101     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 262144, 0 :: (load (s32), addrspace 4)
1102     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
1103     ;
1104     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048576
1105     ; GFX8: liveins: $sgpr0_sgpr1
1106     ; GFX8-NEXT: {{  $}}
1107     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1108     ; GFX8-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1109     ; GFX8-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1110     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1111     ;
1112     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048576
1113     ; GFX10: liveins: $sgpr0_sgpr1
1114     ; GFX10-NEXT: {{  $}}
1115     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1116     ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1117     ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR_IMM [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load (s32), addrspace 4)
1118     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR_IMM]]
1119     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1120     %1:sgpr(s64) = G_CONSTANT i64 1048576
1121     %2:sgpr(p4) = G_PTR_ADD %0, %1
1122     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1123     $sgpr0 = COPY %3
1129 name: load_constant_s32_from_4_gep_1073741823
1130 legalized:       true
1131 regBankSelected: true
1132 tracksRegLiveness: true
1134 body: |
1135   bb.0:
1136     liveins:  $sgpr0_sgpr1
1138     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1073741823
1139     ; GFX6: liveins: $sgpr0_sgpr1
1140     ; GFX6-NEXT: {{  $}}
1141     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1142     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1143     ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1144     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1145     ;
1146     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1073741823
1147     ; GFX7: liveins: $sgpr0_sgpr1
1148     ; GFX7-NEXT: {{  $}}
1149     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1150     ; GFX7-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1151     ; GFX7-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1152     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1153     ;
1154     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1073741823
1155     ; GFX8: liveins: $sgpr0_sgpr1
1156     ; GFX8-NEXT: {{  $}}
1157     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1158     ; GFX8-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1159     ; GFX8-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1160     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1161     ;
1162     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1073741823
1163     ; GFX10: liveins: $sgpr0_sgpr1
1164     ; GFX10-NEXT: {{  $}}
1165     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1166     ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1167     ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR_IMM [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load (s32), addrspace 4)
1168     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR_IMM]]
1169     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1170     %1:sgpr(s64) = G_CONSTANT i64 1073741823
1171     %2:sgpr(p4) = G_PTR_ADD %0, %1
1172     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1173     $sgpr0 = COPY %3
1179 name: load_constant_s32_from_4_gep_negative_1
1180 legalized:       true
1181 regBankSelected: true
1182 tracksRegLiveness: true
1184 body: |
1185   bb.0:
1186     liveins:  $sgpr0_sgpr1
1188     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_1
1189     ; GFX6: liveins: $sgpr0_sgpr1
1190     ; GFX6-NEXT: {{  $}}
1191     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1192     ; GFX6-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -1
1193     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1194     ; GFX6-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1195     ; GFX6-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1196     ; GFX6-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1197     ; GFX6-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1198     ; GFX6-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1199     ; GFX6-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1200     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1201     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1202     ;
1203     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_1
1204     ; GFX7: liveins: $sgpr0_sgpr1
1205     ; GFX7-NEXT: {{  $}}
1206     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1207     ; GFX7-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -1
1208     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1209     ; GFX7-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1210     ; GFX7-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1211     ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1212     ; GFX7-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1213     ; GFX7-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1214     ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1215     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1216     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1217     ;
1218     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_1
1219     ; GFX8: liveins: $sgpr0_sgpr1
1220     ; GFX8-NEXT: {{  $}}
1221     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1222     ; GFX8-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -1
1223     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1224     ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1225     ; GFX8-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1226     ; GFX8-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1227     ; GFX8-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1228     ; GFX8-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1229     ; GFX8-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1230     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1231     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1232     ;
1233     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_1
1234     ; GFX10: liveins: $sgpr0_sgpr1
1235     ; GFX10-NEXT: {{  $}}
1236     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1237     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -1, 0 :: (load (s32), addrspace 4)
1238     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1239     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1240     %1:sgpr(s64) = G_CONSTANT i64 -1
1241     %2:sgpr(p4) = G_PTR_ADD %0, %1
1242     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1243     $sgpr0 = COPY %3
1249 name: load_constant_s32_from_4_gep_negative_524288
1250 legalized:       true
1251 regBankSelected: true
1252 tracksRegLiveness: true
1254 body: |
1255   bb.0:
1256     liveins:  $sgpr0_sgpr1
1258     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1259     ; GFX6: liveins: $sgpr0_sgpr1
1260     ; GFX6-NEXT: {{  $}}
1261     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1262     ; GFX6-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -524288
1263     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1264     ; GFX6-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1265     ; GFX6-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1266     ; GFX6-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1267     ; GFX6-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1268     ; GFX6-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1269     ; GFX6-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1270     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1271     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1272     ;
1273     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1274     ; GFX7: liveins: $sgpr0_sgpr1
1275     ; GFX7-NEXT: {{  $}}
1276     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1277     ; GFX7-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -524288
1278     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1279     ; GFX7-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1280     ; GFX7-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1281     ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1282     ; GFX7-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1283     ; GFX7-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1284     ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1285     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1286     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1287     ;
1288     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1289     ; GFX8: liveins: $sgpr0_sgpr1
1290     ; GFX8-NEXT: {{  $}}
1291     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1292     ; GFX8-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -524288
1293     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1294     ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1295     ; GFX8-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1296     ; GFX8-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1297     ; GFX8-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1298     ; GFX8-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1299     ; GFX8-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1300     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1301     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1302     ;
1303     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1304     ; GFX10: liveins: $sgpr0_sgpr1
1305     ; GFX10-NEXT: {{  $}}
1306     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1307     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -524288, 0 :: (load (s32), addrspace 4)
1308     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1309     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1310     %1:sgpr(s64) = G_CONSTANT i64 -524288
1311     %2:sgpr(p4) = G_PTR_ADD %0, %1
1312     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1313     $sgpr0 = COPY %3