1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s
3 # RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
4 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
5 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
6 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
11 name: load_local_s32_from_4
14 tracksRegLiveness: true
20 ; GFX6-LABEL: name: load_local_s32_from_4
21 ; GFX6: liveins: $vgpr0
22 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
23 ; GFX6: $m0 = S_MOV_B32 -1
24 ; GFX6: [[DS_READ_B32_:%[0-9]+]]:vgpr_32 = DS_READ_B32 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 4, addrspace 3)
25 ; GFX6: $vgpr0 = COPY [[DS_READ_B32_]]
26 ; GFX7-LABEL: name: load_local_s32_from_4
27 ; GFX7: liveins: $vgpr0
28 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
29 ; GFX7: $m0 = S_MOV_B32 -1
30 ; GFX7: [[DS_READ_B32_:%[0-9]+]]:vgpr_32 = DS_READ_B32 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 4, addrspace 3)
31 ; GFX7: $vgpr0 = COPY [[DS_READ_B32_]]
32 ; GFX9-LABEL: name: load_local_s32_from_4
33 ; GFX9: liveins: $vgpr0
34 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
35 ; GFX9: [[DS_READ_B32_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_B32_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 4, addrspace 3)
36 ; GFX9: $vgpr0 = COPY [[DS_READ_B32_gfx9_]]
37 %0:vgpr(p3) = COPY $vgpr0
38 %1:vgpr(s32) = G_LOAD %0 :: (load 4, align 4, addrspace 3)
45 name: load_local_s32_from_2
48 tracksRegLiveness: true
54 ; GFX6-LABEL: name: load_local_s32_from_2
55 ; GFX6: liveins: $vgpr0
56 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
57 ; GFX6: $m0 = S_MOV_B32 -1
58 ; GFX6: [[DS_READ_U16_:%[0-9]+]]:vgpr_32 = DS_READ_U16 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 2, addrspace 3)
59 ; GFX6: $vgpr0 = COPY [[DS_READ_U16_]]
60 ; GFX7-LABEL: name: load_local_s32_from_2
61 ; GFX7: liveins: $vgpr0
62 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
63 ; GFX7: $m0 = S_MOV_B32 -1
64 ; GFX7: [[DS_READ_U16_:%[0-9]+]]:vgpr_32 = DS_READ_U16 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 2, addrspace 3)
65 ; GFX7: $vgpr0 = COPY [[DS_READ_U16_]]
66 ; GFX9-LABEL: name: load_local_s32_from_2
67 ; GFX9: liveins: $vgpr0
68 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
69 ; GFX9: [[DS_READ_U16_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U16_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 2, addrspace 3)
70 ; GFX9: $vgpr0 = COPY [[DS_READ_U16_gfx9_]]
71 %0:vgpr(p3) = COPY $vgpr0
72 %1:vgpr(s32) = G_LOAD %0 :: (load 2, align 2, addrspace 3)
79 name: load_local_s32_from_1
82 tracksRegLiveness: true
84 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
85 scratchWaveOffsetReg: $sgpr4
86 stackPtrOffsetReg: $sgpr32
92 ; GFX6-LABEL: name: load_local_s32_from_1
93 ; GFX6: liveins: $vgpr0
94 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
95 ; GFX6: $m0 = S_MOV_B32 -1
96 ; GFX6: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
97 ; GFX6: $vgpr0 = COPY [[DS_READ_U8_]]
98 ; GFX7-LABEL: name: load_local_s32_from_1
99 ; GFX7: liveins: $vgpr0
100 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
101 ; GFX7: $m0 = S_MOV_B32 -1
102 ; GFX7: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
103 ; GFX7: $vgpr0 = COPY [[DS_READ_U8_]]
104 ; GFX9-LABEL: name: load_local_s32_from_1
105 ; GFX9: liveins: $vgpr0
106 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
107 ; GFX9: [[DS_READ_U8_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U8_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 1, addrspace 3)
108 ; GFX9: $vgpr0 = COPY [[DS_READ_U8_gfx9_]]
109 %0:vgpr(p3) = COPY $vgpr0
110 %1:vgpr(s32) = G_LOAD %0 :: (load 1, align 1, addrspace 3)
117 name: load_local_v2s32
119 regBankSelected: true
120 tracksRegLiveness: true
126 ; GFX6-LABEL: name: load_local_v2s32
127 ; GFX6: liveins: $vgpr0
128 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
129 ; GFX6: $m0 = S_MOV_B32 -1
130 ; GFX6: [[DS_READ_B64_:%[0-9]+]]:vreg_64 = DS_READ_B64 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 8, addrspace 3)
131 ; GFX6: $vgpr0_vgpr1 = COPY [[DS_READ_B64_]]
132 ; GFX7-LABEL: name: load_local_v2s32
133 ; GFX7: liveins: $vgpr0
134 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
135 ; GFX7: $m0 = S_MOV_B32 -1
136 ; GFX7: [[DS_READ_B64_:%[0-9]+]]:vreg_64 = DS_READ_B64 [[COPY]], 0, 0, implicit $m0, implicit $exec :: (load 8, addrspace 3)
137 ; GFX7: $vgpr0_vgpr1 = COPY [[DS_READ_B64_]]
138 ; GFX9-LABEL: name: load_local_v2s32
139 ; GFX9: liveins: $vgpr0
140 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
141 ; GFX9: [[DS_READ_B64_gfx9_:%[0-9]+]]:vreg_64 = DS_READ_B64_gfx9 [[COPY]], 0, 0, implicit $exec :: (load 8, addrspace 3)
142 ; GFX9: $vgpr0_vgpr1 = COPY [[DS_READ_B64_gfx9_]]
143 %0:vgpr(p3) = COPY $vgpr0
144 %1:vgpr(<2 x s32>) = G_LOAD %0 :: (load 8, align 8, addrspace 3)
145 $vgpr0_vgpr1 = COPY %1
151 name: load_local_v2s32_align4
153 regBankSelected: true
154 tracksRegLiveness: true
160 ; GFX6-LABEL: name: load_local_v2s32_align4
161 ; GFX6: liveins: $vgpr0
162 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
163 ; GFX6: $m0 = S_MOV_B32 -1
164 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(<2 x s32>) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
165 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>)
166 ; GFX7-LABEL: name: load_local_v2s32_align4
167 ; GFX7: liveins: $vgpr0
168 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
169 ; GFX7: $m0 = S_MOV_B32 -1
170 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(<2 x s32>) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
171 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>)
172 ; GFX9-LABEL: name: load_local_v2s32_align4
173 ; GFX9: liveins: $vgpr0
174 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
175 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(<2 x s32>) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
176 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>)
177 %0:vgpr(p3) = COPY $vgpr0
178 %1:vgpr(<2 x s32>) = G_LOAD %0 :: (load 8, align 4, addrspace 3)
179 $vgpr0_vgpr1 = COPY %1
185 name: load_local_v3s32
187 regBankSelected: true
188 tracksRegLiveness: true
194 ; GFX6-LABEL: name: load_local_v3s32
195 ; GFX6: liveins: $vgpr0
196 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
197 ; GFX6: [[LOAD:%[0-9]+]]:{{vgpr|vreg_96}}(<3 x s32>) = G_LOAD [[COPY]](p3) :: (load 12, align 4, addrspace 3)
198 ; GFX6: $vgpr0_vgpr1_vgpr2 = COPY [[LOAD]](<3 x s32>)
199 ; GFX7-LABEL: name: load_local_v3s32
200 ; GFX7: liveins: $vgpr0
201 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
202 ; GFX7: $m0 = S_MOV_B32 -1
203 ; GFX7: [[LOAD:%[0-9]+]]:vreg_96(<3 x s32>) = G_LOAD [[COPY]](p3) :: (load 12, align 4, addrspace 3)
204 ; GFX7: $vgpr0_vgpr1_vgpr2 = COPY [[LOAD]](<3 x s32>)
205 ; GFX9-LABEL: name: load_local_v3s32
206 ; GFX9: liveins: $vgpr0
207 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
208 ; GFX9: [[LOAD:%[0-9]+]]:vreg_96(<3 x s32>) = G_LOAD [[COPY]](p3) :: (load 12, align 4, addrspace 3)
209 ; GFX9: $vgpr0_vgpr1_vgpr2 = COPY [[LOAD]](<3 x s32>)
210 %0:vgpr(p3) = COPY $vgpr0
211 %1:vgpr(<3 x s32>) = G_LOAD %0 :: (load 12, align 4, addrspace 3)
212 $vgpr0_vgpr1_vgpr2 = COPY %1
218 name: load_local_v4s32
220 regBankSelected: true
221 tracksRegLiveness: true
227 ; GFX6-LABEL: name: load_local_v4s32
228 ; GFX6: liveins: $vgpr0
229 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
230 ; GFX6: $m0 = S_MOV_B32 -1
231 ; GFX6: [[LOAD:%[0-9]+]]:vreg_128(<4 x s32>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
232 ; GFX6: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<4 x s32>)
233 ; GFX7-LABEL: name: load_local_v4s32
234 ; GFX7: liveins: $vgpr0
235 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
236 ; GFX7: $m0 = S_MOV_B32 -1
237 ; GFX7: [[LOAD:%[0-9]+]]:vreg_128(<4 x s32>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
238 ; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<4 x s32>)
239 ; GFX9-LABEL: name: load_local_v4s32
240 ; GFX9: liveins: $vgpr0
241 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
242 ; GFX9: [[LOAD:%[0-9]+]]:vreg_128(<4 x s32>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
243 ; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<4 x s32>)
244 %0:vgpr(p3) = COPY $vgpr0
245 %1:vgpr(<4 x s32>) = G_LOAD %0 :: (load 16, align 4, addrspace 3)
246 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
254 regBankSelected: true
255 tracksRegLiveness: true
261 ; GFX6-LABEL: name: load_local_s64
262 ; GFX6: liveins: $vgpr0
263 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
264 ; GFX6: $m0 = S_MOV_B32 -1
265 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(s64) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
266 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](s64)
267 ; GFX7-LABEL: name: load_local_s64
268 ; GFX7: liveins: $vgpr0
269 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
270 ; GFX7: $m0 = S_MOV_B32 -1
271 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(s64) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
272 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](s64)
273 ; GFX9-LABEL: name: load_local_s64
274 ; GFX9: liveins: $vgpr0
275 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
276 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(s64) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
277 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](s64)
278 %0:vgpr(p3) = COPY $vgpr0
279 %1:vgpr(s64) = G_LOAD %0 :: (load 8, align 8, addrspace 3)
280 $vgpr0_vgpr1 = COPY %1
286 name: load_local_s64_align4
288 regBankSelected: true
289 tracksRegLiveness: true
295 ; GFX6-LABEL: name: load_local_s64_align4
296 ; GFX6: liveins: $vgpr0
297 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
298 ; GFX6: $m0 = S_MOV_B32 -1
299 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(s64) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
300 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](s64)
301 ; GFX7-LABEL: name: load_local_s64_align4
302 ; GFX7: liveins: $vgpr0
303 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
304 ; GFX7: $m0 = S_MOV_B32 -1
305 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(s64) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
306 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](s64)
307 ; GFX9-LABEL: name: load_local_s64_align4
308 ; GFX9: liveins: $vgpr0
309 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
310 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(s64) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
311 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](s64)
312 %0:vgpr(p3) = COPY $vgpr0
313 %1:vgpr(s64) = G_LOAD %0 :: (load 8, align 4, addrspace 3)
314 $vgpr0_vgpr1 = COPY %1
320 name: load_local_v2s64
322 regBankSelected: true
323 tracksRegLiveness: true
329 ; GFX6-LABEL: name: load_local_v2s64
330 ; GFX6: liveins: $vgpr0
331 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
332 ; GFX6: $m0 = S_MOV_B32 -1
333 ; GFX6: [[LOAD:%[0-9]+]]:vreg_128(<2 x s64>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
334 ; GFX6: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x s64>)
335 ; GFX7-LABEL: name: load_local_v2s64
336 ; GFX7: liveins: $vgpr0
337 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
338 ; GFX7: $m0 = S_MOV_B32 -1
339 ; GFX7: [[LOAD:%[0-9]+]]:vreg_128(<2 x s64>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
340 ; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x s64>)
341 ; GFX9-LABEL: name: load_local_v2s64
342 ; GFX9: liveins: $vgpr0
343 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
344 ; GFX9: [[LOAD:%[0-9]+]]:vreg_128(<2 x s64>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
345 ; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x s64>)
346 %0:vgpr(p3) = COPY $vgpr0
347 %1:vgpr(<2 x s64>) = G_LOAD %0 :: (load 16, align 4, addrspace 3)
348 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
354 name: load_local_v2p1
356 regBankSelected: true
357 tracksRegLiveness: true
363 ; GFX6-LABEL: name: load_local_v2p1
364 ; GFX6: liveins: $vgpr0
365 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
366 ; GFX6: $m0 = S_MOV_B32 -1
367 ; GFX6: [[LOAD:%[0-9]+]]:vreg_128(<2 x p1>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
368 ; GFX6: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x p1>)
369 ; GFX7-LABEL: name: load_local_v2p1
370 ; GFX7: liveins: $vgpr0
371 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
372 ; GFX7: $m0 = S_MOV_B32 -1
373 ; GFX7: [[LOAD:%[0-9]+]]:vreg_128(<2 x p1>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
374 ; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x p1>)
375 ; GFX9-LABEL: name: load_local_v2p1
376 ; GFX9: liveins: $vgpr0
377 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
378 ; GFX9: [[LOAD:%[0-9]+]]:vreg_128(<2 x p1>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
379 ; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<2 x p1>)
380 %0:vgpr(p3) = COPY $vgpr0
381 %1:vgpr(<2 x p1>) = G_LOAD %0 :: (load 16, align 4, addrspace 3)
382 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
390 regBankSelected: true
391 tracksRegLiveness: true
397 ; GFX6-LABEL: name: load_local_s96
398 ; GFX6: liveins: $vgpr0
399 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
400 ; GFX6: [[LOAD:%[0-9]+]]:{{vgpr|vreg_96}}(s96) = G_LOAD [[COPY]](p3) :: (load 12, align 4, addrspace 3)
401 ; GFX6: $vgpr0_vgpr1_vgpr2 = COPY [[LOAD]](s96)
402 ; GFX7-LABEL: name: load_local_s96
403 ; GFX7: liveins: $vgpr0
404 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
405 ; GFX7: $m0 = S_MOV_B32 -1
406 ; GFX7: [[LOAD:%[0-9]+]]:vreg_96(s96) = G_LOAD [[COPY]](p3) :: (load 12, align 4, addrspace 3)
407 ; GFX7: $vgpr0_vgpr1_vgpr2 = COPY [[LOAD]](s96)
408 ; GFX9-LABEL: name: load_local_s96
409 ; GFX9: liveins: $vgpr0
410 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
411 ; GFX9: [[LOAD:%[0-9]+]]:vreg_96(s96) = G_LOAD [[COPY]](p3) :: (load 12, align 4, addrspace 3)
412 ; GFX9: $vgpr0_vgpr1_vgpr2 = COPY [[LOAD]](s96)
413 %0:vgpr(p3) = COPY $vgpr0
414 %1:vgpr(s96) = G_LOAD %0 :: (load 12, align 4, addrspace 3)
415 $vgpr0_vgpr1_vgpr2 = COPY %1
421 name: load_local_s128
423 regBankSelected: true
424 tracksRegLiveness: true
430 ; GFX6-LABEL: name: load_local_s128
431 ; GFX6: liveins: $vgpr0
432 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
433 ; GFX6: $m0 = S_MOV_B32 -1
434 ; GFX6: [[LOAD:%[0-9]+]]:vreg_128(s128) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
435 ; GFX6: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](s128)
436 ; GFX7-LABEL: name: load_local_s128
437 ; GFX7: liveins: $vgpr0
438 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
439 ; GFX7: $m0 = S_MOV_B32 -1
440 ; GFX7: [[LOAD:%[0-9]+]]:vreg_128(s128) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
441 ; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](s128)
442 ; GFX9-LABEL: name: load_local_s128
443 ; GFX9: liveins: $vgpr0
444 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
445 ; GFX9: [[LOAD:%[0-9]+]]:vreg_128(s128) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
446 ; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](s128)
447 %0:vgpr(p3) = COPY $vgpr0
448 %1:vgpr(s128) = G_LOAD %0 :: (load 16, align 4, addrspace 3)
449 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
455 name: load_local_p3_from_4
457 regBankSelected: true
458 tracksRegLiveness: true
464 ; GFX6-LABEL: name: load_local_p3_from_4
465 ; GFX6: liveins: $vgpr0
466 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
467 ; GFX6: $m0 = S_MOV_B32 -1
468 ; GFX6: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
469 ; GFX6: $vgpr0 = COPY [[LOAD]](p3)
470 ; GFX7-LABEL: name: load_local_p3_from_4
471 ; GFX7: liveins: $vgpr0
472 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
473 ; GFX7: $m0 = S_MOV_B32 -1
474 ; GFX7: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
475 ; GFX7: $vgpr0 = COPY [[LOAD]](p3)
476 ; GFX9-LABEL: name: load_local_p3_from_4
477 ; GFX9: liveins: $vgpr0
478 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
479 ; GFX9: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
480 ; GFX9: $vgpr0 = COPY [[LOAD]](p3)
481 %0:vgpr(p3) = COPY $vgpr0
482 %1:vgpr(p3) = G_LOAD %0 :: (load 4, align 4, addrspace 3)
489 name: load_local_p5_from_4
491 regBankSelected: true
492 tracksRegLiveness: true
498 ; GFX6-LABEL: name: load_local_p5_from_4
499 ; GFX6: liveins: $vgpr0
500 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
501 ; GFX6: $m0 = S_MOV_B32 -1
502 ; GFX6: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
503 ; GFX6: $vgpr0 = COPY [[LOAD]](p3)
504 ; GFX7-LABEL: name: load_local_p5_from_4
505 ; GFX7: liveins: $vgpr0
506 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
507 ; GFX7: $m0 = S_MOV_B32 -1
508 ; GFX7: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
509 ; GFX7: $vgpr0 = COPY [[LOAD]](p3)
510 ; GFX9-LABEL: name: load_local_p5_from_4
511 ; GFX9: liveins: $vgpr0
512 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
513 ; GFX9: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
514 ; GFX9: $vgpr0 = COPY [[LOAD]](p3)
515 %0:vgpr(p3) = COPY $vgpr0
516 %1:vgpr(p3) = G_LOAD %0 :: (load 4, align 4, addrspace 3)
523 name: load_local_p1_align8
525 regBankSelected: true
526 tracksRegLiveness: true
532 ; GFX6-LABEL: name: load_local_p1_align8
533 ; GFX6: liveins: $vgpr0
534 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
535 ; GFX6: $m0 = S_MOV_B32 -1
536 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
537 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
538 ; GFX7-LABEL: name: load_local_p1_align8
539 ; GFX7: liveins: $vgpr0
540 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
541 ; GFX7: $m0 = S_MOV_B32 -1
542 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
543 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
544 ; GFX9-LABEL: name: load_local_p1_align8
545 ; GFX9: liveins: $vgpr0
546 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
547 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
548 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
549 %0:vgpr(p3) = COPY $vgpr0
550 %1:vgpr(p1) = G_LOAD %0 :: (load 8, align 8, addrspace 3)
551 $vgpr0_vgpr1 = COPY %1
557 name: load_local_p1_align4
559 regBankSelected: true
560 tracksRegLiveness: true
566 ; GFX6-LABEL: name: load_local_p1_align4
567 ; GFX6: liveins: $vgpr0
568 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
569 ; GFX6: $m0 = S_MOV_B32 -1
570 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
571 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
572 ; GFX7-LABEL: name: load_local_p1_align4
573 ; GFX7: liveins: $vgpr0
574 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
575 ; GFX7: $m0 = S_MOV_B32 -1
576 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
577 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
578 ; GFX9-LABEL: name: load_local_p1_align4
579 ; GFX9: liveins: $vgpr0
580 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
581 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p3) :: (load 8, align 4, addrspace 3)
582 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
583 %0:vgpr(p3) = COPY $vgpr0
584 %1:vgpr(p1) = G_LOAD %0 :: (load 8, align 4, addrspace 3)
585 $vgpr0_vgpr1 = COPY %1
591 name: load_local_p999_from_8
593 regBankSelected: true
594 tracksRegLiveness: true
600 ; GFX6-LABEL: name: load_local_p999_from_8
601 ; GFX6: liveins: $vgpr0
602 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
603 ; GFX6: $m0 = S_MOV_B32 -1
604 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(p999) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
605 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](p999)
606 ; GFX7-LABEL: name: load_local_p999_from_8
607 ; GFX7: liveins: $vgpr0
608 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
609 ; GFX7: $m0 = S_MOV_B32 -1
610 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(p999) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
611 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](p999)
612 ; GFX9-LABEL: name: load_local_p999_from_8
613 ; GFX9: liveins: $vgpr0
614 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
615 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(p999) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
616 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](p999)
617 %0:vgpr(p3) = COPY $vgpr0
618 %1:vgpr(p999) = G_LOAD %0 :: (load 8, align 8, addrspace 3)
619 $vgpr0_vgpr1 = COPY %1
625 name: load_local_v2p3
627 regBankSelected: true
628 tracksRegLiveness: true
634 ; GFX6-LABEL: name: load_local_v2p3
635 ; GFX6: liveins: $vgpr0
636 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
637 ; GFX6: $m0 = S_MOV_B32 -1
638 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(<2 x p3>) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
639 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x p3>)
640 ; GFX7-LABEL: name: load_local_v2p3
641 ; GFX7: liveins: $vgpr0
642 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
643 ; GFX7: $m0 = S_MOV_B32 -1
644 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(<2 x p3>) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
645 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x p3>)
646 ; GFX9-LABEL: name: load_local_v2p3
647 ; GFX9: liveins: $vgpr0
648 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
649 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(<2 x p3>) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
650 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x p3>)
651 %0:vgpr(p3) = COPY $vgpr0
652 %1:vgpr(<2 x p3>) = G_LOAD %0 :: (load 8, align 8, addrspace 3)
653 $vgpr0_vgpr1 = COPY %1
659 name: load_local_v2s16
661 regBankSelected: true
662 tracksRegLiveness: true
668 ; GFX6-LABEL: name: load_local_v2s16
669 ; GFX6: liveins: $vgpr0
670 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
671 ; GFX6: $m0 = S_MOV_B32 -1
672 ; GFX6: [[LOAD:%[0-9]+]]:vgpr_32(<2 x s16>) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
673 ; GFX6: $vgpr0 = COPY [[LOAD]](<2 x s16>)
674 ; GFX7-LABEL: name: load_local_v2s16
675 ; GFX7: liveins: $vgpr0
676 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
677 ; GFX7: $m0 = S_MOV_B32 -1
678 ; GFX7: [[LOAD:%[0-9]+]]:vgpr_32(<2 x s16>) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
679 ; GFX7: $vgpr0 = COPY [[LOAD]](<2 x s16>)
680 ; GFX9-LABEL: name: load_local_v2s16
681 ; GFX9: liveins: $vgpr0
682 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
683 ; GFX9: [[LOAD:%[0-9]+]]:vgpr_32(<2 x s16>) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3)
684 ; GFX9: $vgpr0 = COPY [[LOAD]](<2 x s16>)
685 %0:vgpr(p3) = COPY $vgpr0
686 %1:vgpr(<2 x s16>) = G_LOAD %0 :: (load 4, align 4, addrspace 3)
693 name: load_local_v4s16
695 regBankSelected: true
696 tracksRegLiveness: true
702 ; GFX6-LABEL: name: load_local_v4s16
703 ; GFX6: liveins: $vgpr0
704 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
705 ; GFX6: $m0 = S_MOV_B32 -1
706 ; GFX6: [[LOAD:%[0-9]+]]:vreg_64(<4 x s16>) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
707 ; GFX6: $vgpr0_vgpr1 = COPY [[LOAD]](<4 x s16>)
708 ; GFX7-LABEL: name: load_local_v4s16
709 ; GFX7: liveins: $vgpr0
710 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
711 ; GFX7: $m0 = S_MOV_B32 -1
712 ; GFX7: [[LOAD:%[0-9]+]]:vreg_64(<4 x s16>) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
713 ; GFX7: $vgpr0_vgpr1 = COPY [[LOAD]](<4 x s16>)
714 ; GFX9-LABEL: name: load_local_v4s16
715 ; GFX9: liveins: $vgpr0
716 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
717 ; GFX9: [[LOAD:%[0-9]+]]:vreg_64(<4 x s16>) = G_LOAD [[COPY]](p3) :: (load 8, addrspace 3)
718 ; GFX9: $vgpr0_vgpr1 = COPY [[LOAD]](<4 x s16>)
719 %0:vgpr(p3) = COPY $vgpr0
720 %1:vgpr(<4 x s16>) = G_LOAD %0 :: (load 8, align 8, addrspace 3)
721 $vgpr0_vgpr1 = COPY %1
727 # name: load_local_v6s16
729 # regBankSelected: true
730 # tracksRegLiveness: true
731 # machineFunctionInfo:
732 # scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
733 # scratchWaveOffsetReg: $sgpr4
734 # stackPtrOffsetReg: $sgpr32
740 # %0:vgpr(p3) = COPY $vgpr0
741 # %1:vgpr(<6 x s16>) = G_LOAD %0 :: (load 12, align 4, addrspace 3)
742 # $vgpr0_vgpr1_vgpr2 = COPY %1
748 name: load_local_v8s16
750 regBankSelected: true
751 tracksRegLiveness: true
757 ; GFX6-LABEL: name: load_local_v8s16
758 ; GFX6: liveins: $vgpr0
759 ; GFX6: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
760 ; GFX6: $m0 = S_MOV_B32 -1
761 ; GFX6: [[LOAD:%[0-9]+]]:vreg_128(<8 x s16>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
762 ; GFX6: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<8 x s16>)
763 ; GFX7-LABEL: name: load_local_v8s16
764 ; GFX7: liveins: $vgpr0
765 ; GFX7: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
766 ; GFX7: $m0 = S_MOV_B32 -1
767 ; GFX7: [[LOAD:%[0-9]+]]:vreg_128(<8 x s16>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
768 ; GFX7: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<8 x s16>)
769 ; GFX9-LABEL: name: load_local_v8s16
770 ; GFX9: liveins: $vgpr0
771 ; GFX9: [[COPY:%[0-9]+]]:vgpr(p3) = COPY $vgpr0
772 ; GFX9: [[LOAD:%[0-9]+]]:vreg_128(<8 x s16>) = G_LOAD [[COPY]](p3) :: (load 16, align 4, addrspace 3)
773 ; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[LOAD]](<8 x s16>)
774 %0:vgpr(p3) = COPY $vgpr0
775 %1:vgpr(<8 x s16>) = G_LOAD %0 :: (load 16, align 4, addrspace 3)
776 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
780 ################################################################################
781 ### Stress addressing modes
782 ################################################################################
786 name: load_local_s32_from_1_gep_65535
788 regBankSelected: true
789 tracksRegLiveness: true
795 ; GFX6-LABEL: name: load_local_s32_from_1_gep_65535
796 ; GFX6: liveins: $vgpr0
797 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
798 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 65535, implicit $exec
799 ; GFX6: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
800 ; GFX6: $m0 = S_MOV_B32 -1
801 ; GFX6: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 %2, 0, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
802 ; GFX6: $vgpr0 = COPY [[DS_READ_U8_]]
803 ; GFX7-LABEL: name: load_local_s32_from_1_gep_65535
804 ; GFX7: liveins: $vgpr0
805 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
806 ; GFX7: $m0 = S_MOV_B32 -1
807 ; GFX7: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 [[COPY]], 65535, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
808 ; GFX7: $vgpr0 = COPY [[DS_READ_U8_]]
809 ; GFX9-LABEL: name: load_local_s32_from_1_gep_65535
810 ; GFX9: liveins: $vgpr0
811 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
812 ; GFX9: [[DS_READ_U8_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U8_gfx9 [[COPY]], 65535, 0, implicit $exec :: (load 1, addrspace 3)
813 ; GFX9: $vgpr0 = COPY [[DS_READ_U8_gfx9_]]
814 %0:vgpr(p3) = COPY $vgpr0
815 %1:vgpr(s32) = G_CONSTANT i32 65535
816 %2:vgpr(p3) = G_GEP %0, %1
817 %3:vgpr(s32) = G_LOAD %2 :: (load 1, align 1, addrspace 3)
824 name: load_local_s32_from_1_gep_65536
826 regBankSelected: true
827 tracksRegLiveness: true
833 ; GFX6-LABEL: name: load_local_s32_from_1_gep_65536
834 ; GFX6: liveins: $vgpr0
835 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
836 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 65536, implicit $exec
837 ; GFX6: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
838 ; GFX6: $m0 = S_MOV_B32 -1
839 ; GFX6: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 %2, 0, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
840 ; GFX6: $vgpr0 = COPY [[DS_READ_U8_]]
841 ; GFX7-LABEL: name: load_local_s32_from_1_gep_65536
842 ; GFX7: liveins: $vgpr0
843 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
844 ; GFX7: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 65536, implicit $exec
845 ; GFX7: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
846 ; GFX7: $m0 = S_MOV_B32 -1
847 ; GFX7: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 %2, 0, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
848 ; GFX7: $vgpr0 = COPY [[DS_READ_U8_]]
849 ; GFX9-LABEL: name: load_local_s32_from_1_gep_65536
850 ; GFX9: liveins: $vgpr0
851 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
852 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 65536, implicit $exec
853 ; GFX9: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
854 ; GFX9: [[DS_READ_U8_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U8_gfx9 [[V_ADD_U32_e64_]], 0, 0, implicit $exec :: (load 1, addrspace 3)
855 ; GFX9: $vgpr0 = COPY [[DS_READ_U8_gfx9_]]
856 %0:vgpr(p3) = COPY $vgpr0
857 %1:vgpr(s32) = G_CONSTANT i32 65536
858 %2:vgpr(p3) = G_GEP %0, %1
859 %3:vgpr(s32) = G_LOAD %2 :: (load 1, align 1, addrspace 3)
866 name: load_local_s32_from_1_gep_m1
868 regBankSelected: true
869 tracksRegLiveness: true
875 ; GFX6-LABEL: name: load_local_s32_from_1_gep_m1
876 ; GFX6: liveins: $vgpr0
877 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
878 ; GFX6: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4294967295, implicit $exec
879 ; GFX6: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
880 ; GFX6: $m0 = S_MOV_B32 -1
881 ; GFX6: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 %2, 0, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
882 ; GFX6: $vgpr0 = COPY [[DS_READ_U8_]]
883 ; GFX7-LABEL: name: load_local_s32_from_1_gep_m1
884 ; GFX7: liveins: $vgpr0
885 ; GFX7: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
886 ; GFX7: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4294967295, implicit $exec
887 ; GFX7: %2:vgpr_32, dead %4:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
888 ; GFX7: $m0 = S_MOV_B32 -1
889 ; GFX7: [[DS_READ_U8_:%[0-9]+]]:vgpr_32 = DS_READ_U8 %2, 0, 0, implicit $m0, implicit $exec :: (load 1, addrspace 3)
890 ; GFX7: $vgpr0 = COPY [[DS_READ_U8_]]
891 ; GFX9-LABEL: name: load_local_s32_from_1_gep_m1
892 ; GFX9: liveins: $vgpr0
893 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
894 ; GFX9: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4294967295, implicit $exec
895 ; GFX9: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[V_MOV_B32_e32_]], 0, implicit $exec
896 ; GFX9: [[DS_READ_U8_gfx9_:%[0-9]+]]:vgpr_32 = DS_READ_U8_gfx9 [[V_ADD_U32_e64_]], 0, 0, implicit $exec :: (load 1, addrspace 3)
897 ; GFX9: $vgpr0 = COPY [[DS_READ_U8_gfx9_]]
898 %0:vgpr(p3) = COPY $vgpr0
899 %1:vgpr(s32) = G_CONSTANT i32 -1
900 %2:vgpr(p3) = G_GEP %0, %1
901 %3:vgpr(s32) = G_LOAD %2 :: (load 1, align 1, addrspace 3)