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
9 name: load_constant_s32_from_4
12 tracksRegLiveness: true
19 ; GFX6-LABEL: name: load_constant_s32_from_4
20 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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)
51 name: load_constant_v2s16_from_4
54 tracksRegLiveness: true
61 ; GFX6-LABEL: name: load_constant_v2s16_from_4
62 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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)
93 name: load_constant_v2s32
96 tracksRegLiveness: true
100 liveins: $sgpr0_sgpr1
102 ; GFX6-LABEL: name: load_constant_v2s32
103 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
135 regBankSelected: true
136 tracksRegLiveness: true
140 liveins: $sgpr0_sgpr1
142 ; GFX6-LABEL: name: load_constant_v2s32_align4
143 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
175 regBankSelected: true
176 tracksRegLiveness: true
180 liveins: $sgpr0_sgpr1
182 ; GFX6-LABEL: name: load_constant_v4s16_align4
183 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
216 regBankSelected: true
217 tracksRegLiveness: true
221 liveins: $sgpr0_sgpr1
223 ; GFX6-LABEL: name: load_constant_v4s32_align4
224 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
257 regBankSelected: true
258 tracksRegLiveness: true
262 liveins: $sgpr0_sgpr1
264 ; GFX6-LABEL: name: load_constant_s64
265 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
298 regBankSelected: true
299 tracksRegLiveness: true
303 liveins: $sgpr0_sgpr1
305 ; GFX6-LABEL: name: load_constant_s64_align4
306 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
339 regBankSelected: true
340 tracksRegLiveness: true
344 liveins: $sgpr0_sgpr1
346 ; GFX6-LABEL: name: load_constant_v2s64
347 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
380 regBankSelected: true
381 tracksRegLiveness: true
385 liveins: $sgpr0_sgpr1
387 ; GFX6-LABEL: name: load_constant_v2p1
388 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
421 regBankSelected: true
422 tracksRegLiveness: true
426 liveins: $sgpr0_sgpr1
428 ; GFX6-LABEL: name: load_constant_s128_align4
429 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
462 regBankSelected: true
463 tracksRegLiveness: true
467 liveins: $sgpr0_sgpr1
469 ; GFX6-LABEL: name: load_constant_p3_from_4
470 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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)
501 name: load_constant_p4_from_8
503 regBankSelected: true
504 tracksRegLiveness: true
508 liveins: $sgpr0_sgpr1
510 ; GFX6-LABEL: name: load_constant_p4_from_8
511 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
544 regBankSelected: true
545 tracksRegLiveness: true
549 liveins: $sgpr0_sgpr1
551 ; GFX6-LABEL: name: load_constant_p999_from_8
552 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
585 regBankSelected: true
586 tracksRegLiveness: true
590 liveins: $sgpr0_sgpr1
592 ; GFX6-LABEL: name: load_constant_v2p3
593 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
626 regBankSelected: true
627 tracksRegLiveness: true
631 liveins: $sgpr0_sgpr1
633 ; GFX6-LABEL: name: load_constant_v2s16
634 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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)
665 name: load_constant_v4s16
667 regBankSelected: true
668 tracksRegLiveness: true
672 liveins: $sgpr0_sgpr1
674 ; GFX6-LABEL: name: load_constant_v4s16
675 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
708 regBankSelected: true
709 tracksRegLiveness: true
713 liveins: $sgpr0_sgpr1
715 ; GFX6-LABEL: name: load_constant_v8s16
716 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
749 regBankSelected: true
750 tracksRegLiveness: true
754 liveins: $sgpr0_sgpr1
756 ; GFX6-LABEL: name: load_constant_v8s32
757 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
790 regBankSelected: true
791 tracksRegLiveness: true
795 liveins: $sgpr0_sgpr1
797 ; GFX6-LABEL: name: load_constant_v16s32
798 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
831 regBankSelected: true
832 tracksRegLiveness: true
836 liveins: $sgpr0_sgpr1
838 ; GFX6-LABEL: name: load_constant_v8s64
839 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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
876 regBankSelected: true
877 tracksRegLiveness: true
881 liveins: $sgpr0_sgpr1
883 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1020
884 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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)
917 name: load_constant_s32_from_4_gep_1024
919 regBankSelected: true
920 tracksRegLiveness: true
924 liveins: $sgpr0_sgpr1
926 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1024
927 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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)
961 name: load_constant_s32_from_4_gep_1048575
963 regBankSelected: true
964 tracksRegLiveness: true
968 liveins: $sgpr0_sgpr1
970 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048575
971 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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
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)
1007 name: load_constant_s32_from_4_gep_1048576
1009 regBankSelected: true
1010 tracksRegLiveness: true
1014 liveins: $sgpr0_sgpr1
1016 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048576
1017 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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)
1053 name: load_constant_s32_from_4_gep_1073741823
1055 regBankSelected: true
1056 tracksRegLiveness: true
1060 liveins: $sgpr0_sgpr1
1062 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1073741823
1063 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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)
1100 name: load_constant_s32_from_4_gep_negative_1
1102 regBankSelected: true
1103 tracksRegLiveness: true
1107 liveins: $sgpr0_sgpr1
1109 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_1
1110 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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)
1167 name: load_constant_s32_from_4_gep_negative_524288
1169 regBankSelected: true
1170 tracksRegLiveness: true
1174 liveins: $sgpr0_sgpr1
1176 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1177 ; GFX6: liveins: $sgpr0_sgpr1
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
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
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)