1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s
3 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
4 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX8 %s
5 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX10 %s
6 # RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX10 %s
10 name: load_constant_s32_from_4
13 tracksRegLiveness: true
20 ; GFX6-LABEL: name: load_constant_s32_from_4
21 ; GFX6: liveins: $sgpr0_sgpr1
23 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
24 ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
25 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
27 ; GFX7-LABEL: name: load_constant_s32_from_4
28 ; GFX7: liveins: $sgpr0_sgpr1
30 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
31 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
32 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
34 ; GFX8-LABEL: name: load_constant_s32_from_4
35 ; GFX8: liveins: $sgpr0_sgpr1
37 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
38 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
39 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
41 ; GFX10-LABEL: name: load_constant_s32_from_4
42 ; GFX10: liveins: $sgpr0_sgpr1
44 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
45 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (s32), addrspace 4)
46 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
47 %0:sgpr(p4) = COPY $sgpr0_sgpr1
48 %1:sgpr(s32) = G_LOAD %0 :: (load (s32), align 4, addrspace 4)
55 name: load_constant_v2s16_from_4
58 tracksRegLiveness: true
65 ; GFX6-LABEL: name: load_constant_v2s16_from_4
66 ; GFX6: liveins: $sgpr0_sgpr1
68 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
69 ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
70 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
72 ; GFX7-LABEL: name: load_constant_v2s16_from_4
73 ; GFX7: liveins: $sgpr0_sgpr1
75 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
76 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
77 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
79 ; GFX8-LABEL: name: load_constant_v2s16_from_4
80 ; GFX8: liveins: $sgpr0_sgpr1
82 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
83 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
84 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
86 ; GFX10-LABEL: name: load_constant_v2s16_from_4
87 ; GFX10: liveins: $sgpr0_sgpr1
89 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
90 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
91 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
92 %0:sgpr(p4) = COPY $sgpr0_sgpr1
93 %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>), align 4, addrspace 4)
100 name: load_constant_v2s32
102 regBankSelected: true
103 tracksRegLiveness: true
107 liveins: $sgpr0_sgpr1
109 ; GFX6-LABEL: name: load_constant_v2s32
110 ; GFX6: liveins: $sgpr0_sgpr1
112 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
113 ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
114 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
116 ; GFX7-LABEL: name: load_constant_v2s32
117 ; GFX7: liveins: $sgpr0_sgpr1
119 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
120 ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
121 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
123 ; GFX8-LABEL: name: load_constant_v2s32
124 ; GFX8: liveins: $sgpr0_sgpr1
126 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
127 ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
128 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
130 ; GFX10-LABEL: name: load_constant_v2s32
131 ; GFX10: liveins: $sgpr0_sgpr1
133 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
134 ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), addrspace 4)
135 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
136 %0:sgpr(p4) = COPY $sgpr0_sgpr1
137 %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>), align 8, addrspace 4)
138 $sgpr0_sgpr1 = COPY %1
143 name: load_constant_v2s32_align4
145 regBankSelected: true
146 tracksRegLiveness: true
150 liveins: $sgpr0_sgpr1
152 ; GFX6-LABEL: name: load_constant_v2s32_align4
153 ; GFX6: liveins: $sgpr0_sgpr1
155 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
156 ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
157 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
159 ; GFX7-LABEL: name: load_constant_v2s32_align4
160 ; GFX7: liveins: $sgpr0_sgpr1
162 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
163 ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
164 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
166 ; GFX8-LABEL: name: load_constant_v2s32_align4
167 ; GFX8: liveins: $sgpr0_sgpr1
169 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
170 ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
171 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
173 ; GFX10-LABEL: name: load_constant_v2s32_align4
174 ; GFX10: liveins: $sgpr0_sgpr1
176 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
177 ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<2 x s32>), align 4, addrspace 4)
178 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
179 %0:sgpr(p4) = COPY $sgpr0_sgpr1
180 %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load (<2 x s32>), align 4, addrspace 4)
181 $sgpr0_sgpr1 = COPY %1
186 name: load_constant_v4s16_align4
188 regBankSelected: true
189 tracksRegLiveness: true
193 liveins: $sgpr0_sgpr1
195 ; GFX6-LABEL: name: load_constant_v4s16_align4
196 ; GFX6: liveins: $sgpr0_sgpr1
198 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
199 ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
200 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
202 ; GFX7-LABEL: name: load_constant_v4s16_align4
203 ; GFX7: liveins: $sgpr0_sgpr1
205 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
206 ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
207 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
209 ; GFX8-LABEL: name: load_constant_v4s16_align4
210 ; GFX8: liveins: $sgpr0_sgpr1
212 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
213 ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
214 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
216 ; GFX10-LABEL: name: load_constant_v4s16_align4
217 ; GFX10: liveins: $sgpr0_sgpr1
219 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
220 ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), align 4, addrspace 4)
221 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
222 %0:sgpr(p4) = COPY $sgpr0_sgpr1
223 %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load (<4 x s16>), align 4, addrspace 4)
224 $sgpr0_sgpr1 = COPY %1
230 name: load_constant_v4s32_align4
232 regBankSelected: true
233 tracksRegLiveness: true
237 liveins: $sgpr0_sgpr1
239 ; GFX6-LABEL: name: load_constant_v4s32_align4
240 ; GFX6: liveins: $sgpr0_sgpr1
242 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
243 ; GFX6-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
244 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
246 ; GFX7-LABEL: name: load_constant_v4s32_align4
247 ; GFX7: liveins: $sgpr0_sgpr1
249 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
250 ; GFX7-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
251 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
253 ; GFX8-LABEL: name: load_constant_v4s32_align4
254 ; GFX8: liveins: $sgpr0_sgpr1
256 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
257 ; GFX8-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
258 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
260 ; GFX10-LABEL: name: load_constant_v4s32_align4
261 ; GFX10: liveins: $sgpr0_sgpr1
263 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
264 ; GFX10-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<4 x s32>), align 4, addrspace 4)
265 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
266 %0:sgpr(p4) = COPY $sgpr0_sgpr1
267 %1:sgpr(<4 x s32>) = G_LOAD %0 :: (load (<4 x s32>), align 4, addrspace 4)
268 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
274 name: load_constant_s64
276 regBankSelected: true
277 tracksRegLiveness: true
281 liveins: $sgpr0_sgpr1
283 ; GFX6-LABEL: name: load_constant_s64
284 ; GFX6: liveins: $sgpr0_sgpr1
286 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
287 ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
288 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
290 ; GFX7-LABEL: name: load_constant_s64
291 ; GFX7: liveins: $sgpr0_sgpr1
293 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
294 ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
295 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
297 ; GFX8-LABEL: name: load_constant_s64
298 ; GFX8: liveins: $sgpr0_sgpr1
300 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
301 ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
302 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
304 ; GFX10-LABEL: name: load_constant_s64
305 ; GFX10: liveins: $sgpr0_sgpr1
307 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
308 ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), addrspace 4)
309 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
310 %0:sgpr(p4) = COPY $sgpr0_sgpr1
311 %1:sgpr(s64) = G_LOAD %0 :: (load (s64), align 8, addrspace 4)
312 $sgpr0_sgpr1 = COPY %1
318 name: load_constant_s64_align4
320 regBankSelected: true
321 tracksRegLiveness: true
325 liveins: $sgpr0_sgpr1
327 ; GFX6-LABEL: name: load_constant_s64_align4
328 ; GFX6: liveins: $sgpr0_sgpr1
330 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
331 ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
332 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
334 ; GFX7-LABEL: name: load_constant_s64_align4
335 ; GFX7: liveins: $sgpr0_sgpr1
337 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
338 ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
339 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
341 ; GFX8-LABEL: name: load_constant_s64_align4
342 ; GFX8: liveins: $sgpr0_sgpr1
344 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
345 ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
346 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
348 ; GFX10-LABEL: name: load_constant_s64_align4
349 ; GFX10: liveins: $sgpr0_sgpr1
351 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
352 ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (s64), align 4, addrspace 4)
353 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
354 %0:sgpr(p4) = COPY $sgpr0_sgpr1
355 %1:sgpr(s64) = G_LOAD %0 :: (load (s64), align 4, addrspace 4)
356 $sgpr0_sgpr1 = COPY %1
362 name: load_constant_v2s64
364 regBankSelected: true
365 tracksRegLiveness: true
369 liveins: $sgpr0_sgpr1
371 ; GFX6-LABEL: name: load_constant_v2s64
372 ; GFX6: liveins: $sgpr0_sgpr1
374 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
375 ; GFX6-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
376 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
378 ; GFX7-LABEL: name: load_constant_v2s64
379 ; GFX7: liveins: $sgpr0_sgpr1
381 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
382 ; GFX7-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
383 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
385 ; GFX8-LABEL: name: load_constant_v2s64
386 ; GFX8: liveins: $sgpr0_sgpr1
388 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
389 ; GFX8-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
390 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
392 ; GFX10-LABEL: name: load_constant_v2s64
393 ; GFX10: liveins: $sgpr0_sgpr1
395 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
396 ; GFX10-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<2 x s64>), align 4, addrspace 4)
397 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
398 %0:sgpr(p4) = COPY $sgpr0_sgpr1
399 %1:sgpr(<2 x s64>) = G_LOAD %0 :: (load (<2 x s64>), align 4, addrspace 4)
400 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
406 name: load_constant_v2p1
408 regBankSelected: true
409 tracksRegLiveness: true
413 liveins: $sgpr0_sgpr1
415 ; GFX6-LABEL: name: load_constant_v2p1
416 ; GFX6: liveins: $sgpr0_sgpr1
418 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
419 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
420 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
422 ; GFX7-LABEL: name: load_constant_v2p1
423 ; GFX7: liveins: $sgpr0_sgpr1
425 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
426 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
427 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
429 ; GFX8-LABEL: name: load_constant_v2p1
430 ; GFX8: liveins: $sgpr0_sgpr1
432 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
433 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
434 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
436 ; GFX10-LABEL: name: load_constant_v2p1
437 ; GFX10: liveins: $sgpr0_sgpr1
439 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
440 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load (<2 x p1>), align 4, addrspace 4)
441 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>)
442 %0:sgpr(p4) = COPY $sgpr0_sgpr1
443 %1:sgpr(<2 x p1>) = G_LOAD %0 :: (load (<2 x p1>), align 4, addrspace 4)
444 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
450 name: load_constant_s128_align4
452 regBankSelected: true
453 tracksRegLiveness: true
457 liveins: $sgpr0_sgpr1
459 ; GFX6-LABEL: name: load_constant_s128_align4
460 ; GFX6: liveins: $sgpr0_sgpr1
462 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
463 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
464 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
466 ; GFX7-LABEL: name: load_constant_s128_align4
467 ; GFX7: liveins: $sgpr0_sgpr1
469 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
470 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
471 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
473 ; GFX8-LABEL: name: load_constant_s128_align4
474 ; GFX8: liveins: $sgpr0_sgpr1
476 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
477 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
478 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
480 ; GFX10-LABEL: name: load_constant_s128_align4
481 ; GFX10: liveins: $sgpr0_sgpr1
483 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
484 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load (s128), align 4, addrspace 4)
485 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128)
486 %0:sgpr(p4) = COPY $sgpr0_sgpr1
487 %1:sgpr(s128) = G_LOAD %0 :: (load (s128), align 4, addrspace 4)
488 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
494 name: load_constant_p3_from_4
496 regBankSelected: true
497 tracksRegLiveness: true
501 liveins: $sgpr0_sgpr1
503 ; GFX6-LABEL: name: load_constant_p3_from_4
504 ; GFX6: liveins: $sgpr0_sgpr1
506 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
507 ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
508 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
510 ; GFX7-LABEL: name: load_constant_p3_from_4
511 ; GFX7: liveins: $sgpr0_sgpr1
513 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
514 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
515 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
517 ; GFX8-LABEL: name: load_constant_p3_from_4
518 ; GFX8: liveins: $sgpr0_sgpr1
520 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
521 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
522 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
524 ; GFX10-LABEL: name: load_constant_p3_from_4
525 ; GFX10: liveins: $sgpr0_sgpr1
527 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
528 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (p3), addrspace 4)
529 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
530 %0:sgpr(p4) = COPY $sgpr0_sgpr1
531 %1:sgpr(p3) = G_LOAD %0 :: (load (p3), align 4, addrspace 4)
538 name: load_constant_p4_from_8
540 regBankSelected: true
541 tracksRegLiveness: true
545 liveins: $sgpr0_sgpr1
547 ; GFX6-LABEL: name: load_constant_p4_from_8
548 ; GFX6: liveins: $sgpr0_sgpr1
550 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
551 ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
552 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
554 ; GFX7-LABEL: name: load_constant_p4_from_8
555 ; GFX7: liveins: $sgpr0_sgpr1
557 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
558 ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
559 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
561 ; GFX8-LABEL: name: load_constant_p4_from_8
562 ; GFX8: liveins: $sgpr0_sgpr1
564 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
565 ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
566 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
568 ; GFX10-LABEL: name: load_constant_p4_from_8
569 ; GFX10: liveins: $sgpr0_sgpr1
571 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
572 ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (p4), addrspace 4)
573 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
574 %0:sgpr(p4) = COPY $sgpr0_sgpr1
575 %1:sgpr(p4) = G_LOAD %0 :: (load (p4), align 8, addrspace 4)
576 $sgpr0_sgpr1 = COPY %1
582 name: load_constant_p999_from_8
584 regBankSelected: true
585 tracksRegLiveness: true
589 liveins: $sgpr0_sgpr1
591 ; GFX6-LABEL: name: load_constant_p999_from_8
592 ; GFX6: liveins: $sgpr0_sgpr1
594 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
595 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
596 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
598 ; GFX7-LABEL: name: load_constant_p999_from_8
599 ; GFX7: liveins: $sgpr0_sgpr1
601 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
602 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
603 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
605 ; GFX8-LABEL: name: load_constant_p999_from_8
606 ; GFX8: liveins: $sgpr0_sgpr1
608 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
609 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
610 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
612 ; GFX10-LABEL: name: load_constant_p999_from_8
613 ; GFX10: liveins: $sgpr0_sgpr1
615 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
616 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load (p999), addrspace 4)
617 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](p999)
618 %0:sgpr(p4) = COPY $sgpr0_sgpr1
619 %1:sgpr(p999) = G_LOAD %0 :: (load (p999), align 8, addrspace 4)
620 $sgpr0_sgpr1 = COPY %1
626 name: load_constant_v2p3
628 regBankSelected: true
629 tracksRegLiveness: true
633 liveins: $sgpr0_sgpr1
635 ; GFX6-LABEL: name: load_constant_v2p3
636 ; GFX6: liveins: $sgpr0_sgpr1
638 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
639 ; GFX6-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
640 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
642 ; GFX7-LABEL: name: load_constant_v2p3
643 ; GFX7: liveins: $sgpr0_sgpr1
645 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
646 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
647 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
649 ; GFX8-LABEL: name: load_constant_v2p3
650 ; GFX8: liveins: $sgpr0_sgpr1
652 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
653 ; GFX8-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
654 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
656 ; GFX10-LABEL: name: load_constant_v2p3
657 ; GFX10: liveins: $sgpr0_sgpr1
659 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1
660 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load (<2 x p3>), addrspace 4)
661 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>)
662 %0:sgpr(p4) = COPY $sgpr0_sgpr1
663 %1:sgpr(<2 x p3>) = G_LOAD %0 :: (load (<2 x p3>), align 8, addrspace 4)
664 $sgpr0_sgpr1 = COPY %1
670 name: load_constant_v2s16
672 regBankSelected: true
673 tracksRegLiveness: true
677 liveins: $sgpr0_sgpr1
679 ; GFX6-LABEL: name: load_constant_v2s16
680 ; GFX6: liveins: $sgpr0_sgpr1
682 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
683 ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
684 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
686 ; GFX7-LABEL: name: load_constant_v2s16
687 ; GFX7: liveins: $sgpr0_sgpr1
689 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
690 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
691 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
693 ; GFX8-LABEL: name: load_constant_v2s16
694 ; GFX8: liveins: $sgpr0_sgpr1
696 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
697 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
698 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
700 ; GFX10-LABEL: name: load_constant_v2s16
701 ; GFX10: liveins: $sgpr0_sgpr1
703 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
704 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0 :: (load (<2 x s16>), addrspace 4)
705 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
706 %0:sgpr(p4) = COPY $sgpr0_sgpr1
707 %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load (<2 x s16>), align 4, addrspace 4)
714 name: load_constant_v4s16
716 regBankSelected: true
717 tracksRegLiveness: true
721 liveins: $sgpr0_sgpr1
723 ; GFX6-LABEL: name: load_constant_v4s16
724 ; GFX6: liveins: $sgpr0_sgpr1
726 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
727 ; GFX6-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
728 ; GFX6-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
730 ; GFX7-LABEL: name: load_constant_v4s16
731 ; GFX7: liveins: $sgpr0_sgpr1
733 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
734 ; GFX7-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
735 ; GFX7-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
737 ; GFX8-LABEL: name: load_constant_v4s16
738 ; GFX8: liveins: $sgpr0_sgpr1
740 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
741 ; GFX8-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
742 ; GFX8-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
744 ; GFX10-LABEL: name: load_constant_v4s16
745 ; GFX10: liveins: $sgpr0_sgpr1
747 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
748 ; GFX10-NEXT: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0 :: (load (<4 x s16>), addrspace 4)
749 ; GFX10-NEXT: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]]
750 %0:sgpr(p4) = COPY $sgpr0_sgpr1
751 %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load (<4 x s16>), align 8, addrspace 4)
752 $sgpr0_sgpr1 = COPY %1
758 name: load_constant_v8s16
760 regBankSelected: true
761 tracksRegLiveness: true
765 liveins: $sgpr0_sgpr1
767 ; GFX6-LABEL: name: load_constant_v8s16
768 ; GFX6: liveins: $sgpr0_sgpr1
770 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
771 ; GFX6-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
772 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
774 ; GFX7-LABEL: name: load_constant_v8s16
775 ; GFX7: liveins: $sgpr0_sgpr1
777 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
778 ; GFX7-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
779 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
781 ; GFX8-LABEL: name: load_constant_v8s16
782 ; GFX8: liveins: $sgpr0_sgpr1
784 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
785 ; GFX8-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
786 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
788 ; GFX10-LABEL: name: load_constant_v8s16
789 ; GFX10: liveins: $sgpr0_sgpr1
791 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
792 ; GFX10-NEXT: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0 :: (load (<8 x s16>), align 4, addrspace 4)
793 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]]
794 %0:sgpr(p4) = COPY $sgpr0_sgpr1
795 %1:sgpr(<8 x s16>) = G_LOAD %0 :: (load (<8 x s16>), align 4, addrspace 4)
796 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1
802 name: load_constant_v8s32
804 regBankSelected: true
805 tracksRegLiveness: true
809 liveins: $sgpr0_sgpr1
811 ; GFX6-LABEL: name: load_constant_v8s32
812 ; GFX6: liveins: $sgpr0_sgpr1
814 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
815 ; GFX6-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
816 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
818 ; GFX7-LABEL: name: load_constant_v8s32
819 ; GFX7: liveins: $sgpr0_sgpr1
821 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
822 ; GFX7-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
823 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
825 ; GFX8-LABEL: name: load_constant_v8s32
826 ; GFX8: liveins: $sgpr0_sgpr1
828 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
829 ; GFX8-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
830 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
832 ; GFX10-LABEL: name: load_constant_v8s32
833 ; GFX10: liveins: $sgpr0_sgpr1
835 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
836 ; GFX10-NEXT: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0 :: (load (<8 x s32>), align 4, addrspace 4)
837 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]]
838 %0:sgpr(p4) = COPY $sgpr0_sgpr1
839 %1:sgpr(<8 x s32>) = G_LOAD %0 :: (load (<8 x s32>), align 4, addrspace 4)
840 $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %1
846 name: load_constant_v16s32
848 regBankSelected: true
849 tracksRegLiveness: true
853 liveins: $sgpr0_sgpr1
855 ; GFX6-LABEL: name: load_constant_v16s32
856 ; GFX6: liveins: $sgpr0_sgpr1
858 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
859 ; GFX6-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
860 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
862 ; GFX7-LABEL: name: load_constant_v16s32
863 ; GFX7: liveins: $sgpr0_sgpr1
865 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
866 ; GFX7-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
867 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
869 ; GFX8-LABEL: name: load_constant_v16s32
870 ; GFX8: liveins: $sgpr0_sgpr1
872 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
873 ; GFX8-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
874 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
876 ; GFX10-LABEL: name: load_constant_v16s32
877 ; GFX10: liveins: $sgpr0_sgpr1
879 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
880 ; GFX10-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<16 x s32>), align 4, addrspace 4)
881 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
882 %0:sgpr(p4) = COPY $sgpr0_sgpr1
883 %1:sgpr(<16 x s32>) = G_LOAD %0 :: (load (<16 x s32>), align 4, addrspace 4)
884 $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1
890 name: load_constant_v8s64
892 regBankSelected: true
893 tracksRegLiveness: true
897 liveins: $sgpr0_sgpr1
899 ; GFX6-LABEL: name: load_constant_v8s64
900 ; GFX6: liveins: $sgpr0_sgpr1
902 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
903 ; GFX6-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
904 ; GFX6-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
906 ; GFX7-LABEL: name: load_constant_v8s64
907 ; GFX7: liveins: $sgpr0_sgpr1
909 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
910 ; GFX7-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
911 ; GFX7-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
913 ; GFX8-LABEL: name: load_constant_v8s64
914 ; GFX8: liveins: $sgpr0_sgpr1
916 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
917 ; GFX8-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
918 ; GFX8-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
920 ; GFX10-LABEL: name: load_constant_v8s64
921 ; GFX10: liveins: $sgpr0_sgpr1
923 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
924 ; GFX10-NEXT: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0 :: (load (<8 x s64>), align 4, addrspace 4)
925 ; GFX10-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]]
926 %0:sgpr(p4) = COPY $sgpr0_sgpr1
927 %1:sgpr(<8 x s64>) = G_LOAD %0 :: (load (<8 x s64>), align 4, addrspace 4)
928 $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1
932 ################################################################################
933 ### Stress addressing modes
934 ################################################################################
938 name: load_constant_s32_from_4_gep_1020
940 regBankSelected: true
941 tracksRegLiveness: true
945 liveins: $sgpr0_sgpr1
947 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1020
948 ; GFX6: liveins: $sgpr0_sgpr1
950 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
951 ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0 :: (load (s32), addrspace 4)
952 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
954 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1020
955 ; GFX7: liveins: $sgpr0_sgpr1
957 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
958 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0 :: (load (s32), addrspace 4)
959 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
961 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1020
962 ; GFX8: liveins: $sgpr0_sgpr1
964 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
965 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0 :: (load (s32), addrspace 4)
966 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
968 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1020
969 ; GFX10: liveins: $sgpr0_sgpr1
971 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
972 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0 :: (load (s32), addrspace 4)
973 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
974 %0:sgpr(p4) = COPY $sgpr0_sgpr1
975 %1:sgpr(s64) = G_CONSTANT i64 1020
976 %2:sgpr(p4) = G_PTR_ADD %0, %1
977 %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
984 name: load_constant_s32_from_4_gep_1024
986 regBankSelected: true
987 tracksRegLiveness: true
991 liveins: $sgpr0_sgpr1
993 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1024
994 ; GFX6: liveins: $sgpr0_sgpr1
996 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
997 ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1024
998 ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
999 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1001 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1024
1002 ; GFX7: liveins: $sgpr0_sgpr1
1004 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1005 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 256, 0 :: (load (s32), addrspace 4)
1006 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
1008 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1024
1009 ; GFX8: liveins: $sgpr0_sgpr1
1011 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1012 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0 :: (load (s32), addrspace 4)
1013 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1015 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1024
1016 ; GFX10: liveins: $sgpr0_sgpr1
1017 ; GFX10-NEXT: {{ $}}
1018 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1019 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0 :: (load (s32), addrspace 4)
1020 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1021 %0:sgpr(p4) = COPY $sgpr0_sgpr1
1022 %1:sgpr(s64) = G_CONSTANT i64 1024
1023 %2:sgpr(p4) = G_PTR_ADD %0, %1
1024 %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1031 name: load_constant_s32_from_4_gep_1048575
1033 regBankSelected: true
1034 tracksRegLiveness: true
1038 liveins: $sgpr0_sgpr1
1040 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048575
1041 ; GFX6: liveins: $sgpr0_sgpr1
1043 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1044 ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
1045 ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1046 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1048 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048575
1049 ; GFX7: liveins: $sgpr0_sgpr1
1051 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1052 ; GFX7-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
1053 ; GFX7-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1054 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1056 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048575
1057 ; GFX8: liveins: $sgpr0_sgpr1
1059 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1060 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1048575, 0 :: (load (s32), addrspace 4)
1061 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1063 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048575
1064 ; GFX10: liveins: $sgpr0_sgpr1
1065 ; GFX10-NEXT: {{ $}}
1066 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1067 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575
1068 ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR_IMM [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load (s32), addrspace 4)
1069 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR_IMM]]
1070 %0:sgpr(p4) = COPY $sgpr0_sgpr1
1071 %1:sgpr(s64) = G_CONSTANT i64 1048575
1072 %2:sgpr(p4) = G_PTR_ADD %0, %1
1073 %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1080 name: load_constant_s32_from_4_gep_1048576
1082 regBankSelected: true
1083 tracksRegLiveness: true
1087 liveins: $sgpr0_sgpr1
1089 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048576
1090 ; GFX6: liveins: $sgpr0_sgpr1
1092 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1093 ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1094 ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1095 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1097 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048576
1098 ; GFX7: liveins: $sgpr0_sgpr1
1100 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1101 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 262144, 0 :: (load (s32), addrspace 4)
1102 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]]
1104 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048576
1105 ; GFX8: liveins: $sgpr0_sgpr1
1107 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1108 ; GFX8-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1109 ; GFX8-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1110 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1112 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048576
1113 ; GFX10: liveins: $sgpr0_sgpr1
1114 ; GFX10-NEXT: {{ $}}
1115 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1116 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576
1117 ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR_IMM [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load (s32), addrspace 4)
1118 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR_IMM]]
1119 %0:sgpr(p4) = COPY $sgpr0_sgpr1
1120 %1:sgpr(s64) = G_CONSTANT i64 1048576
1121 %2:sgpr(p4) = G_PTR_ADD %0, %1
1122 %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1129 name: load_constant_s32_from_4_gep_1073741823
1131 regBankSelected: true
1132 tracksRegLiveness: true
1136 liveins: $sgpr0_sgpr1
1138 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1073741823
1139 ; GFX6: liveins: $sgpr0_sgpr1
1141 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1142 ; GFX6-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1143 ; GFX6-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1144 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1146 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1073741823
1147 ; GFX7: liveins: $sgpr0_sgpr1
1149 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1150 ; GFX7-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1151 ; GFX7-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1152 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1154 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1073741823
1155 ; GFX8: liveins: $sgpr0_sgpr1
1157 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1158 ; GFX8-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1159 ; GFX8-NEXT: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0 :: (load (s32), addrspace 4)
1160 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]]
1162 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1073741823
1163 ; GFX10: liveins: $sgpr0_sgpr1
1164 ; GFX10-NEXT: {{ $}}
1165 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1166 ; GFX10-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823
1167 ; GFX10-NEXT: [[S_LOAD_DWORD_SGPR_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR_IMM [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load (s32), addrspace 4)
1168 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR_IMM]]
1169 %0:sgpr(p4) = COPY $sgpr0_sgpr1
1170 %1:sgpr(s64) = G_CONSTANT i64 1073741823
1171 %2:sgpr(p4) = G_PTR_ADD %0, %1
1172 %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1179 name: load_constant_s32_from_4_gep_negative_1
1181 regBankSelected: true
1182 tracksRegLiveness: true
1186 liveins: $sgpr0_sgpr1
1188 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_1
1189 ; GFX6: liveins: $sgpr0_sgpr1
1191 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1192 ; GFX6-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -1
1193 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1194 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1195 ; GFX6-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1196 ; GFX6-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1197 ; GFX6-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1198 ; GFX6-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1199 ; GFX6-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1200 ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1201 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1203 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_1
1204 ; GFX7: liveins: $sgpr0_sgpr1
1206 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1207 ; GFX7-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -1
1208 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1209 ; GFX7-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1210 ; GFX7-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1211 ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1212 ; GFX7-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1213 ; GFX7-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1214 ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1215 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1216 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1218 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_1
1219 ; GFX8: liveins: $sgpr0_sgpr1
1221 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1222 ; GFX8-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -1
1223 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1224 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1225 ; GFX8-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1226 ; GFX8-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1227 ; GFX8-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1228 ; GFX8-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1229 ; GFX8-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1230 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1231 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1233 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_1
1234 ; GFX10: liveins: $sgpr0_sgpr1
1235 ; GFX10-NEXT: {{ $}}
1236 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1237 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -1, 0 :: (load (s32), addrspace 4)
1238 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1239 %0:sgpr(p4) = COPY $sgpr0_sgpr1
1240 %1:sgpr(s64) = G_CONSTANT i64 -1
1241 %2:sgpr(p4) = G_PTR_ADD %0, %1
1242 %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)
1249 name: load_constant_s32_from_4_gep_negative_524288
1251 regBankSelected: true
1252 tracksRegLiveness: true
1256 liveins: $sgpr0_sgpr1
1258 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1259 ; GFX6: liveins: $sgpr0_sgpr1
1261 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1262 ; GFX6-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -524288
1263 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1264 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1265 ; GFX6-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1266 ; GFX6-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1267 ; GFX6-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1268 ; GFX6-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1269 ; GFX6-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1270 ; GFX6-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1271 ; GFX6-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1273 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1274 ; GFX7: liveins: $sgpr0_sgpr1
1276 ; GFX7-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1277 ; GFX7-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -524288
1278 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1279 ; GFX7-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1280 ; GFX7-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1281 ; GFX7-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1282 ; GFX7-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1283 ; GFX7-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1284 ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1285 ; GFX7-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1286 ; GFX7-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1288 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1289 ; GFX8: liveins: $sgpr0_sgpr1
1291 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1292 ; GFX8-NEXT: [[S_MOV_B:%[0-9]+]]:sreg_64 = S_MOV_B64_IMM_PSEUDO -524288
1293 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0
1294 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub0
1295 ; GFX8-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1
1296 ; GFX8-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B]].sub1
1297 ; GFX8-NEXT: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc
1298 ; GFX8-NEXT: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def dead $scc, implicit $scc
1299 ; GFX8-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1
1300 ; GFX8-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0 :: (load (s32), addrspace 4)
1301 ; GFX8-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1303 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_524288
1304 ; GFX10: liveins: $sgpr0_sgpr1
1305 ; GFX10-NEXT: {{ $}}
1306 ; GFX10-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
1307 ; GFX10-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -524288, 0 :: (load (s32), addrspace 4)
1308 ; GFX10-NEXT: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]]
1309 %0:sgpr(p4) = COPY $sgpr0_sgpr1
1310 %1:sgpr(s64) = G_CONSTANT i64 -524288
1311 %2:sgpr(p4) = G_PTR_ADD %0, %1
1312 %3:sgpr(s32) = G_LOAD %2 :: (load (s32), align 4, addrspace 4)