1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s
3 # RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX9 %s
4 # RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX10 %s
5 # RUN: llc -march=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX11 %s
9 name: load_atomic_flat_s32_seq_cst
12 tracksRegLiveness: true
18 ; GFX7-LABEL: name: load_atomic_flat_s32_seq_cst
19 ; GFX7: liveins: $vgpr0_vgpr1
21 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
22 ; GFX7-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
23 ; GFX7-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
25 ; GFX9-LABEL: name: load_atomic_flat_s32_seq_cst
26 ; GFX9: liveins: $vgpr0_vgpr1
28 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
29 ; GFX9-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
30 ; GFX9-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
32 ; GFX10-LABEL: name: load_atomic_flat_s32_seq_cst
33 ; GFX10: liveins: $vgpr0_vgpr1
35 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
36 ; GFX10-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
37 ; GFX10-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
39 ; GFX11-LABEL: name: load_atomic_flat_s32_seq_cst
40 ; GFX11: liveins: $vgpr0_vgpr1
42 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
43 ; GFX11-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
44 ; GFX11-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
45 %0:vgpr(p0) = COPY $vgpr0_vgpr1
46 %1:vgpr(s32) = G_LOAD %0 :: (load seq_cst (s32), align 4, addrspace 0)
53 name: load_atomic_flat_v2s16_seq_cst
56 tracksRegLiveness: true
62 ; GFX7-LABEL: name: load_atomic_flat_v2s16_seq_cst
63 ; GFX7: liveins: $vgpr0_vgpr1
65 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
66 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(<2 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s16>))
67 ; GFX7-NEXT: $vgpr0 = COPY [[LOAD]](<2 x s16>)
69 ; GFX9-LABEL: name: load_atomic_flat_v2s16_seq_cst
70 ; GFX9: liveins: $vgpr0_vgpr1
72 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
73 ; GFX9-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(<2 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s16>))
74 ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](<2 x s16>)
76 ; GFX10-LABEL: name: load_atomic_flat_v2s16_seq_cst
77 ; GFX10: liveins: $vgpr0_vgpr1
79 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
80 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(<2 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s16>))
81 ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](<2 x s16>)
83 ; GFX11-LABEL: name: load_atomic_flat_v2s16_seq_cst
84 ; GFX11: liveins: $vgpr0_vgpr1
86 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
87 ; GFX11-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(<2 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s16>))
88 ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](<2 x s16>)
89 %0:vgpr(p0) = COPY $vgpr0_vgpr1
90 %1:vgpr(<2 x s16>) = G_LOAD %0 :: (load seq_cst (<2 x s16>), align 4, addrspace 0)
97 name: load_atomic_flat_p3_seq_cst
100 tracksRegLiveness: true
104 liveins: $vgpr0_vgpr1
106 ; GFX7-LABEL: name: load_atomic_flat_p3_seq_cst
107 ; GFX7: liveins: $vgpr0_vgpr1
109 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
110 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p0) :: (load seq_cst (p3))
111 ; GFX7-NEXT: $vgpr0 = COPY [[LOAD]](p3)
113 ; GFX9-LABEL: name: load_atomic_flat_p3_seq_cst
114 ; GFX9: liveins: $vgpr0_vgpr1
116 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
117 ; GFX9-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p0) :: (load seq_cst (p3))
118 ; GFX9-NEXT: $vgpr0 = COPY [[LOAD]](p3)
120 ; GFX10-LABEL: name: load_atomic_flat_p3_seq_cst
121 ; GFX10: liveins: $vgpr0_vgpr1
123 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
124 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p0) :: (load seq_cst (p3))
125 ; GFX10-NEXT: $vgpr0 = COPY [[LOAD]](p3)
127 ; GFX11-LABEL: name: load_atomic_flat_p3_seq_cst
128 ; GFX11: liveins: $vgpr0_vgpr1
130 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
131 ; GFX11-NEXT: [[LOAD:%[0-9]+]]:vgpr_32(p3) = G_LOAD [[COPY]](p0) :: (load seq_cst (p3))
132 ; GFX11-NEXT: $vgpr0 = COPY [[LOAD]](p3)
133 %0:vgpr(p0) = COPY $vgpr0_vgpr1
134 %1:vgpr(p3) = G_LOAD %0 :: (load seq_cst (p3), align 4, addrspace 0)
141 name: load_atomic_flat_s64_seq_cst
143 regBankSelected: true
144 tracksRegLiveness: true
148 liveins: $vgpr0_vgpr1
150 ; GFX7-LABEL: name: load_atomic_flat_s64_seq_cst
151 ; GFX7: liveins: $vgpr0_vgpr1
153 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
154 ; GFX7-NEXT: [[FLAT_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = FLAT_LOAD_DWORDX2 [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s64))
155 ; GFX7-NEXT: $vgpr0_vgpr1 = COPY [[FLAT_LOAD_DWORDX2_]]
157 ; GFX9-LABEL: name: load_atomic_flat_s64_seq_cst
158 ; GFX9: liveins: $vgpr0_vgpr1
160 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
161 ; GFX9-NEXT: [[FLAT_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = FLAT_LOAD_DWORDX2 [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s64))
162 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[FLAT_LOAD_DWORDX2_]]
164 ; GFX10-LABEL: name: load_atomic_flat_s64_seq_cst
165 ; GFX10: liveins: $vgpr0_vgpr1
167 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
168 ; GFX10-NEXT: [[FLAT_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = FLAT_LOAD_DWORDX2 [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s64))
169 ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[FLAT_LOAD_DWORDX2_]]
171 ; GFX11-LABEL: name: load_atomic_flat_s64_seq_cst
172 ; GFX11: liveins: $vgpr0_vgpr1
174 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
175 ; GFX11-NEXT: [[FLAT_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = FLAT_LOAD_DWORDX2 [[COPY]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s64))
176 ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[FLAT_LOAD_DWORDX2_]]
177 %0:vgpr(p0) = COPY $vgpr0_vgpr1
178 %1:vgpr(s64) = G_LOAD %0 :: (load seq_cst (s64), align 8, addrspace 0)
179 $vgpr0_vgpr1 = COPY %1
185 name: load_atomic_flat_v2s32_seq_cst
187 regBankSelected: true
188 tracksRegLiveness: true
192 liveins: $vgpr0_vgpr1
194 ; GFX7-LABEL: name: load_atomic_flat_v2s32_seq_cst
195 ; GFX7: liveins: $vgpr0_vgpr1
197 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
198 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<2 x s32>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s32>))
199 ; GFX7-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>)
201 ; GFX9-LABEL: name: load_atomic_flat_v2s32_seq_cst
202 ; GFX9: liveins: $vgpr0_vgpr1
204 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
205 ; GFX9-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<2 x s32>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s32>))
206 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>)
208 ; GFX10-LABEL: name: load_atomic_flat_v2s32_seq_cst
209 ; GFX10: liveins: $vgpr0_vgpr1
211 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
212 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<2 x s32>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s32>))
213 ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>)
215 ; GFX11-LABEL: name: load_atomic_flat_v2s32_seq_cst
216 ; GFX11: liveins: $vgpr0_vgpr1
218 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
219 ; GFX11-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<2 x s32>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<2 x s32>))
220 ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>)
221 %0:vgpr(p0) = COPY $vgpr0_vgpr1
222 %1:vgpr(<2 x s32>) = G_LOAD %0 :: (load seq_cst (<2 x s32>), align 8, addrspace 0)
223 $vgpr0_vgpr1 = COPY %1
229 name: load_atomic_flat_v4s16_seq_cst
231 regBankSelected: true
232 tracksRegLiveness: true
236 liveins: $vgpr0_vgpr1
238 ; GFX7-LABEL: name: load_atomic_flat_v4s16_seq_cst
239 ; GFX7: liveins: $vgpr0_vgpr1
241 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
242 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<4 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<4 x s16>))
243 ; GFX7-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<4 x s16>)
245 ; GFX9-LABEL: name: load_atomic_flat_v4s16_seq_cst
246 ; GFX9: liveins: $vgpr0_vgpr1
248 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
249 ; GFX9-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<4 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<4 x s16>))
250 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<4 x s16>)
252 ; GFX10-LABEL: name: load_atomic_flat_v4s16_seq_cst
253 ; GFX10: liveins: $vgpr0_vgpr1
255 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
256 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<4 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<4 x s16>))
257 ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<4 x s16>)
259 ; GFX11-LABEL: name: load_atomic_flat_v4s16_seq_cst
260 ; GFX11: liveins: $vgpr0_vgpr1
262 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
263 ; GFX11-NEXT: [[LOAD:%[0-9]+]]:vreg_64(<4 x s16>) = G_LOAD [[COPY]](p0) :: (load seq_cst (<4 x s16>))
264 ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](<4 x s16>)
265 %0:vgpr(p0) = COPY $vgpr0_vgpr1
266 %1:vgpr(<4 x s16>) = G_LOAD %0 :: (load seq_cst (<4 x s16>), align 8, addrspace 0)
267 $vgpr0_vgpr1 = COPY %1
273 name: load_atomic_flat_p1_seq_cst
275 regBankSelected: true
276 tracksRegLiveness: true
280 liveins: $vgpr0_vgpr1
282 ; GFX7-LABEL: name: load_atomic_flat_p1_seq_cst
283 ; GFX7: liveins: $vgpr0_vgpr1
285 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
286 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p0) :: (load seq_cst (p1))
287 ; GFX7-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
289 ; GFX9-LABEL: name: load_atomic_flat_p1_seq_cst
290 ; GFX9: liveins: $vgpr0_vgpr1
292 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
293 ; GFX9-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p0) :: (load seq_cst (p1))
294 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
296 ; GFX10-LABEL: name: load_atomic_flat_p1_seq_cst
297 ; GFX10: liveins: $vgpr0_vgpr1
299 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
300 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p0) :: (load seq_cst (p1))
301 ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
303 ; GFX11-LABEL: name: load_atomic_flat_p1_seq_cst
304 ; GFX11: liveins: $vgpr0_vgpr1
306 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
307 ; GFX11-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p1) = G_LOAD [[COPY]](p0) :: (load seq_cst (p1))
308 ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p1)
309 %0:vgpr(p0) = COPY $vgpr0_vgpr1
310 %1:vgpr(p1) = G_LOAD %0 :: (load seq_cst (p1), align 8, addrspace 0)
311 $vgpr0_vgpr1 = COPY %1
317 name: load_atomic_flat_p0_seq_cst
319 regBankSelected: true
320 tracksRegLiveness: true
324 liveins: $vgpr0_vgpr1
326 ; GFX7-LABEL: name: load_atomic_flat_p0_seq_cst
327 ; GFX7: liveins: $vgpr0_vgpr1
329 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
330 ; GFX7-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p0) = G_LOAD [[COPY]](p0) :: (load seq_cst (p0))
331 ; GFX7-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p0)
333 ; GFX9-LABEL: name: load_atomic_flat_p0_seq_cst
334 ; GFX9: liveins: $vgpr0_vgpr1
336 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
337 ; GFX9-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p0) = G_LOAD [[COPY]](p0) :: (load seq_cst (p0))
338 ; GFX9-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p0)
340 ; GFX10-LABEL: name: load_atomic_flat_p0_seq_cst
341 ; GFX10: liveins: $vgpr0_vgpr1
343 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
344 ; GFX10-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p0) = G_LOAD [[COPY]](p0) :: (load seq_cst (p0))
345 ; GFX10-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p0)
347 ; GFX11-LABEL: name: load_atomic_flat_p0_seq_cst
348 ; GFX11: liveins: $vgpr0_vgpr1
350 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(p0) = COPY $vgpr0_vgpr1
351 ; GFX11-NEXT: [[LOAD:%[0-9]+]]:vreg_64(p0) = G_LOAD [[COPY]](p0) :: (load seq_cst (p0))
352 ; GFX11-NEXT: $vgpr0_vgpr1 = COPY [[LOAD]](p0)
353 %0:vgpr(p0) = COPY $vgpr0_vgpr1
354 %1:vgpr(p0) = G_LOAD %0 :: (load seq_cst (p0), align 8, addrspace 0)
355 $vgpr0_vgpr1 = COPY %1
361 name: load_atomic_flat_s32_seq_cst_gep_m2048
363 regBankSelected: true
364 tracksRegLiveness: true
368 liveins: $vgpr0_vgpr1
370 ; GFX7-LABEL: name: load_atomic_flat_s32_seq_cst_gep_m2048
371 ; GFX7: liveins: $vgpr0_vgpr1
373 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
374 ; GFX7-NEXT: [[V_MOV_B:%[0-9]+]]:vreg_64 = V_MOV_B64_PSEUDO -2048, implicit $exec
375 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
376 ; GFX7-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub0
377 ; GFX7-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
378 ; GFX7-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub1
379 ; GFX7-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY1]], [[COPY2]], 0, implicit $exec
380 ; GFX7-NEXT: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, dead [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADDC_U32_e64 [[COPY3]], [[COPY4]], killed [[V_ADD_CO_U32_e64_1]], 0, implicit $exec
381 ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_CO_U32_e64_]], %subreg.sub0, [[V_ADDC_U32_e64_]], %subreg.sub1
382 ; GFX7-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[REG_SEQUENCE]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
383 ; GFX7-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
385 ; GFX9-LABEL: name: load_atomic_flat_s32_seq_cst_gep_m2048
386 ; GFX9: liveins: $vgpr0_vgpr1
388 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
389 ; GFX9-NEXT: [[V_MOV_B:%[0-9]+]]:vreg_64 = V_MOV_B64_PSEUDO -2048, implicit $exec
390 ; GFX9-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
391 ; GFX9-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub0
392 ; GFX9-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
393 ; GFX9-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub1
394 ; GFX9-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY1]], [[COPY2]], 0, implicit $exec
395 ; GFX9-NEXT: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, dead [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADDC_U32_e64 [[COPY3]], [[COPY4]], killed [[V_ADD_CO_U32_e64_1]], 0, implicit $exec
396 ; GFX9-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_CO_U32_e64_]], %subreg.sub0, [[V_ADDC_U32_e64_]], %subreg.sub1
397 ; GFX9-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[REG_SEQUENCE]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
398 ; GFX9-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
400 ; GFX10-LABEL: name: load_atomic_flat_s32_seq_cst_gep_m2048
401 ; GFX10: liveins: $vgpr0_vgpr1
403 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
404 ; GFX10-NEXT: [[V_MOV_B:%[0-9]+]]:vreg_64 = V_MOV_B64_PSEUDO -2048, implicit $exec
405 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
406 ; GFX10-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub0
407 ; GFX10-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
408 ; GFX10-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub1
409 ; GFX10-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADD_CO_U32_e64 [[COPY1]], [[COPY2]], 0, implicit $exec
410 ; GFX10-NEXT: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, dead [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADDC_U32_e64 [[COPY3]], [[COPY4]], killed [[V_ADD_CO_U32_e64_1]], 0, implicit $exec
411 ; GFX10-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_CO_U32_e64_]], %subreg.sub0, [[V_ADDC_U32_e64_]], %subreg.sub1
412 ; GFX10-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[REG_SEQUENCE]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
413 ; GFX10-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
415 ; GFX11-LABEL: name: load_atomic_flat_s32_seq_cst_gep_m2048
416 ; GFX11: liveins: $vgpr0_vgpr1
418 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
419 ; GFX11-NEXT: [[V_MOV_B:%[0-9]+]]:vreg_64 = V_MOV_B64_PSEUDO -2048, implicit $exec
420 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
421 ; GFX11-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub0
422 ; GFX11-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
423 ; GFX11-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub1
424 ; GFX11-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADD_CO_U32_e64 [[COPY1]], [[COPY2]], 0, implicit $exec
425 ; GFX11-NEXT: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, dead [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADDC_U32_e64 [[COPY3]], [[COPY4]], killed [[V_ADD_CO_U32_e64_1]], 0, implicit $exec
426 ; GFX11-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_CO_U32_e64_]], %subreg.sub0, [[V_ADDC_U32_e64_]], %subreg.sub1
427 ; GFX11-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[REG_SEQUENCE]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
428 ; GFX11-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
429 %0:vgpr(p0) = COPY $vgpr0_vgpr1
430 %1:vgpr(s64) = G_CONSTANT i64 -2048
431 %2:vgpr(p0) = G_PTR_ADD %0, %1
432 %3:vgpr(s32) = G_LOAD %2 :: (load seq_cst (s32), align 4, addrspace 0)
439 name: load_atomic_flat_s32_seq_cst_gep_4095
441 regBankSelected: true
442 tracksRegLiveness: true
446 liveins: $vgpr0_vgpr1
448 ; GFX7-LABEL: name: load_atomic_flat_s32_seq_cst_gep_4095
449 ; GFX7: liveins: $vgpr0_vgpr1
451 ; GFX7-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
452 ; GFX7-NEXT: [[V_MOV_B:%[0-9]+]]:vreg_64 = V_MOV_B64_PSEUDO 4095, implicit $exec
453 ; GFX7-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
454 ; GFX7-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub0
455 ; GFX7-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
456 ; GFX7-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub1
457 ; GFX7-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_CO_U32_e64 [[COPY1]], [[COPY2]], 0, implicit $exec
458 ; GFX7-NEXT: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, dead [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADDC_U32_e64 [[COPY3]], [[COPY4]], killed [[V_ADD_CO_U32_e64_1]], 0, implicit $exec
459 ; GFX7-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_CO_U32_e64_]], %subreg.sub0, [[V_ADDC_U32_e64_]], %subreg.sub1
460 ; GFX7-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[REG_SEQUENCE]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
461 ; GFX7-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
463 ; GFX9-LABEL: name: load_atomic_flat_s32_seq_cst_gep_4095
464 ; GFX9: liveins: $vgpr0_vgpr1
466 ; GFX9-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
467 ; GFX9-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[COPY]], 4095, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
468 ; GFX9-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
470 ; GFX10-LABEL: name: load_atomic_flat_s32_seq_cst_gep_4095
471 ; GFX10: liveins: $vgpr0_vgpr1
473 ; GFX10-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
474 ; GFX10-NEXT: [[V_MOV_B:%[0-9]+]]:vreg_64 = V_MOV_B64_PSEUDO 4095, implicit $exec
475 ; GFX10-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0
476 ; GFX10-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub0
477 ; GFX10-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1
478 ; GFX10-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[V_MOV_B]].sub1
479 ; GFX10-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADD_CO_U32_e64 [[COPY1]], [[COPY2]], 0, implicit $exec
480 ; GFX10-NEXT: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, dead [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADDC_U32_e64 [[COPY3]], [[COPY4]], killed [[V_ADD_CO_U32_e64_1]], 0, implicit $exec
481 ; GFX10-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_CO_U32_e64_]], %subreg.sub0, [[V_ADDC_U32_e64_]], %subreg.sub1
482 ; GFX10-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[REG_SEQUENCE]], 0, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
483 ; GFX10-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
485 ; GFX11-LABEL: name: load_atomic_flat_s32_seq_cst_gep_4095
486 ; GFX11: liveins: $vgpr0_vgpr1
488 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
489 ; GFX11-NEXT: [[FLAT_LOAD_DWORD:%[0-9]+]]:vgpr_32 = FLAT_LOAD_DWORD [[COPY]], 4095, 0, implicit $exec, implicit $flat_scr :: (load seq_cst (s32))
490 ; GFX11-NEXT: $vgpr0 = COPY [[FLAT_LOAD_DWORD]]
491 %0:vgpr(p0) = COPY $vgpr0_vgpr1
492 %1:vgpr(s64) = G_CONSTANT i64 4095
493 %2:vgpr(p0) = G_PTR_ADD %0, %1
494 %3:vgpr(s32) = G_LOAD %2 :: (load seq_cst (s32), align 4, addrspace 0)