• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -march=amdgcn -mcpu=gfx803 -run-pass si-memory-legalizer %s -o - | FileCheck -check-prefix=GCN %s
2
3---
4
5# GCN-LABEL: name: load_singlethread_unordered
6
7# GCN-LABEL: bb.0:
8# GCN-NOT:   S_WAITCNT
9# GCN:       DS_READ_B32
10# GCN-NOT:   S_WAITCNT
11# GCN:       FLAT_STORE_DWORD
12
13name:            load_singlethread_unordered
14body:             |
15  bb.0:
16    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
17    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
18    $m0 = S_MOV_B32 -1
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") unordered 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
24    S_ENDPGM
25
26...
27---
28
29# GCN-LABEL: name: load_singlethread_monotonic
30
31# GCN-LABEL: bb.0:
32# GCN-NOT:   S_WAITCNT
33# GCN:       DS_READ_B32
34# GCN-NOT:   S_WAITCNT
35# GCN:       FLAT_STORE_DWORD
36
37name:            load_singlethread_monotonic
38body:             |
39  bb.0:
40    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
41    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
42    $m0 = S_MOV_B32 -1
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") monotonic 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
48    S_ENDPGM
49
50...
51---
52
53# GCN-LABEL: name: load_singlethread_acquire
54
55# GCN-LABEL: bb.0:
56# GCN-NOT:   S_WAITCNT
57# GCN:       DS_READ_B32
58# GCN-NOT:   S_WAITCNT
59# GCN:       FLAT_STORE_DWORD
60
61name:            load_singlethread_acquire
62body:             |
63  bb.0:
64    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
65    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
66    $m0 = S_MOV_B32 -1
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") acquire 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
72    S_ENDPGM
73
74...
75---
76
77# GCN-LABEL: name: load_singlethread_seq_cst
78
79# GCN-LABEL: bb.0:
80# GCN-NOT:   S_WAITCNT
81# GCN:       DS_READ_B32
82# GCN-NOT:   S_WAITCNT
83# GCN:       FLAT_STORE_DWORD
84
85name:            load_singlethread_seq_cst
86body:             |
87  bb.0:
88    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
89    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
90    $m0 = S_MOV_B32 -1
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") seq_cst 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
96    S_ENDPGM
97
98...
99---
100
101# GCN-LABEL: name: load_wavefront_unordered
102
103# GCN-LABEL: bb.0:
104# GCN-NOT:   S_WAITCNT
105# GCN:       DS_READ_B32
106# GCN-NOT:   S_WAITCNT
107# GCN:       FLAT_STORE_DWORD
108
109name:            load_wavefront_unordered
110body:             |
111  bb.0:
112    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
113    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
114    $m0 = S_MOV_B32 -1
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") unordered 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
120    S_ENDPGM
121
122...
123---
124
125# GCN-LABEL: name: load_wavefront_monotonic
126
127# GCN-LABEL: bb.0:
128# GCN-NOT:   S_WAITCNT
129# GCN:       DS_READ_B32
130# GCN-NOT:   S_WAITCNT
131# GCN:       FLAT_STORE_DWORD
132
133name:            load_wavefront_monotonic
134body:             |
135  bb.0:
136    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
137    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
138    $m0 = S_MOV_B32 -1
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") monotonic 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
144    S_ENDPGM
145
146...
147---
148
149# GCN-LABEL: name: load_wavefront_acquire
150
151# GCN-LABEL: bb.0:
152# GCN-NOT:   S_WAITCNT
153# GCN:       DS_READ_B32
154# GCN-NOT:   S_WAITCNT
155# GCN:       FLAT_STORE_DWORD
156
157name:            load_wavefront_acquire
158body:             |
159  bb.0:
160    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
161    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
162    $m0 = S_MOV_B32 -1
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") acquire 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
168    S_ENDPGM
169
170...
171---
172
173# GCN-LABEL: name: load_wavefront_seq_cst
174
175# GCN-LABEL: bb.0:
176# GCN-NOT:   S_WAITCNT
177# GCN:       DS_READ_B32
178# GCN-NOT:   S_WAITCNT
179# GCN:       FLAT_STORE_DWORD
180
181name:            load_wavefront_seq_cst
182body:             |
183  bb.0:
184    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
185    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
186    $m0 = S_MOV_B32 -1
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") seq_cst 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
192    S_ENDPGM
193
194...
195---
196
197# GCN-LABEL: name: load_workgroup_unordered
198
199# GCN-LABEL: bb.0:
200# GCN-NOT:   S_WAITCNT
201# GCN:       DS_READ_B32
202# GCN-NOT:   S_WAITCNT
203# GCN:       FLAT_STORE_DWORD
204
205name:            load_workgroup_unordered
206body:             |
207  bb.0:
208    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
209    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
210    $m0 = S_MOV_B32 -1
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") unordered 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
216    S_ENDPGM
217
218...
219---
220
221# GCN-LABEL: name: load_workgroup_monotonic
222
223# GCN-LABEL: bb.0:
224# GCN-NOT:   S_WAITCNT
225# GCN:       DS_READ_B32
226# GCN-NOT:   S_WAITCNT
227# GCN:       FLAT_STORE_DWORD
228
229name:            load_workgroup_monotonic
230body:             |
231  bb.0:
232    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
233    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
234    $m0 = S_MOV_B32 -1
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") monotonic 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
240    S_ENDPGM
241
242...
243---
244
245# GCN-LABEL: name: load_workgroup_acquire
246
247# GCN-LABEL: bb.0:
248# GCN-NOT:   S_WAITCNT
249# GCN:       DS_READ_B32
250# GCN-NOT:   S_WAITCNT
251# GCN:       FLAT_STORE_DWORD
252
253name:            load_workgroup_acquire
254body:             |
255  bb.0:
256    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
257    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
258    $m0 = S_MOV_B32 -1
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") acquire 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
264    S_ENDPGM
265
266...
267---
268
269# GCN-LABEL: name: load_workgroup_seq_cst
270
271# GCN-LABEL: bb.0:
272# GCN-NOT:   S_WAITCNT
273# GCN:       DS_READ_B32
274# GCN-NOT:   S_WAITCNT
275# GCN:       FLAT_STORE_DWORD
276
277name:            load_workgroup_seq_cst
278body:             |
279  bb.0:
280    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
281    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
282    $m0 = S_MOV_B32 -1
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") seq_cst 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
288    S_ENDPGM
289
290...
291---
292
293# GCN-LABEL: name: load_agent_unordered
294
295# GCN-LABEL: bb.0:
296# GCN-NOT:   S_WAITCNT
297# GCN:       DS_READ_B32
298# GCN-NOT:   S_WAITCNT
299# GCN:       FLAT_STORE_DWORD
300
301name:            load_agent_unordered
302body:             |
303  bb.0:
304    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
305    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
306    $m0 = S_MOV_B32 -1
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") unordered 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
312    S_ENDPGM
313
314...
315---
316
317# GCN-LABEL: name: load_agent_monotonic
318
319# GCN-LABEL: bb.0:
320# GCN-NOT:   S_WAITCNT
321# GCN:       DS_READ_B32
322# GCN-NOT:   S_WAITCNT
323# GCN:       FLAT_STORE_DWORD
324
325name:            load_agent_monotonic
326body:             |
327  bb.0:
328    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
329    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
330    $m0 = S_MOV_B32 -1
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") monotonic 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
336    S_ENDPGM
337
338...
339---
340
341# GCN-LABEL: name: load_agent_acquire
342
343# GCN-LABEL: bb.0:
344# GCN-NOT:   S_WAITCNT
345# GCN:       DS_READ_B32
346# GCN-NOT:   S_WAITCNT
347# GCN:       FLAT_STORE_DWORD
348
349name:            load_agent_acquire
350body:             |
351  bb.0:
352    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
353    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
354    $m0 = S_MOV_B32 -1
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") acquire 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
360    S_ENDPGM
361
362...
363---
364
365# GCN-LABEL: name: load_agent_seq_cst
366
367# GCN-LABEL: bb.0:
368# GCN-NOT:   S_WAITCNT
369# GCN:       DS_READ_B32
370# GCN-NOT:   S_WAITCNT
371# GCN:       FLAT_STORE_DWORD
372
373name:            load_agent_seq_cst
374body:             |
375  bb.0:
376    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
377    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
378    $m0 = S_MOV_B32 -1
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") seq_cst 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
384    S_ENDPGM
385
386...
387---
388
389# GCN-LABEL: name: load_system_unordered
390
391# GCN-LABEL: bb.0:
392# GCN-NOT:   S_WAITCNT
393# GCN:       DS_READ_B32
394# GCN-NOT:   S_WAITCNT
395# GCN:       FLAT_STORE_DWORD
396
397name:            load_system_unordered
398body:             |
399  bb.0:
400    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
401    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
402    $m0 = S_MOV_B32 -1
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 unordered 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
408    S_ENDPGM
409
410...
411---
412
413# GCN-LABEL: name: load_system_monotonic
414
415# GCN-LABEL: bb.0:
416# GCN-NOT:   S_WAITCNT
417# GCN:       DS_READ_B32
418# GCN-NOT:   S_WAITCNT
419# GCN:       FLAT_STORE_DWORD
420
421name:            load_system_monotonic
422body:             |
423  bb.0:
424    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
425    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
426    $m0 = S_MOV_B32 -1
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 monotonic 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
432    S_ENDPGM
433
434...
435---
436
437# GCN-LABEL: name: load_system_acquire
438
439# GCN-LABEL: bb.0:
440# GCN-NOT:   S_WAITCNT
441# GCN:       DS_READ_B32
442# GCN-NOT:   S_WAITCNT
443# GCN:       FLAT_STORE_DWORD
444
445name:            load_system_acquire
446body:             |
447  bb.0:
448    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
449    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
450    $m0 = S_MOV_B32 -1
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 acquire 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
456    S_ENDPGM
457
458...
459---
460
461# GCN-LABEL: name: load_system_seq_cst
462
463# GCN-LABEL: bb.0:
464# GCN-NOT:   S_WAITCNT
465# GCN:       DS_READ_B32
466# GCN-NOT:   S_WAITCNT
467# GCN:       FLAT_STORE_DWORD
468
469name:            load_system_seq_cst
470body:             |
471  bb.0:
472    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
473    $sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 44, 0 :: (dereferenceable invariant load 8 from `i64 addrspace(4)* undef`, align 4, addrspace 4)
474    $m0 = S_MOV_B32 -1
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 seq_cst 4 from `i32 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, 0, implicit $exec, implicit $flat_scr :: (store 4 into `i32* undef`)
480    S_ENDPGM
481
482...
483---
484
485# GCN-LABEL: name: store_singlethread_unordered
486
487# GCN-LABEL: bb.0:
488# GCN-NOT:   S_WAITCNT
489# GCN:       DS_WRITE_B32
490# GCN-NOT:   S_WAITCNT
491# GCN:       S_ENDPGM
492
493name:            store_singlethread_unordered
494body:             |
495  bb.0:
496    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
497    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
498    $m0 = S_MOV_B32 -1
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") unordered 4 into `i32 addrspace(3)* undef`)
502    S_ENDPGM
503
504...
505---
506
507# GCN-LABEL: name: store_singlethread_monotonic
508
509# GCN-LABEL: bb.0:
510# GCN-NOT:   S_WAITCNT
511# GCN:       DS_WRITE_B32
512# GCN-NOT:   S_WAITCNT
513# GCN:       S_ENDPGM
514
515name:            store_singlethread_monotonic
516body:             |
517  bb.0:
518    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
519    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
520    $m0 = S_MOV_B32 -1
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") monotonic 4 into `i32 addrspace(3)* undef`)
524    S_ENDPGM
525
526...
527---
528
529# GCN-LABEL: name: store_singlethread_release
530
531# GCN-LABEL: bb.0:
532# GCN-NOT:   S_WAITCNT
533# GCN:       DS_WRITE_B32
534# GCN-NOT:   S_WAITCNT
535# GCN:       S_ENDPGM
536
537name:            store_singlethread_release
538body:             |
539  bb.0:
540    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
541    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
542    $m0 = S_MOV_B32 -1
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") release 4 into `i32 addrspace(3)* undef`)
546    S_ENDPGM
547
548...
549---
550
551# GCN-LABEL: name: store_singlethread_seq_cst
552
553# GCN-LABEL: bb.0:
554# GCN-NOT:   S_WAITCNT
555# GCN:       DS_WRITE_B32
556# GCN-NOT:   S_WAITCNT
557# GCN:       S_ENDPGM
558
559name:            store_singlethread_seq_cst
560body:             |
561  bb.0:
562    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
563    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
564    $m0 = S_MOV_B32 -1
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") seq_cst 4 into `i32 addrspace(3)* undef`)
568    S_ENDPGM
569
570...
571---
572
573# GCN-LABEL: name: store_wavefront_unordered
574
575# GCN-LABEL: bb.0:
576# GCN-NOT:   S_WAITCNT
577# GCN:       DS_WRITE_B32
578# GCN-NOT:   S_WAITCNT
579# GCN:       S_ENDPGM
580
581name:            store_wavefront_unordered
582body:             |
583  bb.0:
584    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
585    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
586    $m0 = S_MOV_B32 -1
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") unordered 4 into `i32 addrspace(3)* undef`)
590    S_ENDPGM
591
592...
593---
594
595# GCN-LABEL: name: store_wavefront_monotonic
596
597# GCN-LABEL: bb.0:
598# GCN-NOT:   S_WAITCNT
599# GCN:       DS_WRITE_B32
600# GCN-NOT:   S_WAITCNT
601# GCN:       S_ENDPGM
602
603name:            store_wavefront_monotonic
604body:             |
605  bb.0:
606    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
607    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
608    $m0 = S_MOV_B32 -1
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") monotonic 4 into `i32 addrspace(3)* undef`)
612    S_ENDPGM
613
614...
615---
616
617# GCN-LABEL: name: store_wavefront_release
618
619# GCN-LABEL: bb.0:
620# GCN-NOT:   S_WAITCNT
621# GCN:       DS_WRITE_B32
622# GCN-NOT:   S_WAITCNT
623# GCN:       S_ENDPGM
624
625name:            store_wavefront_release
626body:             |
627  bb.0:
628    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
629    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
630    $m0 = S_MOV_B32 -1
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") release 4 into `i32 addrspace(3)* undef`)
634    S_ENDPGM
635
636...
637---
638
639# GCN-LABEL: name: store_wavefront_seq_cst
640
641# GCN-LABEL: bb.0:
642# GCN-NOT:   S_WAITCNT
643# GCN:       DS_WRITE_B32
644# GCN-NOT:   S_WAITCNT
645# GCN:       S_ENDPGM
646
647name:            store_wavefront_seq_cst
648body:             |
649  bb.0:
650    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
651    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
652    $m0 = S_MOV_B32 -1
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") seq_cst 4 into `i32 addrspace(3)* undef`)
656    S_ENDPGM
657
658...
659---
660
661# GCN-LABEL: name: store_workgroup_unordered
662
663# GCN-LABEL: bb.0:
664# GCN-NOT:   S_WAITCNT
665# GCN:       DS_WRITE_B32
666# GCN-NOT:   S_WAITCNT
667# GCN:       S_ENDPGM
668
669name:            store_workgroup_unordered
670body:             |
671  bb.0:
672    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
673    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
674    $m0 = S_MOV_B32 -1
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") unordered 4 into `i32 addrspace(3)* undef`)
678    S_ENDPGM
679
680...
681---
682
683# GCN-LABEL: name: store_workgroup_monotonic
684
685# GCN-LABEL: bb.0:
686# GCN-NOT:   S_WAITCNT
687# GCN:       DS_WRITE_B32
688# GCN-NOT:   S_WAITCNT
689# GCN:       S_ENDPGM
690
691name:            store_workgroup_monotonic
692body:             |
693  bb.0:
694    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
695    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
696    $m0 = S_MOV_B32 -1
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") monotonic 4 into `i32 addrspace(3)* undef`)
700    S_ENDPGM
701
702...
703---
704
705# GCN-LABEL: name: store_workgroup_release
706
707# GCN-LABEL: bb.0:
708# GCN-NOT:   S_WAITCNT
709# GCN:       DS_WRITE_B32
710# GCN-NOT:   S_WAITCNT
711# GCN:       S_ENDPGM
712
713name:            store_workgroup_release
714body:             |
715  bb.0:
716    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
717    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
718    $m0 = S_MOV_B32 -1
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") release 4 into `i32 addrspace(3)* undef`)
722    S_ENDPGM
723
724...
725---
726
727# GCN-LABEL: name: store_workgroup_seq_cst
728
729# GCN-LABEL: bb.0:
730# GCN-NOT:   S_WAITCNT
731# GCN:       DS_WRITE_B32
732# GCN-NOT:   S_WAITCNT
733# GCN:       S_ENDPGM
734
735name:            store_workgroup_seq_cst
736body:             |
737  bb.0:
738    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
739    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
740    $m0 = S_MOV_B32 -1
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") seq_cst 4 into `i32 addrspace(3)* undef`)
744    S_ENDPGM
745
746...
747---
748
749# GCN-LABEL: name: store_agent_unordered
750
751# GCN-LABEL: bb.0:
752# GCN-NOT:   S_WAITCNT
753# GCN:       DS_WRITE_B32
754# GCN-NOT:   S_WAITCNT
755# GCN:       S_ENDPGM
756
757name:            store_agent_unordered
758body:             |
759  bb.0:
760    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
761    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
762    $m0 = S_MOV_B32 -1
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") unordered 4 into `i32 addrspace(3)* undef`)
766    S_ENDPGM
767
768...
769---
770
771# GCN-LABEL: name: store_agent_monotonic
772
773# GCN-LABEL: bb.0:
774# GCN-NOT:   S_WAITCNT
775# GCN:       DS_WRITE_B32
776# GCN-NOT:   S_WAITCNT
777# GCN:       S_ENDPGM
778
779name:            store_agent_monotonic
780body:             |
781  bb.0:
782    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
783    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
784    $m0 = S_MOV_B32 -1
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") monotonic 4 into `i32 addrspace(3)* undef`)
788    S_ENDPGM
789
790...
791---
792
793# GCN-LABEL: name: store_agent_release
794
795# GCN-LABEL: bb.0:
796# GCN-NOT:   S_WAITCNT
797# GCN:       DS_WRITE_B32
798# GCN-NOT:   S_WAITCNT
799# GCN:       S_ENDPGM
800
801name:            store_agent_release
802body:             |
803  bb.0:
804    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
805    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
806    $m0 = S_MOV_B32 -1
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") release 4 into `i32 addrspace(3)* undef`)
810    S_ENDPGM
811
812...
813---
814
815# GCN-LABEL: name: store_agent_seq_cst
816
817# GCN-LABEL: bb.0:
818# GCN-NOT:   S_WAITCNT
819# GCN:       DS_WRITE_B32
820# GCN-NOT:   S_WAITCNT
821# GCN:       S_ENDPGM
822
823name:            store_agent_seq_cst
824body:             |
825  bb.0:
826    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
827    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
828    $m0 = S_MOV_B32 -1
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") seq_cst 4 into `i32 addrspace(3)* undef`)
832    S_ENDPGM
833
834...
835---
836
837# GCN-LABEL: name: store_system_unordered
838
839# GCN-LABEL: bb.0:
840# GCN-NOT:   S_WAITCNT
841# GCN:       DS_WRITE_B32
842# GCN-NOT:   S_WAITCNT
843# GCN:       S_ENDPGM
844
845name:            store_system_unordered
846body:             |
847  bb.0:
848    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
849    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
850    $m0 = S_MOV_B32 -1
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 unordered 4 into `i32 addrspace(3)* undef`)
854    S_ENDPGM
855
856...
857---
858
859# GCN-LABEL: name: store_system_monotonic
860
861# GCN-LABEL: bb.0:
862# GCN-NOT:   S_WAITCNT
863# GCN:       DS_WRITE_B32
864# GCN-NOT:   S_WAITCNT
865# GCN:       S_ENDPGM
866
867name:            store_system_monotonic
868body:             |
869  bb.0:
870    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
871    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
872    $m0 = S_MOV_B32 -1
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 monotonic 4 into `i32 addrspace(3)* undef`)
876    S_ENDPGM
877
878...
879---
880
881# GCN-LABEL: name: store_system_release
882
883# GCN-LABEL: bb.0:
884# GCN-NOT:   S_WAITCNT
885# GCN:       DS_WRITE_B32
886# GCN-NOT:   S_WAITCNT
887# GCN:       S_ENDPGM
888
889name:            store_system_release
890body:             |
891  bb.0:
892    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
893    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
894    $m0 = S_MOV_B32 -1
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 release 4 into `i32 addrspace(3)* undef`)
898    S_ENDPGM
899
900...
901---
902
903# GCN-LABEL: name: store_system_seq_cst
904
905# GCN-LABEL: bb.0:
906# GCN-NOT:   S_WAITCNT
907# GCN:       DS_WRITE_B32
908# GCN-NOT:   S_WAITCNT
909# GCN:       S_ENDPGM
910
911name:            store_system_seq_cst
912body:             |
913  bb.0:
914    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
915    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
916    $m0 = S_MOV_B32 -1
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 seq_cst 4 into `i32 addrspace(3)* undef`)
920    S_ENDPGM
921
922...
923---
924
925# GCN-LABEL: name: atomicrmw_singlethread_unordered
926
927# GCN-LABEL: bb.0:
928# GCN-NOT:   S_WAITCNT
929# GCN:       DS_WRXCHG_RTN_B32
930# GCN-NOT:   S_WAITCNT
931# GCN:       S_ENDPGM
932
933name:            atomicrmw_singlethread_unordered
934body:             |
935  bb.0:
936    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
937    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
938    $m0 = S_MOV_B32 -1
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") unordered 4 into `i32 addrspace(3)* undef`)
942    S_ENDPGM
943
944...
945---
946
947# GCN-LABEL: name: atomicrmw_singlethread_monotonic
948
949# GCN-LABEL: bb.0:
950# GCN-NOT:   S_WAITCNT
951# GCN:       DS_WRXCHG_RTN_B32
952# GCN-NOT:   S_WAITCNT
953# GCN:       S_ENDPGM
954
955name:            atomicrmw_singlethread_monotonic
956body:             |
957  bb.0:
958    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
959    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
960    $m0 = S_MOV_B32 -1
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") monotonic 4 into `i32 addrspace(3)* undef`)
964    S_ENDPGM
965
966...
967---
968
969# GCN-LABEL: name: atomicrmw_singlethread_acquire
970
971# GCN-LABEL: bb.0:
972# GCN-NOT:   S_WAITCNT
973# GCN:       DS_WRXCHG_RTN_B32
974# GCN-NOT:   S_WAITCNT
975# GCN:       S_ENDPGM
976
977name:            atomicrmw_singlethread_acquire
978body:             |
979  bb.0:
980    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
981    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
982    $m0 = S_MOV_B32 -1
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") acquire 4 into `i32 addrspace(3)* undef`)
986    S_ENDPGM
987
988...
989---
990
991# GCN-LABEL: name: atomicrmw_singlethread_release
992
993# GCN-LABEL: bb.0:
994# GCN-NOT:   S_WAITCNT
995# GCN:       DS_WRXCHG_RTN_B32
996# GCN-NOT:   S_WAITCNT
997# GCN:       S_ENDPGM
998
999name:            atomicrmw_singlethread_release
1000body:             |
1001  bb.0:
1002    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
1003    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
1004    $m0 = S_MOV_B32 -1
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") release 4 into `i32 addrspace(3)* undef`)
1008    S_ENDPGM
1009
1010...
1011---
1012
1013# GCN-LABEL: name: atomicrmw_singlethread_acq_rel
1014
1015# GCN-LABEL: bb.0:
1016# GCN-NOT:   S_WAITCNT
1017# GCN:       DS_WRXCHG_RTN_B32
1018# GCN-NOT:   S_WAITCNT
1019# GCN:       S_ENDPGM
1020
1021name:            atomicrmw_singlethread_acq_rel
1022body:             |
1023  bb.0:
1024    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
1025    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
1026    $m0 = S_MOV_B32 -1
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") acq_rel 4 into `i32 addrspace(3)* undef`)
1030    S_ENDPGM
1031
1032...
1033---
1034
1035# GCN-LABEL: name: atomicrmw_singlethread_seq_cst
1036
1037# GCN-LABEL: bb.0:
1038# GCN-NOT:   S_WAITCNT
1039# GCN:       DS_WRXCHG_RTN_B32
1040# GCN-NOT:   S_WAITCNT
1041# GCN:       S_ENDPGM
1042
1043name:            atomicrmw_singlethread_seq_cst
1044body:             |
1045  bb.0:
1046    $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 36, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, addrspace 4)
1047    $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 40, 0 :: (dereferenceable invariant load 4 from `i32 addrspace(4)* undef`, align 8, addrspace 4)
1048    $m0 = S_MOV_B32 -1
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") seq_cst 4 into `i32 addrspace(3)* undef`)
1052    S_ENDPGM
1053
1054...
1055