[AMDGPU] Make v8i16/v8f16 legal
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / GlobalISel / inst-select-load-constant.mir
blob2b120b6fd3b67b2f0a065e96143c97c3392a8232
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
7 ---
9 name: load_constant_s32_from_4
10 legalized:       true
11 regBankSelected: true
12 tracksRegLiveness: true
15 body: |
16   bb.0:
17     liveins:  $sgpr0_sgpr1
19     ; GFX6-LABEL: name: load_constant_s32_from_4
20     ; GFX6: liveins: $sgpr0_sgpr1
21     ; GFX6-NEXT: {{  $}}
22     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
23     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
24     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
25     ; GFX7-LABEL: name: load_constant_s32_from_4
26     ; GFX7: liveins: $sgpr0_sgpr1
27     ; GFX7-NEXT: {{  $}}
28     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
29     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
30     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
31     ; GFX8-LABEL: name: load_constant_s32_from_4
32     ; GFX8: liveins: $sgpr0_sgpr1
33     ; GFX8-NEXT: {{  $}}
34     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
35     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
36     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
37     ; GFX10-LABEL: name: load_constant_s32_from_4
38     ; GFX10: liveins: $sgpr0_sgpr1
39     ; GFX10-NEXT: {{  $}}
40     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
41     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
42     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
43     %0:sgpr(p4) = COPY $sgpr0_sgpr1
44     %1:sgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 4)
45     $sgpr0 = COPY %1
47 ...
49 ---
51 name: load_constant_v2s16_from_4
52 legalized:       true
53 regBankSelected: true
54 tracksRegLiveness: true
57 body: |
58   bb.0:
59     liveins:  $sgpr0_sgpr1
61     ; GFX6-LABEL: name: load_constant_v2s16_from_4
62     ; GFX6: liveins: $sgpr0_sgpr1
63     ; GFX6-NEXT: {{  $}}
64     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
65     ; 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)
66     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
67     ; GFX7-LABEL: name: load_constant_v2s16_from_4
68     ; GFX7: liveins: $sgpr0_sgpr1
69     ; GFX7-NEXT: {{  $}}
70     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
71     ; 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)
72     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
73     ; GFX8-LABEL: name: load_constant_v2s16_from_4
74     ; GFX8: liveins: $sgpr0_sgpr1
75     ; GFX8-NEXT: {{  $}}
76     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
77     ; 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)
78     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
79     ; GFX10-LABEL: name: load_constant_v2s16_from_4
80     ; GFX10: liveins: $sgpr0_sgpr1
81     ; GFX10-NEXT: {{  $}}
82     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
83     ; 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)
84     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
85     %0:sgpr(p4) = COPY $sgpr0_sgpr1
86     %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>), align 4, addrspace 4)
87     $sgpr0 = COPY %1
89 ...
92 ---
93 name: load_constant_v2s32
94 legalized:       true
95 regBankSelected: true
96 tracksRegLiveness: true
98 body: |
99   bb.0:
100     liveins:  $sgpr0_sgpr1
102     ; GFX6-LABEL: name: load_constant_v2s32
103     ; GFX6: liveins: $sgpr0_sgpr1
104     ; GFX6-NEXT: {{  $}}
105     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
106     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
107     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
108     ; GFX7-LABEL: name: load_constant_v2s32
109     ; GFX7: liveins: $sgpr0_sgpr1
110     ; GFX7-NEXT: {{  $}}
111     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
112     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
113     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
114     ; GFX8-LABEL: name: load_constant_v2s32
115     ; GFX8: liveins: $sgpr0_sgpr1
116     ; GFX8-NEXT: {{  $}}
117     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
118     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
119     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
120     ; GFX10-LABEL: name: load_constant_v2s32
121     ; GFX10: liveins: $sgpr0_sgpr1
122     ; GFX10-NEXT: {{  $}}
123     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
124     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
125     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
126     %0:sgpr(p4) = COPY $sgpr0_sgpr1
127     %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>), align 8, addrspace 4)
128     $sgpr0_sgpr1 = COPY %1
133 name: load_constant_v2s32_align4
134 legalized:       true
135 regBankSelected: true
136 tracksRegLiveness: true
138 body: |
139   bb.0:
140     liveins:  $sgpr0_sgpr1
142     ; GFX6-LABEL: name: load_constant_v2s32_align4
143     ; GFX6: liveins: $sgpr0_sgpr1
144     ; GFX6-NEXT: {{  $}}
145     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
146     ; 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)
147     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
148     ; GFX7-LABEL: name: load_constant_v2s32_align4
149     ; GFX7: liveins: $sgpr0_sgpr1
150     ; GFX7-NEXT: {{  $}}
151     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
152     ; 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)
153     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
154     ; GFX8-LABEL: name: load_constant_v2s32_align4
155     ; GFX8: liveins: $sgpr0_sgpr1
156     ; GFX8-NEXT: {{  $}}
157     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
158     ; 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)
159     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
160     ; GFX10-LABEL: name: load_constant_v2s32_align4
161     ; GFX10: liveins: $sgpr0_sgpr1
162     ; GFX10-NEXT: {{  $}}
163     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
164     ; 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)
165     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
166     %0:sgpr(p4) = COPY $sgpr0_sgpr1
167     %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>), align 4, addrspace 4)
168     $sgpr0_sgpr1 = COPY %1
173 name: load_constant_v4s16_align4
174 legalized:       true
175 regBankSelected: true
176 tracksRegLiveness: true
178 body: |
179   bb.0:
180     liveins:  $sgpr0_sgpr1
182     ; GFX6-LABEL: name: load_constant_v4s16_align4
183     ; GFX6: liveins: $sgpr0_sgpr1
184     ; GFX6-NEXT: {{  $}}
185     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
186     ; 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)
187     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
188     ; GFX7-LABEL: name: load_constant_v4s16_align4
189     ; GFX7: liveins: $sgpr0_sgpr1
190     ; GFX7-NEXT: {{  $}}
191     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
192     ; 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)
193     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
194     ; GFX8-LABEL: name: load_constant_v4s16_align4
195     ; GFX8: liveins: $sgpr0_sgpr1
196     ; GFX8-NEXT: {{  $}}
197     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
198     ; 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)
199     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
200     ; GFX10-LABEL: name: load_constant_v4s16_align4
201     ; GFX10: liveins: $sgpr0_sgpr1
202     ; GFX10-NEXT: {{  $}}
203     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
204     ; 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)
205     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
206     %0:sgpr(p4) = COPY $sgpr0_sgpr1
207     %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load (<4 x s16>), align 4, addrspace 4)
208     $sgpr0_sgpr1 = COPY %1
214 name: load_constant_v4s32_align4
215 legalized:       true
216 regBankSelected: true
217 tracksRegLiveness: true
219 body: |
220   bb.0:
221     liveins:  $sgpr0_sgpr1
223     ; GFX6-LABEL: name: load_constant_v4s32_align4
224     ; GFX6: liveins: $sgpr0_sgpr1
225     ; GFX6-NEXT: {{  $}}
226     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
227     ; 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)
228     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
229     ; GFX7-LABEL: name: load_constant_v4s32_align4
230     ; GFX7: liveins: $sgpr0_sgpr1
231     ; GFX7-NEXT: {{  $}}
232     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
233     ; 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)
234     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
235     ; GFX8-LABEL: name: load_constant_v4s32_align4
236     ; GFX8: liveins: $sgpr0_sgpr1
237     ; GFX8-NEXT: {{  $}}
238     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
239     ; 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)
240     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
241     ; GFX10-LABEL: name: load_constant_v4s32_align4
242     ; GFX10: liveins: $sgpr0_sgpr1
243     ; GFX10-NEXT: {{  $}}
244     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
245     ; 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)
246     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
247     %0:sgpr(p4) = COPY $sgpr0_sgpr1
248     %1:sgpr(<4 x  s32>) = G_LOAD %0 :: (load (<4 x s32>), align 4, addrspace 4)
249     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
255 name: load_constant_s64
256 legalized:       true
257 regBankSelected: true
258 tracksRegLiveness: true
260 body: |
261   bb.0:
262     liveins:  $sgpr0_sgpr1
264     ; GFX6-LABEL: name: load_constant_s64
265     ; GFX6: liveins: $sgpr0_sgpr1
266     ; GFX6-NEXT: {{  $}}
267     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
268     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
269     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
270     ; GFX7-LABEL: name: load_constant_s64
271     ; GFX7: liveins: $sgpr0_sgpr1
272     ; GFX7-NEXT: {{  $}}
273     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
274     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
275     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
276     ; GFX8-LABEL: name: load_constant_s64
277     ; GFX8: liveins: $sgpr0_sgpr1
278     ; GFX8-NEXT: {{  $}}
279     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
280     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
281     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
282     ; GFX10-LABEL: name: load_constant_s64
283     ; GFX10: liveins: $sgpr0_sgpr1
284     ; GFX10-NEXT: {{  $}}
285     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
286     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
287     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
288     %0:sgpr(p4) = COPY $sgpr0_sgpr1
289     %1:sgpr(s64) = G_LOAD %0 :: (load (s64), align 8, addrspace 4)
290     $sgpr0_sgpr1 = COPY %1
296 name: load_constant_s64_align4
297 legalized:       true
298 regBankSelected: true
299 tracksRegLiveness: true
301 body: |
302   bb.0:
303     liveins:  $sgpr0_sgpr1
305     ; GFX6-LABEL: name: load_constant_s64_align4
306     ; GFX6: liveins: $sgpr0_sgpr1
307     ; GFX6-NEXT: {{  $}}
308     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
309     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
310     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
311     ; GFX7-LABEL: name: load_constant_s64_align4
312     ; GFX7: liveins: $sgpr0_sgpr1
313     ; GFX7-NEXT: {{  $}}
314     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
315     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
316     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
317     ; GFX8-LABEL: name: load_constant_s64_align4
318     ; GFX8: liveins: $sgpr0_sgpr1
319     ; GFX8-NEXT: {{  $}}
320     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
321     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
322     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
323     ; GFX10-LABEL: name: load_constant_s64_align4
324     ; GFX10: liveins: $sgpr0_sgpr1
325     ; GFX10-NEXT: {{  $}}
326     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
327     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
328     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
329     %0:sgpr(p4) = COPY $sgpr0_sgpr1
330     %1:sgpr(s64) = G_LOAD %0 :: (load (s64), align 4, addrspace 4)
331     $sgpr0_sgpr1 = COPY %1
337 name: load_constant_v2s64
338 legalized:       true
339 regBankSelected: true
340 tracksRegLiveness: true
342 body: |
343   bb.0:
344     liveins:  $sgpr0_sgpr1
346     ; GFX6-LABEL: name: load_constant_v2s64
347     ; GFX6: liveins: $sgpr0_sgpr1
348     ; GFX6-NEXT: {{  $}}
349     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
350     ; 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)
351     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
352     ; GFX7-LABEL: name: load_constant_v2s64
353     ; GFX7: liveins: $sgpr0_sgpr1
354     ; GFX7-NEXT: {{  $}}
355     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
356     ; 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)
357     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
358     ; GFX8-LABEL: name: load_constant_v2s64
359     ; GFX8: liveins: $sgpr0_sgpr1
360     ; GFX8-NEXT: {{  $}}
361     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
362     ; 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)
363     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
364     ; GFX10-LABEL: name: load_constant_v2s64
365     ; GFX10: liveins: $sgpr0_sgpr1
366     ; GFX10-NEXT: {{  $}}
367     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
368     ; 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)
369     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
370     %0:sgpr(p4) = COPY $sgpr0_sgpr1
371     %1:sgpr(<2 x s64>) = G_LOAD %0 :: (load (<2 x s64>), align 4, addrspace 4)
372     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
378 name: load_constant_v2p1
379 legalized:       true
380 regBankSelected: true
381 tracksRegLiveness: true
383 body: |
384   bb.0:
385     liveins:  $sgpr0_sgpr1
387     ; GFX6-LABEL: name: load_constant_v2p1
388     ; GFX6: liveins: $sgpr0_sgpr1
389     ; GFX6-NEXT: {{  $}}
390     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
391     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
392     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
393     ; GFX7-LABEL: name: load_constant_v2p1
394     ; GFX7: liveins: $sgpr0_sgpr1
395     ; GFX7-NEXT: {{  $}}
396     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
397     ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
398     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
399     ; GFX8-LABEL: name: load_constant_v2p1
400     ; GFX8: liveins: $sgpr0_sgpr1
401     ; GFX8-NEXT: {{  $}}
402     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
403     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
404     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
405     ; GFX10-LABEL: name: load_constant_v2p1
406     ; GFX10: liveins: $sgpr0_sgpr1
407     ; GFX10-NEXT: {{  $}}
408     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
409     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
410     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
411     %0:sgpr(p4) = COPY $sgpr0_sgpr1
412     %1:sgpr(<2 x p1>) = G_LOAD %0 :: (load (<2 x p1>), align 4, addrspace 4)
413     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
419 name: load_constant_s128_align4
420 legalized:       true
421 regBankSelected: true
422 tracksRegLiveness: true
424 body: |
425   bb.0:
426     liveins:  $sgpr0_sgpr1
428     ; GFX6-LABEL: name: load_constant_s128_align4
429     ; GFX6: liveins: $sgpr0_sgpr1
430     ; GFX6-NEXT: {{  $}}
431     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
432     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
433     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
434     ; GFX7-LABEL: name: load_constant_s128_align4
435     ; GFX7: liveins: $sgpr0_sgpr1
436     ; GFX7-NEXT: {{  $}}
437     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
438     ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
439     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
440     ; GFX8-LABEL: name: load_constant_s128_align4
441     ; GFX8: liveins: $sgpr0_sgpr1
442     ; GFX8-NEXT: {{  $}}
443     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
444     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
445     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
446     ; GFX10-LABEL: name: load_constant_s128_align4
447     ; GFX10: liveins: $sgpr0_sgpr1
448     ; GFX10-NEXT: {{  $}}
449     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
450     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
451     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
452     %0:sgpr(p4) = COPY $sgpr0_sgpr1
453     %1:sgpr(s128) = G_LOAD %0 :: (load (s128), align 4, addrspace 4)
454     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
460 name: load_constant_p3_from_4
461 legalized:       true
462 regBankSelected: true
463 tracksRegLiveness: true
465 body: |
466   bb.0:
467     liveins:  $sgpr0_sgpr1
469     ; GFX6-LABEL: name: load_constant_p3_from_4
470     ; GFX6: liveins: $sgpr0_sgpr1
471     ; GFX6-NEXT: {{  $}}
472     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
473     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
474     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
475     ; GFX7-LABEL: name: load_constant_p3_from_4
476     ; GFX7: liveins: $sgpr0_sgpr1
477     ; GFX7-NEXT: {{  $}}
478     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
479     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
480     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
481     ; GFX8-LABEL: name: load_constant_p3_from_4
482     ; GFX8: liveins: $sgpr0_sgpr1
483     ; GFX8-NEXT: {{  $}}
484     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
485     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
486     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
487     ; GFX10-LABEL: name: load_constant_p3_from_4
488     ; GFX10: liveins: $sgpr0_sgpr1
489     ; GFX10-NEXT: {{  $}}
490     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
491     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
492     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
493     %0:sgpr(p4) = COPY $sgpr0_sgpr1
494     %1:sgpr(p3) = G_LOAD %0 :: (load (p3), align 4, addrspace 4)
495     $sgpr0 = COPY %1
501 name: load_constant_p4_from_8
502 legalized:       true
503 regBankSelected: true
504 tracksRegLiveness: true
506 body: |
507   bb.0:
508     liveins:  $sgpr0_sgpr1
510     ; GFX6-LABEL: name: load_constant_p4_from_8
511     ; GFX6: liveins: $sgpr0_sgpr1
512     ; GFX6-NEXT: {{  $}}
513     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
514     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
515     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
516     ; GFX7-LABEL: name: load_constant_p4_from_8
517     ; GFX7: liveins: $sgpr0_sgpr1
518     ; GFX7-NEXT: {{  $}}
519     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
520     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
521     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
522     ; GFX8-LABEL: name: load_constant_p4_from_8
523     ; GFX8: liveins: $sgpr0_sgpr1
524     ; GFX8-NEXT: {{  $}}
525     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
526     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
527     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
528     ; GFX10-LABEL: name: load_constant_p4_from_8
529     ; GFX10: liveins: $sgpr0_sgpr1
530     ; GFX10-NEXT: {{  $}}
531     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
532     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
533     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
534     %0:sgpr(p4) = COPY $sgpr0_sgpr1
535     %1:sgpr(p4) = G_LOAD %0 :: (load (p4), align 8, addrspace 4)
536     $sgpr0_sgpr1 = COPY %1
542 name: load_constant_p999_from_8
543 legalized:       true
544 regBankSelected: true
545 tracksRegLiveness: true
547 body: |
548   bb.0:
549     liveins:  $sgpr0_sgpr1
551     ; GFX6-LABEL: name: load_constant_p999_from_8
552     ; GFX6: liveins: $sgpr0_sgpr1
553     ; GFX6-NEXT: {{  $}}
554     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
555     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
556     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
557     ; GFX7-LABEL: name: load_constant_p999_from_8
558     ; GFX7: liveins: $sgpr0_sgpr1
559     ; GFX7-NEXT: {{  $}}
560     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
561     ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
562     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
563     ; GFX8-LABEL: name: load_constant_p999_from_8
564     ; GFX8: liveins: $sgpr0_sgpr1
565     ; GFX8-NEXT: {{  $}}
566     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
567     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
568     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
569     ; GFX10-LABEL: name: load_constant_p999_from_8
570     ; GFX10: liveins: $sgpr0_sgpr1
571     ; GFX10-NEXT: {{  $}}
572     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
573     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
574     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
575     %0:sgpr(p4) = COPY $sgpr0_sgpr1
576     %1:sgpr(p999) = G_LOAD %0 :: (load (p999), align 8, addrspace 4)
577     $sgpr0_sgpr1 = COPY %1
583 name: load_constant_v2p3
584 legalized:       true
585 regBankSelected: true
586 tracksRegLiveness: true
588 body: |
589   bb.0:
590     liveins:  $sgpr0_sgpr1
592     ; GFX6-LABEL: name: load_constant_v2p3
593     ; GFX6: liveins: $sgpr0_sgpr1
594     ; GFX6-NEXT: {{  $}}
595     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
596     ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
597     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
598     ; GFX7-LABEL: name: load_constant_v2p3
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(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
603     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
604     ; GFX8-LABEL: name: load_constant_v2p3
605     ; GFX8: liveins: $sgpr0_sgpr1
606     ; GFX8-NEXT: {{  $}}
607     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
608     ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
609     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
610     ; GFX10-LABEL: name: load_constant_v2p3
611     ; GFX10: liveins: $sgpr0_sgpr1
612     ; GFX10-NEXT: {{  $}}
613     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
614     ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
615     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
616     %0:sgpr(p4) = COPY $sgpr0_sgpr1
617     %1:sgpr(<2 x p3>) = G_LOAD %0 :: (load (<2 x p3>), align 8, addrspace 4)
618     $sgpr0_sgpr1 = COPY %1
624 name: load_constant_v2s16
625 legalized:       true
626 regBankSelected: true
627 tracksRegLiveness: true
629 body: |
630   bb.0:
631     liveins:  $sgpr0_sgpr1
633     ; GFX6-LABEL: name: load_constant_v2s16
634     ; GFX6: liveins: $sgpr0_sgpr1
635     ; GFX6-NEXT: {{  $}}
636     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
637     ; 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)
638     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
639     ; GFX7-LABEL: name: load_constant_v2s16
640     ; GFX7: liveins: $sgpr0_sgpr1
641     ; GFX7-NEXT: {{  $}}
642     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
643     ; 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)
644     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
645     ; GFX8-LABEL: name: load_constant_v2s16
646     ; GFX8: liveins: $sgpr0_sgpr1
647     ; GFX8-NEXT: {{  $}}
648     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
649     ; 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)
650     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
651     ; GFX10-LABEL: name: load_constant_v2s16
652     ; GFX10: liveins: $sgpr0_sgpr1
653     ; GFX10-NEXT: {{  $}}
654     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
655     ; 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)
656     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
657     %0:sgpr(p4) = COPY $sgpr0_sgpr1
658     %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>), align 4, addrspace 4)
659     $sgpr0 = COPY %1
665 name: load_constant_v4s16
666 legalized:       true
667 regBankSelected: true
668 tracksRegLiveness: true
670 body: |
671   bb.0:
672     liveins:  $sgpr0_sgpr1
674     ; GFX6-LABEL: name: load_constant_v4s16
675     ; GFX6: liveins: $sgpr0_sgpr1
676     ; GFX6-NEXT: {{  $}}
677     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
678     ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
679     ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
680     ; GFX7-LABEL: name: load_constant_v4s16
681     ; GFX7: liveins: $sgpr0_sgpr1
682     ; GFX7-NEXT: {{  $}}
683     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
684     ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
685     ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
686     ; GFX8-LABEL: name: load_constant_v4s16
687     ; GFX8: liveins: $sgpr0_sgpr1
688     ; GFX8-NEXT: {{  $}}
689     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
690     ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
691     ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
692     ; GFX10-LABEL: name: load_constant_v4s16
693     ; GFX10: liveins: $sgpr0_sgpr1
694     ; GFX10-NEXT: {{  $}}
695     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
696     ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
697     ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
698     %0:sgpr(p4) = COPY $sgpr0_sgpr1
699     %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load (<4 x s16>), align 8, addrspace 4)
700     $sgpr0_sgpr1 = COPY %1
706 name: load_constant_v8s16
707 legalized:       true
708 regBankSelected: true
709 tracksRegLiveness: true
711 body: |
712   bb.0:
713     liveins:  $sgpr0_sgpr1
715     ; GFX6-LABEL: name: load_constant_v8s16
716     ; GFX6: liveins: $sgpr0_sgpr1
717     ; GFX6-NEXT: {{  $}}
718     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
719     ; 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)
720     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
721     ; GFX7-LABEL: name: load_constant_v8s16
722     ; GFX7: liveins: $sgpr0_sgpr1
723     ; GFX7-NEXT: {{  $}}
724     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
725     ; 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)
726     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
727     ; GFX8-LABEL: name: load_constant_v8s16
728     ; GFX8: liveins: $sgpr0_sgpr1
729     ; GFX8-NEXT: {{  $}}
730     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
731     ; 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)
732     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
733     ; GFX10-LABEL: name: load_constant_v8s16
734     ; GFX10: liveins: $sgpr0_sgpr1
735     ; GFX10-NEXT: {{  $}}
736     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
737     ; 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)
738     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
739     %0:sgpr(p4) = COPY $sgpr0_sgpr1
740     %1:sgpr(<8 x s16>) = G_LOAD %0 :: (load (<8 x s16>), align 4, addrspace 4)
741     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
747 name: load_constant_v8s32
748 legalized:       true
749 regBankSelected: true
750 tracksRegLiveness: true
752 body: |
753   bb.0:
754     liveins:  $sgpr0_sgpr1
756     ; GFX6-LABEL: name: load_constant_v8s32
757     ; GFX6: liveins: $sgpr0_sgpr1
758     ; GFX6-NEXT: {{  $}}
759     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
760     ; 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)
761     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
762     ; GFX7-LABEL: name: load_constant_v8s32
763     ; GFX7: liveins: $sgpr0_sgpr1
764     ; GFX7-NEXT: {{  $}}
765     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
766     ; 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)
767     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
768     ; GFX8-LABEL: name: load_constant_v8s32
769     ; GFX8: liveins: $sgpr0_sgpr1
770     ; GFX8-NEXT: {{  $}}
771     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
772     ; 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)
773     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
774     ; GFX10-LABEL: name: load_constant_v8s32
775     ; GFX10: liveins: $sgpr0_sgpr1
776     ; GFX10-NEXT: {{  $}}
777     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
778     ; 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)
779     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
780     %0:sgpr(p4) = COPY $sgpr0_sgpr1
781     %1:sgpr(<8 x s32>) = G_LOAD %0 :: (load (<8 x s32>), align 4, addrspace 4)
782     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %1
788 name: load_constant_v16s32
789 legalized:       true
790 regBankSelected: true
791 tracksRegLiveness: true
793 body: |
794   bb.0:
795     liveins:  $sgpr0_sgpr1
797     ; GFX6-LABEL: name: load_constant_v16s32
798     ; GFX6: liveins: $sgpr0_sgpr1
799     ; GFX6-NEXT: {{  $}}
800     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
801     ; 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)
802     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
803     ; GFX7-LABEL: name: load_constant_v16s32
804     ; GFX7: liveins: $sgpr0_sgpr1
805     ; GFX7-NEXT: {{  $}}
806     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
807     ; 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)
808     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
809     ; GFX8-LABEL: name: load_constant_v16s32
810     ; GFX8: liveins: $sgpr0_sgpr1
811     ; GFX8-NEXT: {{  $}}
812     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
813     ; 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)
814     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
815     ; GFX10-LABEL: name: load_constant_v16s32
816     ; GFX10: liveins: $sgpr0_sgpr1
817     ; GFX10-NEXT: {{  $}}
818     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
819     ; 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)
820     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
821     %0:sgpr(p4) = COPY $sgpr0_sgpr1
822     %1:sgpr(<16 x s32>) = G_LOAD %0 :: (load (<16 x s32>), align 4, addrspace 4)
823     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1
829 name: load_constant_v8s64
830 legalized:       true
831 regBankSelected: true
832 tracksRegLiveness: true
834 body: |
835   bb.0:
836     liveins:  $sgpr0_sgpr1
838     ; GFX6-LABEL: name: load_constant_v8s64
839     ; GFX6: liveins: $sgpr0_sgpr1
840     ; GFX6-NEXT: {{  $}}
841     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
842     ; 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)
843     ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
844     ; GFX7-LABEL: name: load_constant_v8s64
845     ; GFX7: liveins: $sgpr0_sgpr1
846     ; GFX7-NEXT: {{  $}}
847     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
848     ; 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)
849     ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
850     ; GFX8-LABEL: name: load_constant_v8s64
851     ; GFX8: liveins: $sgpr0_sgpr1
852     ; GFX8-NEXT: {{  $}}
853     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
854     ; 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)
855     ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
856     ; GFX10-LABEL: name: load_constant_v8s64
857     ; GFX10: liveins: $sgpr0_sgpr1
858     ; GFX10-NEXT: {{  $}}
859     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
860     ; 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)
861     ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
862     %0:sgpr(p4) = COPY $sgpr0_sgpr1
863     %1:sgpr(<8 x s64>) = G_LOAD %0 :: (load (<8 x s64>), align 4, addrspace 4)
864     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1
868 ################################################################################
869 ### Stress addressing modes
870 ################################################################################
874 name: load_constant_s32_from_4_gep_1020
875 legalized:       true
876 regBankSelected: true
877 tracksRegLiveness: true
879 body: |
880   bb.0:
881     liveins:  $sgpr0_sgpr1
883     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1020
884     ; GFX6: liveins: $sgpr0_sgpr1
885     ; GFX6-NEXT: {{  $}}
886     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
887     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0 :: (load (s32), addrspace 4)
888     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
889     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1020
890     ; GFX7: liveins: $sgpr0_sgpr1
891     ; GFX7-NEXT: {{  $}}
892     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
893     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0 :: (load (s32), addrspace 4)
894     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
895     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1020
896     ; GFX8: liveins: $sgpr0_sgpr1
897     ; GFX8-NEXT: {{  $}}
898     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
899     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0 :: (load (s32), addrspace 4)
900     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
901     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1020
902     ; GFX10: liveins: $sgpr0_sgpr1
903     ; GFX10-NEXT: {{  $}}
904     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
905     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0 :: (load (s32), addrspace 4)
906     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
907     %0:sgpr(p4) = COPY $sgpr0_sgpr1
908     %1:sgpr(s64) = G_CONSTANT i64 1020
909     %2:sgpr(p4) = G_PTR_ADD %0, %1
910     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
911     $sgpr0 = COPY %3
917 name: load_constant_s32_from_4_gep_1024
918 legalized:       true
919 regBankSelected: true
920 tracksRegLiveness: true
922 body: |
923   bb.0:
924     liveins:  $sgpr0_sgpr1
926     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1024
927     ; GFX6: liveins: $sgpr0_sgpr1
928     ; GFX6-NEXT: {{  $}}
929     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
930     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1024
931     ; 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)
932     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
933     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1024
934     ; GFX7: liveins: $sgpr0_sgpr1
935     ; GFX7-NEXT: {{  $}}
936     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
937     ; 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)
938     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
939     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1024
940     ; GFX8: liveins: $sgpr0_sgpr1
941     ; GFX8-NEXT: {{  $}}
942     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
943     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0 :: (load (s32), addrspace 4)
944     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
945     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1024
946     ; GFX10: liveins: $sgpr0_sgpr1
947     ; GFX10-NEXT: {{  $}}
948     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
949     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0 :: (load (s32), addrspace 4)
950     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
951     %0:sgpr(p4) = COPY $sgpr0_sgpr1
952     %1:sgpr(s64) = G_CONSTANT i64 1024
953     %2:sgpr(p4) = G_PTR_ADD %0, %1
954     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
955     $sgpr0 = COPY %3
961 name: load_constant_s32_from_4_gep_1048575
962 legalized:       true
963 regBankSelected: true
964 tracksRegLiveness: true
966 body: |
967   bb.0:
968     liveins:  $sgpr0_sgpr1
970     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048575
971     ; GFX6: liveins: $sgpr0_sgpr1
972     ; GFX6-NEXT: {{  $}}
973     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
974     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
975     ; 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)
976     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
977     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048575
978     ; GFX7: liveins: $sgpr0_sgpr1
979     ; GFX7-NEXT: {{  $}}
980     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
981     ; GFX7-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
982     ; 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)
983     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
984     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048575
985     ; GFX8: liveins: $sgpr0_sgpr1
986     ; GFX8-NEXT: {{  $}}
987     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
988     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1048575, 0 :: (load (s32), addrspace 4)
989     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
990     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048575
991     ; GFX10: liveins: $sgpr0_sgpr1
992     ; GFX10-NEXT: {{  $}}
993     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
994     ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
995     ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
996     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
997     %0:sgpr(p4) = COPY $sgpr0_sgpr1
998     %1:sgpr(s64) = G_CONSTANT i64 1048575
999     %2:sgpr(p4) = G_PTR_ADD %0, %1
1000     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1001     $sgpr0 = COPY %3
1007 name: load_constant_s32_from_4_gep_1048576
1008 legalized:       true
1009 regBankSelected: true
1010 tracksRegLiveness: true
1012 body: |
1013   bb.0:
1014     liveins:  $sgpr0_sgpr1
1016     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048576
1017     ; GFX6: liveins: $sgpr0_sgpr1
1018     ; GFX6-NEXT: {{  $}}
1019     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1020     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1021     ; 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)
1022     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1023     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048576
1024     ; GFX7: liveins: $sgpr0_sgpr1
1025     ; GFX7-NEXT: {{  $}}
1026     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1027     ; 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)
1028     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
1029     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048576
1030     ; GFX8: liveins: $sgpr0_sgpr1
1031     ; GFX8-NEXT: {{  $}}
1032     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1033     ; GFX8-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1034     ; 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)
1035     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1036     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048576
1037     ; GFX10: liveins: $sgpr0_sgpr1
1038     ; GFX10-NEXT: {{  $}}
1039     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1040     ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1041     ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1042     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1043     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1044     %1:sgpr(s64) = G_CONSTANT i64 1048576
1045     %2:sgpr(p4) = G_PTR_ADD %0, %1
1046     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1047     $sgpr0 = COPY %3
1053 name: load_constant_s32_from_4_gep_1073741823
1054 legalized:       true
1055 regBankSelected: true
1056 tracksRegLiveness: true
1058 body: |
1059   bb.0:
1060     liveins:  $sgpr0_sgpr1
1062     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1073741823
1063     ; GFX6: liveins: $sgpr0_sgpr1
1064     ; GFX6-NEXT: {{  $}}
1065     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1066     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1067     ; 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)
1068     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1069     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1073741823
1070     ; GFX7: liveins: $sgpr0_sgpr1
1071     ; GFX7-NEXT: {{  $}}
1072     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1073     ; GFX7-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1074     ; 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)
1075     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1076     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1073741823
1077     ; GFX8: liveins: $sgpr0_sgpr1
1078     ; GFX8-NEXT: {{  $}}
1079     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1080     ; GFX8-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1081     ; 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)
1082     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1083     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1073741823
1084     ; GFX10: liveins: $sgpr0_sgpr1
1085     ; GFX10-NEXT: {{  $}}
1086     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1087     ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1088     ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1089     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1090     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1091     %1:sgpr(s64) = G_CONSTANT i64 1073741823
1092     %2:sgpr(p4) = G_PTR_ADD %0, %1
1093     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1094     $sgpr0 = COPY %3
1100 name: load_constant_s32_from_4_gep_negative_1
1101 legalized:       true
1102 regBankSelected: true
1103 tracksRegLiveness: true
1105 body: |
1106   bb.0:
1107     liveins:  $sgpr0_sgpr1
1109     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_1
1110     ; GFX6: liveins: $sgpr0_sgpr1
1111     ; GFX6-NEXT: {{  $}}
1112     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1113     ; GFX6-NEXT: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 -1
1114     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1115     ; GFX6-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub0
1116     ; GFX6-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1117     ; GFX6-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub1
1118     ; GFX6-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1119     ; GFX6-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc
1120     ; GFX6-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1121     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1122     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1123     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_1
1124     ; GFX7: liveins: $sgpr0_sgpr1
1125     ; GFX7-NEXT: {{  $}}
1126     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1127     ; GFX7-NEXT: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 -1
1128     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1129     ; GFX7-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub0
1130     ; GFX7-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1131     ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub1
1132     ; GFX7-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1133     ; GFX7-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc
1134     ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1135     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1136     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1137     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_1
1138     ; GFX8: liveins: $sgpr0_sgpr1
1139     ; GFX8-NEXT: {{  $}}
1140     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1141     ; GFX8-NEXT: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 -1
1142     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1143     ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub0
1144     ; GFX8-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1145     ; GFX8-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub1
1146     ; GFX8-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1147     ; GFX8-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc
1148     ; GFX8-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1149     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1150     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1151     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_1
1152     ; GFX10: liveins: $sgpr0_sgpr1
1153     ; GFX10-NEXT: {{  $}}
1154     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1155     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -1, 0 :: (load (s32), addrspace 4)
1156     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1157     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1158     %1:sgpr(s64) = G_CONSTANT i64 -1
1159     %2:sgpr(p4) = G_PTR_ADD %0, %1
1160     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1161     $sgpr0 = COPY %3
1167 name: load_constant_s32_from_4_gep_negative_524288
1168 legalized:       true
1169 regBankSelected: true
1170 tracksRegLiveness: true
1172 body: |
1173   bb.0:
1174     liveins:  $sgpr0_sgpr1
1176     ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1177     ; GFX6: liveins: $sgpr0_sgpr1
1178     ; GFX6-NEXT: {{  $}}
1179     ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1180     ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4294443008
1181     ; GFX6-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
1182     ; GFX6-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[S_MOV_B32_]], %subreg.sub0, [[S_MOV_B32_1]], %subreg.sub1
1183     ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1184     ; GFX6-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub0
1185     ; GFX6-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1186     ; GFX6-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub1
1187     ; GFX6-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1188     ; GFX6-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc
1189     ; GFX6-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1190     ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE1]], 0, 0 :: (load (s32), addrspace 4)
1191     ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1192     ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1193     ; GFX7: liveins: $sgpr0_sgpr1
1194     ; GFX7-NEXT: {{  $}}
1195     ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1196     ; GFX7-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4294443008
1197     ; GFX7-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
1198     ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[S_MOV_B32_]], %subreg.sub0, [[S_MOV_B32_1]], %subreg.sub1
1199     ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1200     ; GFX7-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub0
1201     ; GFX7-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1202     ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub1
1203     ; GFX7-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1204     ; GFX7-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc
1205     ; GFX7-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1206     ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE1]], 0, 0 :: (load (s32), addrspace 4)
1207     ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1208     ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1209     ; GFX8: liveins: $sgpr0_sgpr1
1210     ; GFX8-NEXT: {{  $}}
1211     ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1212     ; GFX8-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4294443008
1213     ; GFX8-NEXT: [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 -1
1214     ; GFX8-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[S_MOV_B32_]], %subreg.sub0, [[S_MOV_B32_1]], %subreg.sub1
1215     ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1216     ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub0
1217     ; GFX8-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1218     ; GFX8-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub1
1219     ; GFX8-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1220     ; GFX8-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc
1221     ; GFX8-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1222     ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE1]], 0, 0 :: (load (s32), addrspace 4)
1223     ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1224     ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1225     ; GFX10: liveins: $sgpr0_sgpr1
1226     ; GFX10-NEXT: {{  $}}
1227     ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1228     ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -524288, 0 :: (load (s32), addrspace 4)
1229     ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1230     %0:sgpr(p4) = COPY $sgpr0_sgpr1
1231     %1:sgpr(s64) = G_CONSTANT i64 -524288
1232     %2:sgpr(p4) = G_PTR_ADD %0, %1
1233     %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1234     $sgpr0 = COPY %3