1 # RUN: llc -mtriple=amdgcn -mcpu=gfx803 -run-pass si-memory-legalizer %s -o - | FileCheck -check-prefix=GCN %s
5 # GCN-LABEL: name: load_singlethread_unordered
11 # GCN: FLAT_STORE_DWORD
13 name: load_singlethread_unordered
16 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
17 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
19 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
20 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("singlethread-one-as") unordered (s32) from `ptr addrspace(3) undef`)
21 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
22 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
23 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
29 # GCN-LABEL: name: load_singlethread_monotonic
35 # GCN: FLAT_STORE_DWORD
37 name: load_singlethread_monotonic
40 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
41 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
43 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
44 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("singlethread-one-as") monotonic (s32) from `ptr addrspace(3) undef`)
45 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
46 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
47 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
53 # GCN-LABEL: name: load_singlethread_acquire
59 # GCN: FLAT_STORE_DWORD
61 name: load_singlethread_acquire
64 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
65 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
67 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
68 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("singlethread-one-as") acquire (s32) from `ptr addrspace(3) undef`)
69 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
70 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
71 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
77 # GCN-LABEL: name: load_singlethread_seq_cst
83 # GCN: FLAT_STORE_DWORD
85 name: load_singlethread_seq_cst
88 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
89 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
91 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
92 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("singlethread-one-as") seq_cst (s32) from `ptr addrspace(3) undef`)
93 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
94 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
95 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
101 # GCN-LABEL: name: load_wavefront_unordered
107 # GCN: FLAT_STORE_DWORD
109 name: load_wavefront_unordered
112 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
113 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
115 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
116 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("wavefront-one-as") unordered (s32) from `ptr addrspace(3) undef`)
117 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
118 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
119 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
125 # GCN-LABEL: name: load_wavefront_monotonic
131 # GCN: FLAT_STORE_DWORD
133 name: load_wavefront_monotonic
136 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
137 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
139 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
140 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("wavefront-one-as") monotonic (s32) from `ptr addrspace(3) undef`)
141 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
142 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
143 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
149 # GCN-LABEL: name: load_wavefront_acquire
155 # GCN: FLAT_STORE_DWORD
157 name: load_wavefront_acquire
160 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
161 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
163 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
164 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("wavefront-one-as") acquire (s32) from `ptr addrspace(3) undef`)
165 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
166 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
167 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
173 # GCN-LABEL: name: load_wavefront_seq_cst
179 # GCN: FLAT_STORE_DWORD
181 name: load_wavefront_seq_cst
184 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
185 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
187 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
188 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("wavefront-one-as") seq_cst (s32) from `ptr addrspace(3) undef`)
189 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
190 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
191 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
197 # GCN-LABEL: name: load_workgroup_unordered
203 # GCN: FLAT_STORE_DWORD
205 name: load_workgroup_unordered
208 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
209 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
211 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
212 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("workgroup-one-as") unordered (s32) from `ptr addrspace(3) undef`)
213 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
214 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
215 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
221 # GCN-LABEL: name: load_workgroup_monotonic
227 # GCN: FLAT_STORE_DWORD
229 name: load_workgroup_monotonic
232 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
233 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
235 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
236 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("workgroup-one-as") monotonic (s32) from `ptr addrspace(3) undef`)
237 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
238 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
239 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
245 # GCN-LABEL: name: load_workgroup_acquire
251 # GCN: FLAT_STORE_DWORD
253 name: load_workgroup_acquire
256 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
257 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
259 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
260 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("workgroup-one-as") acquire (s32) from `ptr addrspace(3) undef`)
261 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
262 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
263 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
269 # GCN-LABEL: name: load_workgroup_seq_cst
275 # GCN: FLAT_STORE_DWORD
277 name: load_workgroup_seq_cst
280 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
281 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
283 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
284 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("workgroup-one-as") seq_cst (s32) from `ptr addrspace(3) undef`)
285 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
286 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
287 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
293 # GCN-LABEL: name: load_agent_unordered
299 # GCN: FLAT_STORE_DWORD
301 name: load_agent_unordered
304 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
305 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
307 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
308 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("agent-one-as") unordered (s32) from `ptr addrspace(3) undef`)
309 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
310 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
311 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
317 # GCN-LABEL: name: load_agent_monotonic
323 # GCN: FLAT_STORE_DWORD
325 name: load_agent_monotonic
328 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
329 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
331 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
332 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("agent-one-as") monotonic (s32) from `ptr addrspace(3) undef`)
333 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
334 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
335 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
341 # GCN-LABEL: name: load_agent_acquire
347 # GCN: FLAT_STORE_DWORD
349 name: load_agent_acquire
352 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
353 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
355 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
356 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("agent-one-as") acquire (s32) from `ptr addrspace(3) undef`)
357 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
358 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
359 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
365 # GCN-LABEL: name: load_agent_seq_cst
371 # GCN: FLAT_STORE_DWORD
373 name: load_agent_seq_cst
376 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
377 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
379 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
380 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("agent-one-as") seq_cst (s32) from `ptr addrspace(3) undef`)
381 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
382 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
383 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
389 # GCN-LABEL: name: load_system_unordered
395 # GCN: FLAT_STORE_DWORD
397 name: load_system_unordered
400 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
401 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
403 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
404 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("one-as") unordered (s32) from `ptr addrspace(3) undef`)
405 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
406 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
407 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
413 # GCN-LABEL: name: load_system_monotonic
419 # GCN: FLAT_STORE_DWORD
421 name: load_system_monotonic
424 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
425 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
427 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
428 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("one-as") monotonic (s32) from `ptr addrspace(3) undef`)
429 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
430 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
431 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
437 # GCN-LABEL: name: load_system_acquire
443 # GCN: FLAT_STORE_DWORD
445 name: load_system_acquire
448 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
449 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
451 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
452 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("one-as") acquire (s32) from `ptr addrspace(3) undef`)
453 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
454 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
455 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
461 # GCN-LABEL: name: load_system_seq_cst
467 # GCN: FLAT_STORE_DWORD
469 name: load_system_seq_cst
472 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
473 $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load (s64) from `ptr addrspace(4) undef`, align 4, addrspace 4)
475 $vgpr0 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
476 renamable $vgpr2 = DS_READ_B32 killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec :: (volatile load syncscope("one-as") seq_cst (s32) from `ptr addrspace(3) undef`)
477 $vgpr0 = V_MOV_B32_e32 $sgpr0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $sgpr0_sgpr1
478 $vgpr1 = V_MOV_B32_e32 killed $sgpr1, implicit $exec, implicit $sgpr0_sgpr1, implicit $exec
479 FLAT_STORE_DWORD killed renamable $vgpr0_vgpr1, killed renamable $vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr undef`)
485 # GCN-LABEL: name: store_singlethread_unordered
493 name: store_singlethread_unordered
496 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
497 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
499 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
500 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
501 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") unordered (s32) into `ptr addrspace(3) undef`)
507 # GCN-LABEL: name: store_singlethread_monotonic
515 name: store_singlethread_monotonic
518 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
519 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
521 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
522 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
523 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") monotonic (s32) into `ptr addrspace(3) undef`)
529 # GCN-LABEL: name: store_singlethread_release
537 name: store_singlethread_release
540 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
541 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
543 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
544 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
545 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") release (s32) into `ptr addrspace(3) undef`)
551 # GCN-LABEL: name: store_singlethread_seq_cst
559 name: store_singlethread_seq_cst
562 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
563 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
565 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
566 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
567 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") seq_cst (s32) into `ptr addrspace(3) undef`)
573 # GCN-LABEL: name: store_wavefront_unordered
581 name: store_wavefront_unordered
584 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
585 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
587 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
588 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
589 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront-one-as") unordered (s32) into `ptr addrspace(3) undef`)
595 # GCN-LABEL: name: store_wavefront_monotonic
603 name: store_wavefront_monotonic
606 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
607 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
609 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
610 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
611 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront-one-as") monotonic (s32) into `ptr addrspace(3) undef`)
617 # GCN-LABEL: name: store_wavefront_release
625 name: store_wavefront_release
628 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
629 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
631 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
632 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
633 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront-one-as") release (s32) into `ptr addrspace(3) undef`)
639 # GCN-LABEL: name: store_wavefront_seq_cst
647 name: store_wavefront_seq_cst
650 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
651 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
653 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
654 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
655 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("wavefront-one-as") seq_cst (s32) into `ptr addrspace(3) undef`)
661 # GCN-LABEL: name: store_workgroup_unordered
669 name: store_workgroup_unordered
672 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
673 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
675 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
676 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
677 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup-one-as") unordered (s32) into `ptr addrspace(3) undef`)
683 # GCN-LABEL: name: store_workgroup_monotonic
691 name: store_workgroup_monotonic
694 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
695 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
697 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
698 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
699 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup-one-as") monotonic (s32) into `ptr addrspace(3) undef`)
705 # GCN-LABEL: name: store_workgroup_release
713 name: store_workgroup_release
716 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
717 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
719 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
720 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
721 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup-one-as") release (s32) into `ptr addrspace(3) undef`)
727 # GCN-LABEL: name: store_workgroup_seq_cst
735 name: store_workgroup_seq_cst
738 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
739 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
741 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
742 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
743 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("workgroup-one-as") seq_cst (s32) into `ptr addrspace(3) undef`)
749 # GCN-LABEL: name: store_agent_unordered
757 name: store_agent_unordered
760 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
761 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
763 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
764 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
765 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent-one-as") unordered (s32) into `ptr addrspace(3) undef`)
771 # GCN-LABEL: name: store_agent_monotonic
779 name: store_agent_monotonic
782 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
783 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
785 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
786 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
787 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent-one-as") monotonic (s32) into `ptr addrspace(3) undef`)
793 # GCN-LABEL: name: store_agent_release
801 name: store_agent_release
804 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
805 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
807 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
808 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
809 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent-one-as") release (s32) into `ptr addrspace(3) undef`)
815 # GCN-LABEL: name: store_agent_seq_cst
823 name: store_agent_seq_cst
826 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
827 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
829 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
830 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
831 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("agent-one-as") seq_cst (s32) into `ptr addrspace(3) undef`)
837 # GCN-LABEL: name: store_system_unordered
845 name: store_system_unordered
848 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
849 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
851 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
852 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
853 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("one-as") unordered (s32) into `ptr addrspace(3) undef`)
859 # GCN-LABEL: name: store_system_monotonic
867 name: store_system_monotonic
870 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
871 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
873 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
874 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
875 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("one-as") monotonic (s32) into `ptr addrspace(3) undef`)
881 # GCN-LABEL: name: store_system_release
889 name: store_system_release
892 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
893 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
895 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
896 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
897 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("one-as") release (s32) into `ptr addrspace(3) undef`)
903 # GCN-LABEL: name: store_system_seq_cst
911 name: store_system_seq_cst
914 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
915 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
917 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
918 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
919 DS_WRITE_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("one-as") seq_cst (s32) into `ptr addrspace(3) undef`)
925 # GCN-LABEL: name: atomicrmw_singlethread_unordered
929 # GCN: DS_WRXCHG_RTN_B32
933 name: atomicrmw_singlethread_unordered
936 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
937 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
939 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
940 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
941 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") unordered (s32) into `ptr addrspace(3) undef`)
947 # GCN-LABEL: name: atomicrmw_singlethread_monotonic
951 # GCN: DS_WRXCHG_RTN_B32
955 name: atomicrmw_singlethread_monotonic
958 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
959 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
961 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
962 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
963 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") monotonic (s32) into `ptr addrspace(3) undef`)
969 # GCN-LABEL: name: atomicrmw_singlethread_acquire
973 # GCN: DS_WRXCHG_RTN_B32
977 name: atomicrmw_singlethread_acquire
980 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
981 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
983 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
984 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
985 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") acquire (s32) into `ptr addrspace(3) undef`)
991 # GCN-LABEL: name: atomicrmw_singlethread_release
995 # GCN: DS_WRXCHG_RTN_B32
999 name: atomicrmw_singlethread_release
1002 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
1003 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
1005 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
1006 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
1007 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") release (s32) into `ptr addrspace(3) undef`)
1013 # GCN-LABEL: name: atomicrmw_singlethread_acq_rel
1016 # GCN-NOT: S_WAITCNT
1017 # GCN: DS_WRXCHG_RTN_B32
1018 # GCN-NOT: S_WAITCNT
1021 name: atomicrmw_singlethread_acq_rel
1024 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
1025 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
1027 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
1028 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
1029 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") acq_rel (s32) into `ptr addrspace(3) undef`)
1035 # GCN-LABEL: name: atomicrmw_singlethread_seq_cst
1038 # GCN-NOT: S_WAITCNT
1039 # GCN: DS_WRXCHG_RTN_B32
1040 # GCN-NOT: S_WAITCNT
1043 name: atomicrmw_singlethread_seq_cst
1046 $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, addrspace 4)
1047 $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load (s32) from `ptr addrspace(4) undef`, align 8, addrspace 4)
1049 $vgpr1 = V_MOV_B32_e32 killed $sgpr2, implicit $exec, implicit $exec
1050 $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
1051 $vgpr2 = DS_WRXCHG_RTN_B32 killed renamable $vgpr0, killed renamable $vgpr1, 0, 0, implicit $m0, implicit $exec :: (volatile store syncscope("singlethread-one-as") seq_cst (s32) into `ptr addrspace(3) undef`)