1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx600 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX6 %s
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX7 %s
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX10-WGP %s
5 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -mattr=+cumode -verify-machineinstrs < %s | FileCheck --check-prefixes=GFX10-CU %s
6 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx700 -amdgcn-skip-cache-invalidations -verify-machineinstrs < %s | FileCheck --check-prefixes=SKIP-CACHE-INV %s
7 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX90A-NOTTGSPLIT %s
8 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -mattr=+tgsplit -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX90A-TGSPLIT %s
10 define amdgpu_kernel void @singlethread_acquire_fence() {
11 ; GFX6-LABEL: singlethread_acquire_fence:
12 ; GFX6: ; %bb.0: ; %entry
15 ; GFX7-LABEL: singlethread_acquire_fence:
16 ; GFX7: ; %bb.0: ; %entry
19 ; GFX10-WGP-LABEL: singlethread_acquire_fence:
20 ; GFX10-WGP: ; %bb.0: ; %entry
21 ; GFX10-WGP-NEXT: s_endpgm
23 ; GFX10-CU-LABEL: singlethread_acquire_fence:
24 ; GFX10-CU: ; %bb.0: ; %entry
25 ; GFX10-CU-NEXT: s_endpgm
27 ; SKIP-CACHE-INV-LABEL: singlethread_acquire_fence:
28 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
29 ; SKIP-CACHE-INV-NEXT: s_endpgm
31 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_acquire_fence:
32 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
33 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
35 ; GFX90A-TGSPLIT-LABEL: singlethread_acquire_fence:
36 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
37 ; GFX90A-TGSPLIT-NEXT: s_endpgm
39 fence syncscope("singlethread") acquire
43 define amdgpu_kernel void @singlethread_release_fence() {
44 ; GFX6-LABEL: singlethread_release_fence:
45 ; GFX6: ; %bb.0: ; %entry
48 ; GFX7-LABEL: singlethread_release_fence:
49 ; GFX7: ; %bb.0: ; %entry
52 ; GFX10-WGP-LABEL: singlethread_release_fence:
53 ; GFX10-WGP: ; %bb.0: ; %entry
54 ; GFX10-WGP-NEXT: s_endpgm
56 ; GFX10-CU-LABEL: singlethread_release_fence:
57 ; GFX10-CU: ; %bb.0: ; %entry
58 ; GFX10-CU-NEXT: s_endpgm
60 ; SKIP-CACHE-INV-LABEL: singlethread_release_fence:
61 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
62 ; SKIP-CACHE-INV-NEXT: s_endpgm
64 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_release_fence:
65 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
66 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
68 ; GFX90A-TGSPLIT-LABEL: singlethread_release_fence:
69 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
70 ; GFX90A-TGSPLIT-NEXT: s_endpgm
72 fence syncscope("singlethread") release
76 define amdgpu_kernel void @singlethread_acq_rel_fence() {
77 ; GFX6-LABEL: singlethread_acq_rel_fence:
78 ; GFX6: ; %bb.0: ; %entry
81 ; GFX7-LABEL: singlethread_acq_rel_fence:
82 ; GFX7: ; %bb.0: ; %entry
85 ; GFX10-WGP-LABEL: singlethread_acq_rel_fence:
86 ; GFX10-WGP: ; %bb.0: ; %entry
87 ; GFX10-WGP-NEXT: s_endpgm
89 ; GFX10-CU-LABEL: singlethread_acq_rel_fence:
90 ; GFX10-CU: ; %bb.0: ; %entry
91 ; GFX10-CU-NEXT: s_endpgm
93 ; SKIP-CACHE-INV-LABEL: singlethread_acq_rel_fence:
94 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
95 ; SKIP-CACHE-INV-NEXT: s_endpgm
97 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_acq_rel_fence:
98 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
99 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
101 ; GFX90A-TGSPLIT-LABEL: singlethread_acq_rel_fence:
102 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
103 ; GFX90A-TGSPLIT-NEXT: s_endpgm
105 fence syncscope("singlethread") acq_rel
109 define amdgpu_kernel void @singlethread_seq_cst_fence() {
110 ; GFX6-LABEL: singlethread_seq_cst_fence:
111 ; GFX6: ; %bb.0: ; %entry
112 ; GFX6-NEXT: s_endpgm
114 ; GFX7-LABEL: singlethread_seq_cst_fence:
115 ; GFX7: ; %bb.0: ; %entry
116 ; GFX7-NEXT: s_endpgm
118 ; GFX10-WGP-LABEL: singlethread_seq_cst_fence:
119 ; GFX10-WGP: ; %bb.0: ; %entry
120 ; GFX10-WGP-NEXT: s_endpgm
122 ; GFX10-CU-LABEL: singlethread_seq_cst_fence:
123 ; GFX10-CU: ; %bb.0: ; %entry
124 ; GFX10-CU-NEXT: s_endpgm
126 ; SKIP-CACHE-INV-LABEL: singlethread_seq_cst_fence:
127 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
128 ; SKIP-CACHE-INV-NEXT: s_endpgm
130 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_seq_cst_fence:
131 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
132 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
134 ; GFX90A-TGSPLIT-LABEL: singlethread_seq_cst_fence:
135 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
136 ; GFX90A-TGSPLIT-NEXT: s_endpgm
138 fence syncscope("singlethread") seq_cst
142 define amdgpu_kernel void @singlethread_one_as_acquire_fence() {
143 ; GFX6-LABEL: singlethread_one_as_acquire_fence:
144 ; GFX6: ; %bb.0: ; %entry
145 ; GFX6-NEXT: s_endpgm
147 ; GFX7-LABEL: singlethread_one_as_acquire_fence:
148 ; GFX7: ; %bb.0: ; %entry
149 ; GFX7-NEXT: s_endpgm
151 ; GFX10-WGP-LABEL: singlethread_one_as_acquire_fence:
152 ; GFX10-WGP: ; %bb.0: ; %entry
153 ; GFX10-WGP-NEXT: s_endpgm
155 ; GFX10-CU-LABEL: singlethread_one_as_acquire_fence:
156 ; GFX10-CU: ; %bb.0: ; %entry
157 ; GFX10-CU-NEXT: s_endpgm
159 ; SKIP-CACHE-INV-LABEL: singlethread_one_as_acquire_fence:
160 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
161 ; SKIP-CACHE-INV-NEXT: s_endpgm
163 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_one_as_acquire_fence:
164 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
165 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
167 ; GFX90A-TGSPLIT-LABEL: singlethread_one_as_acquire_fence:
168 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
169 ; GFX90A-TGSPLIT-NEXT: s_endpgm
171 fence syncscope("singlethread-one-as") acquire
175 define amdgpu_kernel void @singlethread_one_as_release_fence() {
176 ; GFX6-LABEL: singlethread_one_as_release_fence:
177 ; GFX6: ; %bb.0: ; %entry
178 ; GFX6-NEXT: s_endpgm
180 ; GFX7-LABEL: singlethread_one_as_release_fence:
181 ; GFX7: ; %bb.0: ; %entry
182 ; GFX7-NEXT: s_endpgm
184 ; GFX10-WGP-LABEL: singlethread_one_as_release_fence:
185 ; GFX10-WGP: ; %bb.0: ; %entry
186 ; GFX10-WGP-NEXT: s_endpgm
188 ; GFX10-CU-LABEL: singlethread_one_as_release_fence:
189 ; GFX10-CU: ; %bb.0: ; %entry
190 ; GFX10-CU-NEXT: s_endpgm
192 ; SKIP-CACHE-INV-LABEL: singlethread_one_as_release_fence:
193 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
194 ; SKIP-CACHE-INV-NEXT: s_endpgm
196 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_one_as_release_fence:
197 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
198 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
200 ; GFX90A-TGSPLIT-LABEL: singlethread_one_as_release_fence:
201 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
202 ; GFX90A-TGSPLIT-NEXT: s_endpgm
204 fence syncscope("singlethread-one-as") release
208 define amdgpu_kernel void @singlethread_one_as_acq_rel_fence() {
209 ; GFX6-LABEL: singlethread_one_as_acq_rel_fence:
210 ; GFX6: ; %bb.0: ; %entry
211 ; GFX6-NEXT: s_endpgm
213 ; GFX7-LABEL: singlethread_one_as_acq_rel_fence:
214 ; GFX7: ; %bb.0: ; %entry
215 ; GFX7-NEXT: s_endpgm
217 ; GFX10-WGP-LABEL: singlethread_one_as_acq_rel_fence:
218 ; GFX10-WGP: ; %bb.0: ; %entry
219 ; GFX10-WGP-NEXT: s_endpgm
221 ; GFX10-CU-LABEL: singlethread_one_as_acq_rel_fence:
222 ; GFX10-CU: ; %bb.0: ; %entry
223 ; GFX10-CU-NEXT: s_endpgm
225 ; SKIP-CACHE-INV-LABEL: singlethread_one_as_acq_rel_fence:
226 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
227 ; SKIP-CACHE-INV-NEXT: s_endpgm
229 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_one_as_acq_rel_fence:
230 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
231 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
233 ; GFX90A-TGSPLIT-LABEL: singlethread_one_as_acq_rel_fence:
234 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
235 ; GFX90A-TGSPLIT-NEXT: s_endpgm
237 fence syncscope("singlethread-one-as") acq_rel
241 define amdgpu_kernel void @singlethread_one_as_seq_cst_fence() {
242 ; GFX6-LABEL: singlethread_one_as_seq_cst_fence:
243 ; GFX6: ; %bb.0: ; %entry
244 ; GFX6-NEXT: s_endpgm
246 ; GFX7-LABEL: singlethread_one_as_seq_cst_fence:
247 ; GFX7: ; %bb.0: ; %entry
248 ; GFX7-NEXT: s_endpgm
250 ; GFX10-WGP-LABEL: singlethread_one_as_seq_cst_fence:
251 ; GFX10-WGP: ; %bb.0: ; %entry
252 ; GFX10-WGP-NEXT: s_endpgm
254 ; GFX10-CU-LABEL: singlethread_one_as_seq_cst_fence:
255 ; GFX10-CU: ; %bb.0: ; %entry
256 ; GFX10-CU-NEXT: s_endpgm
258 ; SKIP-CACHE-INV-LABEL: singlethread_one_as_seq_cst_fence:
259 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
260 ; SKIP-CACHE-INV-NEXT: s_endpgm
262 ; GFX90A-NOTTGSPLIT-LABEL: singlethread_one_as_seq_cst_fence:
263 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
264 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
266 ; GFX90A-TGSPLIT-LABEL: singlethread_one_as_seq_cst_fence:
267 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
268 ; GFX90A-TGSPLIT-NEXT: s_endpgm
270 fence syncscope("singlethread-one-as") seq_cst
274 define amdgpu_kernel void @wavefront_acquire_fence() {
275 ; GFX6-LABEL: wavefront_acquire_fence:
276 ; GFX6: ; %bb.0: ; %entry
277 ; GFX6-NEXT: s_endpgm
279 ; GFX7-LABEL: wavefront_acquire_fence:
280 ; GFX7: ; %bb.0: ; %entry
281 ; GFX7-NEXT: s_endpgm
283 ; GFX10-WGP-LABEL: wavefront_acquire_fence:
284 ; GFX10-WGP: ; %bb.0: ; %entry
285 ; GFX10-WGP-NEXT: s_endpgm
287 ; GFX10-CU-LABEL: wavefront_acquire_fence:
288 ; GFX10-CU: ; %bb.0: ; %entry
289 ; GFX10-CU-NEXT: s_endpgm
291 ; SKIP-CACHE-INV-LABEL: wavefront_acquire_fence:
292 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
293 ; SKIP-CACHE-INV-NEXT: s_endpgm
295 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_acquire_fence:
296 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
297 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
299 ; GFX90A-TGSPLIT-LABEL: wavefront_acquire_fence:
300 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
301 ; GFX90A-TGSPLIT-NEXT: s_endpgm
303 fence syncscope("wavefront") acquire
307 define amdgpu_kernel void @wavefront_release_fence() {
308 ; GFX6-LABEL: wavefront_release_fence:
309 ; GFX6: ; %bb.0: ; %entry
310 ; GFX6-NEXT: s_endpgm
312 ; GFX7-LABEL: wavefront_release_fence:
313 ; GFX7: ; %bb.0: ; %entry
314 ; GFX7-NEXT: s_endpgm
316 ; GFX10-WGP-LABEL: wavefront_release_fence:
317 ; GFX10-WGP: ; %bb.0: ; %entry
318 ; GFX10-WGP-NEXT: s_endpgm
320 ; GFX10-CU-LABEL: wavefront_release_fence:
321 ; GFX10-CU: ; %bb.0: ; %entry
322 ; GFX10-CU-NEXT: s_endpgm
324 ; SKIP-CACHE-INV-LABEL: wavefront_release_fence:
325 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
326 ; SKIP-CACHE-INV-NEXT: s_endpgm
328 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_release_fence:
329 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
330 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
332 ; GFX90A-TGSPLIT-LABEL: wavefront_release_fence:
333 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
334 ; GFX90A-TGSPLIT-NEXT: s_endpgm
336 fence syncscope("wavefront") release
340 define amdgpu_kernel void @wavefront_acq_rel_fence() {
341 ; GFX6-LABEL: wavefront_acq_rel_fence:
342 ; GFX6: ; %bb.0: ; %entry
343 ; GFX6-NEXT: s_endpgm
345 ; GFX7-LABEL: wavefront_acq_rel_fence:
346 ; GFX7: ; %bb.0: ; %entry
347 ; GFX7-NEXT: s_endpgm
349 ; GFX10-WGP-LABEL: wavefront_acq_rel_fence:
350 ; GFX10-WGP: ; %bb.0: ; %entry
351 ; GFX10-WGP-NEXT: s_endpgm
353 ; GFX10-CU-LABEL: wavefront_acq_rel_fence:
354 ; GFX10-CU: ; %bb.0: ; %entry
355 ; GFX10-CU-NEXT: s_endpgm
357 ; SKIP-CACHE-INV-LABEL: wavefront_acq_rel_fence:
358 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
359 ; SKIP-CACHE-INV-NEXT: s_endpgm
361 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_acq_rel_fence:
362 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
363 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
365 ; GFX90A-TGSPLIT-LABEL: wavefront_acq_rel_fence:
366 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
367 ; GFX90A-TGSPLIT-NEXT: s_endpgm
369 fence syncscope("wavefront") acq_rel
373 define amdgpu_kernel void @wavefront_seq_cst_fence() {
374 ; GFX6-LABEL: wavefront_seq_cst_fence:
375 ; GFX6: ; %bb.0: ; %entry
376 ; GFX6-NEXT: s_endpgm
378 ; GFX7-LABEL: wavefront_seq_cst_fence:
379 ; GFX7: ; %bb.0: ; %entry
380 ; GFX7-NEXT: s_endpgm
382 ; GFX10-WGP-LABEL: wavefront_seq_cst_fence:
383 ; GFX10-WGP: ; %bb.0: ; %entry
384 ; GFX10-WGP-NEXT: s_endpgm
386 ; GFX10-CU-LABEL: wavefront_seq_cst_fence:
387 ; GFX10-CU: ; %bb.0: ; %entry
388 ; GFX10-CU-NEXT: s_endpgm
390 ; SKIP-CACHE-INV-LABEL: wavefront_seq_cst_fence:
391 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
392 ; SKIP-CACHE-INV-NEXT: s_endpgm
394 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_seq_cst_fence:
395 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
396 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
398 ; GFX90A-TGSPLIT-LABEL: wavefront_seq_cst_fence:
399 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
400 ; GFX90A-TGSPLIT-NEXT: s_endpgm
402 fence syncscope("wavefront") seq_cst
406 define amdgpu_kernel void @wavefront_one_as_acquire_fence() {
407 ; GFX6-LABEL: wavefront_one_as_acquire_fence:
408 ; GFX6: ; %bb.0: ; %entry
409 ; GFX6-NEXT: s_endpgm
411 ; GFX7-LABEL: wavefront_one_as_acquire_fence:
412 ; GFX7: ; %bb.0: ; %entry
413 ; GFX7-NEXT: s_endpgm
415 ; GFX10-WGP-LABEL: wavefront_one_as_acquire_fence:
416 ; GFX10-WGP: ; %bb.0: ; %entry
417 ; GFX10-WGP-NEXT: s_endpgm
419 ; GFX10-CU-LABEL: wavefront_one_as_acquire_fence:
420 ; GFX10-CU: ; %bb.0: ; %entry
421 ; GFX10-CU-NEXT: s_endpgm
423 ; SKIP-CACHE-INV-LABEL: wavefront_one_as_acquire_fence:
424 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
425 ; SKIP-CACHE-INV-NEXT: s_endpgm
427 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_one_as_acquire_fence:
428 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
429 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
431 ; GFX90A-TGSPLIT-LABEL: wavefront_one_as_acquire_fence:
432 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
433 ; GFX90A-TGSPLIT-NEXT: s_endpgm
435 fence syncscope("wavefront-one-as") acquire
439 define amdgpu_kernel void @wavefront_one_as_release_fence() {
440 ; GFX6-LABEL: wavefront_one_as_release_fence:
441 ; GFX6: ; %bb.0: ; %entry
442 ; GFX6-NEXT: s_endpgm
444 ; GFX7-LABEL: wavefront_one_as_release_fence:
445 ; GFX7: ; %bb.0: ; %entry
446 ; GFX7-NEXT: s_endpgm
448 ; GFX10-WGP-LABEL: wavefront_one_as_release_fence:
449 ; GFX10-WGP: ; %bb.0: ; %entry
450 ; GFX10-WGP-NEXT: s_endpgm
452 ; GFX10-CU-LABEL: wavefront_one_as_release_fence:
453 ; GFX10-CU: ; %bb.0: ; %entry
454 ; GFX10-CU-NEXT: s_endpgm
456 ; SKIP-CACHE-INV-LABEL: wavefront_one_as_release_fence:
457 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
458 ; SKIP-CACHE-INV-NEXT: s_endpgm
460 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_one_as_release_fence:
461 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
462 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
464 ; GFX90A-TGSPLIT-LABEL: wavefront_one_as_release_fence:
465 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
466 ; GFX90A-TGSPLIT-NEXT: s_endpgm
468 fence syncscope("wavefront-one-as") release
472 define amdgpu_kernel void @wavefront_one_as_acq_rel_fence() {
473 ; GFX6-LABEL: wavefront_one_as_acq_rel_fence:
474 ; GFX6: ; %bb.0: ; %entry
475 ; GFX6-NEXT: s_endpgm
477 ; GFX7-LABEL: wavefront_one_as_acq_rel_fence:
478 ; GFX7: ; %bb.0: ; %entry
479 ; GFX7-NEXT: s_endpgm
481 ; GFX10-WGP-LABEL: wavefront_one_as_acq_rel_fence:
482 ; GFX10-WGP: ; %bb.0: ; %entry
483 ; GFX10-WGP-NEXT: s_endpgm
485 ; GFX10-CU-LABEL: wavefront_one_as_acq_rel_fence:
486 ; GFX10-CU: ; %bb.0: ; %entry
487 ; GFX10-CU-NEXT: s_endpgm
489 ; SKIP-CACHE-INV-LABEL: wavefront_one_as_acq_rel_fence:
490 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
491 ; SKIP-CACHE-INV-NEXT: s_endpgm
493 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_one_as_acq_rel_fence:
494 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
495 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
497 ; GFX90A-TGSPLIT-LABEL: wavefront_one_as_acq_rel_fence:
498 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
499 ; GFX90A-TGSPLIT-NEXT: s_endpgm
501 fence syncscope("wavefront-one-as") acq_rel
505 define amdgpu_kernel void @wavefront_one_as_seq_cst_fence() {
506 ; GFX6-LABEL: wavefront_one_as_seq_cst_fence:
507 ; GFX6: ; %bb.0: ; %entry
508 ; GFX6-NEXT: s_endpgm
510 ; GFX7-LABEL: wavefront_one_as_seq_cst_fence:
511 ; GFX7: ; %bb.0: ; %entry
512 ; GFX7-NEXT: s_endpgm
514 ; GFX10-WGP-LABEL: wavefront_one_as_seq_cst_fence:
515 ; GFX10-WGP: ; %bb.0: ; %entry
516 ; GFX10-WGP-NEXT: s_endpgm
518 ; GFX10-CU-LABEL: wavefront_one_as_seq_cst_fence:
519 ; GFX10-CU: ; %bb.0: ; %entry
520 ; GFX10-CU-NEXT: s_endpgm
522 ; SKIP-CACHE-INV-LABEL: wavefront_one_as_seq_cst_fence:
523 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
524 ; SKIP-CACHE-INV-NEXT: s_endpgm
526 ; GFX90A-NOTTGSPLIT-LABEL: wavefront_one_as_seq_cst_fence:
527 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
528 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
530 ; GFX90A-TGSPLIT-LABEL: wavefront_one_as_seq_cst_fence:
531 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
532 ; GFX90A-TGSPLIT-NEXT: s_endpgm
534 fence syncscope("wavefront-one-as") seq_cst
538 define amdgpu_kernel void @workgroup_acquire_fence() {
539 ; GFX6-LABEL: workgroup_acquire_fence:
540 ; GFX6: ; %bb.0: ; %entry
541 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
542 ; GFX6-NEXT: s_endpgm
544 ; GFX7-LABEL: workgroup_acquire_fence:
545 ; GFX7: ; %bb.0: ; %entry
546 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
547 ; GFX7-NEXT: s_endpgm
549 ; GFX10-WGP-LABEL: workgroup_acquire_fence:
550 ; GFX10-WGP: ; %bb.0: ; %entry
551 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
552 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
553 ; GFX10-WGP-NEXT: buffer_gl0_inv
554 ; GFX10-WGP-NEXT: s_endpgm
556 ; GFX10-CU-LABEL: workgroup_acquire_fence:
557 ; GFX10-CU: ; %bb.0: ; %entry
558 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
559 ; GFX10-CU-NEXT: s_endpgm
561 ; SKIP-CACHE-INV-LABEL: workgroup_acquire_fence:
562 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
563 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
564 ; SKIP-CACHE-INV-NEXT: s_endpgm
566 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_acquire_fence:
567 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
568 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
569 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
571 ; GFX90A-TGSPLIT-LABEL: workgroup_acquire_fence:
572 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
573 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
574 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
575 ; GFX90A-TGSPLIT-NEXT: s_endpgm
577 fence syncscope("workgroup") acquire
581 define amdgpu_kernel void @workgroup_release_fence() {
582 ; GFX6-LABEL: workgroup_release_fence:
583 ; GFX6: ; %bb.0: ; %entry
584 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
585 ; GFX6-NEXT: s_endpgm
587 ; GFX7-LABEL: workgroup_release_fence:
588 ; GFX7: ; %bb.0: ; %entry
589 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
590 ; GFX7-NEXT: s_endpgm
592 ; GFX10-WGP-LABEL: workgroup_release_fence:
593 ; GFX10-WGP: ; %bb.0: ; %entry
594 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
595 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
596 ; GFX10-WGP-NEXT: s_endpgm
598 ; GFX10-CU-LABEL: workgroup_release_fence:
599 ; GFX10-CU: ; %bb.0: ; %entry
600 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
601 ; GFX10-CU-NEXT: s_endpgm
603 ; SKIP-CACHE-INV-LABEL: workgroup_release_fence:
604 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
605 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
606 ; SKIP-CACHE-INV-NEXT: s_endpgm
608 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_release_fence:
609 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
610 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
611 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
613 ; GFX90A-TGSPLIT-LABEL: workgroup_release_fence:
614 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
615 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
616 ; GFX90A-TGSPLIT-NEXT: s_endpgm
618 fence syncscope("workgroup") release
622 define amdgpu_kernel void @workgroup_acq_rel_fence() {
623 ; GFX6-LABEL: workgroup_acq_rel_fence:
624 ; GFX6: ; %bb.0: ; %entry
625 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
626 ; GFX6-NEXT: s_endpgm
628 ; GFX7-LABEL: workgroup_acq_rel_fence:
629 ; GFX7: ; %bb.0: ; %entry
630 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
631 ; GFX7-NEXT: s_endpgm
633 ; GFX10-WGP-LABEL: workgroup_acq_rel_fence:
634 ; GFX10-WGP: ; %bb.0: ; %entry
635 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
636 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
637 ; GFX10-WGP-NEXT: buffer_gl0_inv
638 ; GFX10-WGP-NEXT: s_endpgm
640 ; GFX10-CU-LABEL: workgroup_acq_rel_fence:
641 ; GFX10-CU: ; %bb.0: ; %entry
642 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
643 ; GFX10-CU-NEXT: s_endpgm
645 ; SKIP-CACHE-INV-LABEL: workgroup_acq_rel_fence:
646 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
647 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
648 ; SKIP-CACHE-INV-NEXT: s_endpgm
650 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_acq_rel_fence:
651 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
652 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
653 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
655 ; GFX90A-TGSPLIT-LABEL: workgroup_acq_rel_fence:
656 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
657 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
658 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
659 ; GFX90A-TGSPLIT-NEXT: s_endpgm
661 fence syncscope("workgroup") acq_rel
665 define amdgpu_kernel void @workgroup_seq_cst_fence() {
666 ; GFX6-LABEL: workgroup_seq_cst_fence:
667 ; GFX6: ; %bb.0: ; %entry
668 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
669 ; GFX6-NEXT: s_endpgm
671 ; GFX7-LABEL: workgroup_seq_cst_fence:
672 ; GFX7: ; %bb.0: ; %entry
673 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
674 ; GFX7-NEXT: s_endpgm
676 ; GFX10-WGP-LABEL: workgroup_seq_cst_fence:
677 ; GFX10-WGP: ; %bb.0: ; %entry
678 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
679 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
680 ; GFX10-WGP-NEXT: buffer_gl0_inv
681 ; GFX10-WGP-NEXT: s_endpgm
683 ; GFX10-CU-LABEL: workgroup_seq_cst_fence:
684 ; GFX10-CU: ; %bb.0: ; %entry
685 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
686 ; GFX10-CU-NEXT: s_endpgm
688 ; SKIP-CACHE-INV-LABEL: workgroup_seq_cst_fence:
689 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
690 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
691 ; SKIP-CACHE-INV-NEXT: s_endpgm
693 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_seq_cst_fence:
694 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
695 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
696 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
698 ; GFX90A-TGSPLIT-LABEL: workgroup_seq_cst_fence:
699 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
700 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
701 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
702 ; GFX90A-TGSPLIT-NEXT: s_endpgm
704 fence syncscope("workgroup") seq_cst
708 define amdgpu_kernel void @workgroup_one_as_acquire_fence() {
709 ; GFX6-LABEL: workgroup_one_as_acquire_fence:
710 ; GFX6: ; %bb.0: ; %entry
711 ; GFX6-NEXT: s_endpgm
713 ; GFX7-LABEL: workgroup_one_as_acquire_fence:
714 ; GFX7: ; %bb.0: ; %entry
715 ; GFX7-NEXT: s_endpgm
717 ; GFX10-WGP-LABEL: workgroup_one_as_acquire_fence:
718 ; GFX10-WGP: ; %bb.0: ; %entry
719 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
720 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
721 ; GFX10-WGP-NEXT: buffer_gl0_inv
722 ; GFX10-WGP-NEXT: s_endpgm
724 ; GFX10-CU-LABEL: workgroup_one_as_acquire_fence:
725 ; GFX10-CU: ; %bb.0: ; %entry
726 ; GFX10-CU-NEXT: s_endpgm
728 ; SKIP-CACHE-INV-LABEL: workgroup_one_as_acquire_fence:
729 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
730 ; SKIP-CACHE-INV-NEXT: s_endpgm
732 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_one_as_acquire_fence:
733 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
734 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
736 ; GFX90A-TGSPLIT-LABEL: workgroup_one_as_acquire_fence:
737 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
738 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
739 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
740 ; GFX90A-TGSPLIT-NEXT: s_endpgm
742 fence syncscope("workgroup-one-as") acquire
746 define amdgpu_kernel void @workgroup_one_as_release_fence() {
747 ; GFX6-LABEL: workgroup_one_as_release_fence:
748 ; GFX6: ; %bb.0: ; %entry
749 ; GFX6-NEXT: s_endpgm
751 ; GFX7-LABEL: workgroup_one_as_release_fence:
752 ; GFX7: ; %bb.0: ; %entry
753 ; GFX7-NEXT: s_endpgm
755 ; GFX10-WGP-LABEL: workgroup_one_as_release_fence:
756 ; GFX10-WGP: ; %bb.0: ; %entry
757 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
758 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
759 ; GFX10-WGP-NEXT: s_endpgm
761 ; GFX10-CU-LABEL: workgroup_one_as_release_fence:
762 ; GFX10-CU: ; %bb.0: ; %entry
763 ; GFX10-CU-NEXT: s_endpgm
765 ; SKIP-CACHE-INV-LABEL: workgroup_one_as_release_fence:
766 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
767 ; SKIP-CACHE-INV-NEXT: s_endpgm
769 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_one_as_release_fence:
770 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
771 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
773 ; GFX90A-TGSPLIT-LABEL: workgroup_one_as_release_fence:
774 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
775 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
776 ; GFX90A-TGSPLIT-NEXT: s_endpgm
778 fence syncscope("workgroup-one-as") release
782 define amdgpu_kernel void @workgroup_one_as_acq_rel_fence() {
783 ; GFX6-LABEL: workgroup_one_as_acq_rel_fence:
784 ; GFX6: ; %bb.0: ; %entry
785 ; GFX6-NEXT: s_endpgm
787 ; GFX7-LABEL: workgroup_one_as_acq_rel_fence:
788 ; GFX7: ; %bb.0: ; %entry
789 ; GFX7-NEXT: s_endpgm
791 ; GFX10-WGP-LABEL: workgroup_one_as_acq_rel_fence:
792 ; GFX10-WGP: ; %bb.0: ; %entry
793 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
794 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
795 ; GFX10-WGP-NEXT: buffer_gl0_inv
796 ; GFX10-WGP-NEXT: s_endpgm
798 ; GFX10-CU-LABEL: workgroup_one_as_acq_rel_fence:
799 ; GFX10-CU: ; %bb.0: ; %entry
800 ; GFX10-CU-NEXT: s_endpgm
802 ; SKIP-CACHE-INV-LABEL: workgroup_one_as_acq_rel_fence:
803 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
804 ; SKIP-CACHE-INV-NEXT: s_endpgm
806 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_one_as_acq_rel_fence:
807 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
808 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
810 ; GFX90A-TGSPLIT-LABEL: workgroup_one_as_acq_rel_fence:
811 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
812 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
813 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
814 ; GFX90A-TGSPLIT-NEXT: s_endpgm
816 fence syncscope("workgroup-one-as") acq_rel
820 define amdgpu_kernel void @workgroup_one_as_seq_cst_fence() {
821 ; GFX6-LABEL: workgroup_one_as_seq_cst_fence:
822 ; GFX6: ; %bb.0: ; %entry
823 ; GFX6-NEXT: s_endpgm
825 ; GFX7-LABEL: workgroup_one_as_seq_cst_fence:
826 ; GFX7: ; %bb.0: ; %entry
827 ; GFX7-NEXT: s_endpgm
829 ; GFX10-WGP-LABEL: workgroup_one_as_seq_cst_fence:
830 ; GFX10-WGP: ; %bb.0: ; %entry
831 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
832 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
833 ; GFX10-WGP-NEXT: buffer_gl0_inv
834 ; GFX10-WGP-NEXT: s_endpgm
836 ; GFX10-CU-LABEL: workgroup_one_as_seq_cst_fence:
837 ; GFX10-CU: ; %bb.0: ; %entry
838 ; GFX10-CU-NEXT: s_endpgm
840 ; SKIP-CACHE-INV-LABEL: workgroup_one_as_seq_cst_fence:
841 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
842 ; SKIP-CACHE-INV-NEXT: s_endpgm
844 ; GFX90A-NOTTGSPLIT-LABEL: workgroup_one_as_seq_cst_fence:
845 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
846 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
848 ; GFX90A-TGSPLIT-LABEL: workgroup_one_as_seq_cst_fence:
849 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
850 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
851 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
852 ; GFX90A-TGSPLIT-NEXT: s_endpgm
854 fence syncscope("workgroup-one-as") seq_cst
858 define amdgpu_kernel void @agent_acquire_fence() {
859 ; GFX6-LABEL: agent_acquire_fence:
860 ; GFX6: ; %bb.0: ; %entry
861 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
862 ; GFX6-NEXT: buffer_wbinvl1
863 ; GFX6-NEXT: s_endpgm
865 ; GFX7-LABEL: agent_acquire_fence:
866 ; GFX7: ; %bb.0: ; %entry
867 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
868 ; GFX7-NEXT: buffer_wbinvl1_vol
869 ; GFX7-NEXT: s_endpgm
871 ; GFX10-WGP-LABEL: agent_acquire_fence:
872 ; GFX10-WGP: ; %bb.0: ; %entry
873 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
874 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
875 ; GFX10-WGP-NEXT: buffer_gl0_inv
876 ; GFX10-WGP-NEXT: buffer_gl1_inv
877 ; GFX10-WGP-NEXT: s_endpgm
879 ; GFX10-CU-LABEL: agent_acquire_fence:
880 ; GFX10-CU: ; %bb.0: ; %entry
881 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
882 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
883 ; GFX10-CU-NEXT: buffer_gl0_inv
884 ; GFX10-CU-NEXT: buffer_gl1_inv
885 ; GFX10-CU-NEXT: s_endpgm
887 ; SKIP-CACHE-INV-LABEL: agent_acquire_fence:
888 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
889 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
890 ; SKIP-CACHE-INV-NEXT: s_endpgm
892 ; GFX90A-NOTTGSPLIT-LABEL: agent_acquire_fence:
893 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
894 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
895 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
896 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
898 ; GFX90A-TGSPLIT-LABEL: agent_acquire_fence:
899 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
900 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
901 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
902 ; GFX90A-TGSPLIT-NEXT: s_endpgm
904 fence syncscope("agent") acquire
908 define amdgpu_kernel void @agent_release_fence() {
909 ; GFX6-LABEL: agent_release_fence:
910 ; GFX6: ; %bb.0: ; %entry
911 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
912 ; GFX6-NEXT: s_endpgm
914 ; GFX7-LABEL: agent_release_fence:
915 ; GFX7: ; %bb.0: ; %entry
916 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
917 ; GFX7-NEXT: s_endpgm
919 ; GFX10-WGP-LABEL: agent_release_fence:
920 ; GFX10-WGP: ; %bb.0: ; %entry
921 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
922 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
923 ; GFX10-WGP-NEXT: s_endpgm
925 ; GFX10-CU-LABEL: agent_release_fence:
926 ; GFX10-CU: ; %bb.0: ; %entry
927 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
928 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
929 ; GFX10-CU-NEXT: s_endpgm
931 ; SKIP-CACHE-INV-LABEL: agent_release_fence:
932 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
933 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
934 ; SKIP-CACHE-INV-NEXT: s_endpgm
936 ; GFX90A-NOTTGSPLIT-LABEL: agent_release_fence:
937 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
938 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
939 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
941 ; GFX90A-TGSPLIT-LABEL: agent_release_fence:
942 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
943 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
944 ; GFX90A-TGSPLIT-NEXT: s_endpgm
946 fence syncscope("agent") release
950 define amdgpu_kernel void @agent_acq_rel_fence() {
951 ; GFX6-LABEL: agent_acq_rel_fence:
952 ; GFX6: ; %bb.0: ; %entry
953 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
954 ; GFX6-NEXT: buffer_wbinvl1
955 ; GFX6-NEXT: s_endpgm
957 ; GFX7-LABEL: agent_acq_rel_fence:
958 ; GFX7: ; %bb.0: ; %entry
959 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
960 ; GFX7-NEXT: buffer_wbinvl1_vol
961 ; GFX7-NEXT: s_endpgm
963 ; GFX10-WGP-LABEL: agent_acq_rel_fence:
964 ; GFX10-WGP: ; %bb.0: ; %entry
965 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
966 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
967 ; GFX10-WGP-NEXT: buffer_gl0_inv
968 ; GFX10-WGP-NEXT: buffer_gl1_inv
969 ; GFX10-WGP-NEXT: s_endpgm
971 ; GFX10-CU-LABEL: agent_acq_rel_fence:
972 ; GFX10-CU: ; %bb.0: ; %entry
973 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
974 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
975 ; GFX10-CU-NEXT: buffer_gl0_inv
976 ; GFX10-CU-NEXT: buffer_gl1_inv
977 ; GFX10-CU-NEXT: s_endpgm
979 ; SKIP-CACHE-INV-LABEL: agent_acq_rel_fence:
980 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
981 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
982 ; SKIP-CACHE-INV-NEXT: s_endpgm
984 ; GFX90A-NOTTGSPLIT-LABEL: agent_acq_rel_fence:
985 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
986 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
987 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
988 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
990 ; GFX90A-TGSPLIT-LABEL: agent_acq_rel_fence:
991 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
992 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
993 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
994 ; GFX90A-TGSPLIT-NEXT: s_endpgm
996 fence syncscope("agent") acq_rel
1000 define amdgpu_kernel void @agent_seq_cst_fence() {
1001 ; GFX6-LABEL: agent_seq_cst_fence:
1002 ; GFX6: ; %bb.0: ; %entry
1003 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1004 ; GFX6-NEXT: buffer_wbinvl1
1005 ; GFX6-NEXT: s_endpgm
1007 ; GFX7-LABEL: agent_seq_cst_fence:
1008 ; GFX7: ; %bb.0: ; %entry
1009 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1010 ; GFX7-NEXT: buffer_wbinvl1_vol
1011 ; GFX7-NEXT: s_endpgm
1013 ; GFX10-WGP-LABEL: agent_seq_cst_fence:
1014 ; GFX10-WGP: ; %bb.0: ; %entry
1015 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1016 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1017 ; GFX10-WGP-NEXT: buffer_gl0_inv
1018 ; GFX10-WGP-NEXT: buffer_gl1_inv
1019 ; GFX10-WGP-NEXT: s_endpgm
1021 ; GFX10-CU-LABEL: agent_seq_cst_fence:
1022 ; GFX10-CU: ; %bb.0: ; %entry
1023 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1024 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1025 ; GFX10-CU-NEXT: buffer_gl0_inv
1026 ; GFX10-CU-NEXT: buffer_gl1_inv
1027 ; GFX10-CU-NEXT: s_endpgm
1029 ; SKIP-CACHE-INV-LABEL: agent_seq_cst_fence:
1030 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1031 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1032 ; SKIP-CACHE-INV-NEXT: s_endpgm
1034 ; GFX90A-NOTTGSPLIT-LABEL: agent_seq_cst_fence:
1035 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1036 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1037 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1038 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1040 ; GFX90A-TGSPLIT-LABEL: agent_seq_cst_fence:
1041 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1042 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1043 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1044 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1046 fence syncscope("agent") seq_cst
1050 define amdgpu_kernel void @agent_one_as_acquire_fence() {
1051 ; GFX6-LABEL: agent_one_as_acquire_fence:
1052 ; GFX6: ; %bb.0: ; %entry
1053 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1054 ; GFX6-NEXT: buffer_wbinvl1
1055 ; GFX6-NEXT: s_endpgm
1057 ; GFX7-LABEL: agent_one_as_acquire_fence:
1058 ; GFX7: ; %bb.0: ; %entry
1059 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1060 ; GFX7-NEXT: buffer_wbinvl1_vol
1061 ; GFX7-NEXT: s_endpgm
1063 ; GFX10-WGP-LABEL: agent_one_as_acquire_fence:
1064 ; GFX10-WGP: ; %bb.0: ; %entry
1065 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1066 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1067 ; GFX10-WGP-NEXT: buffer_gl0_inv
1068 ; GFX10-WGP-NEXT: buffer_gl1_inv
1069 ; GFX10-WGP-NEXT: s_endpgm
1071 ; GFX10-CU-LABEL: agent_one_as_acquire_fence:
1072 ; GFX10-CU: ; %bb.0: ; %entry
1073 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1074 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1075 ; GFX10-CU-NEXT: buffer_gl0_inv
1076 ; GFX10-CU-NEXT: buffer_gl1_inv
1077 ; GFX10-CU-NEXT: s_endpgm
1079 ; SKIP-CACHE-INV-LABEL: agent_one_as_acquire_fence:
1080 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1081 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1082 ; SKIP-CACHE-INV-NEXT: s_endpgm
1084 ; GFX90A-NOTTGSPLIT-LABEL: agent_one_as_acquire_fence:
1085 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1086 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1087 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1088 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1090 ; GFX90A-TGSPLIT-LABEL: agent_one_as_acquire_fence:
1091 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1092 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1093 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1094 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1096 fence syncscope("agent-one-as") acquire
1100 define amdgpu_kernel void @agent_one_as_release_fence() {
1101 ; GFX6-LABEL: agent_one_as_release_fence:
1102 ; GFX6: ; %bb.0: ; %entry
1103 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1104 ; GFX6-NEXT: s_endpgm
1106 ; GFX7-LABEL: agent_one_as_release_fence:
1107 ; GFX7: ; %bb.0: ; %entry
1108 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1109 ; GFX7-NEXT: s_endpgm
1111 ; GFX10-WGP-LABEL: agent_one_as_release_fence:
1112 ; GFX10-WGP: ; %bb.0: ; %entry
1113 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1114 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1115 ; GFX10-WGP-NEXT: s_endpgm
1117 ; GFX10-CU-LABEL: agent_one_as_release_fence:
1118 ; GFX10-CU: ; %bb.0: ; %entry
1119 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1120 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1121 ; GFX10-CU-NEXT: s_endpgm
1123 ; SKIP-CACHE-INV-LABEL: agent_one_as_release_fence:
1124 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1125 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1126 ; SKIP-CACHE-INV-NEXT: s_endpgm
1128 ; GFX90A-NOTTGSPLIT-LABEL: agent_one_as_release_fence:
1129 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1130 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1131 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1133 ; GFX90A-TGSPLIT-LABEL: agent_one_as_release_fence:
1134 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1135 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1136 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1138 fence syncscope("agent-one-as") release
1142 define amdgpu_kernel void @agent_one_as_acq_rel_fence() {
1143 ; GFX6-LABEL: agent_one_as_acq_rel_fence:
1144 ; GFX6: ; %bb.0: ; %entry
1145 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1146 ; GFX6-NEXT: buffer_wbinvl1
1147 ; GFX6-NEXT: s_endpgm
1149 ; GFX7-LABEL: agent_one_as_acq_rel_fence:
1150 ; GFX7: ; %bb.0: ; %entry
1151 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1152 ; GFX7-NEXT: buffer_wbinvl1_vol
1153 ; GFX7-NEXT: s_endpgm
1155 ; GFX10-WGP-LABEL: agent_one_as_acq_rel_fence:
1156 ; GFX10-WGP: ; %bb.0: ; %entry
1157 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1158 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1159 ; GFX10-WGP-NEXT: buffer_gl0_inv
1160 ; GFX10-WGP-NEXT: buffer_gl1_inv
1161 ; GFX10-WGP-NEXT: s_endpgm
1163 ; GFX10-CU-LABEL: agent_one_as_acq_rel_fence:
1164 ; GFX10-CU: ; %bb.0: ; %entry
1165 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1166 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1167 ; GFX10-CU-NEXT: buffer_gl0_inv
1168 ; GFX10-CU-NEXT: buffer_gl1_inv
1169 ; GFX10-CU-NEXT: s_endpgm
1171 ; SKIP-CACHE-INV-LABEL: agent_one_as_acq_rel_fence:
1172 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1173 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1174 ; SKIP-CACHE-INV-NEXT: s_endpgm
1176 ; GFX90A-NOTTGSPLIT-LABEL: agent_one_as_acq_rel_fence:
1177 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1178 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1179 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1180 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1182 ; GFX90A-TGSPLIT-LABEL: agent_one_as_acq_rel_fence:
1183 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1184 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1185 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1186 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1188 fence syncscope("agent-one-as") acq_rel
1192 define amdgpu_kernel void @agent_one_as_seq_cst_fence() {
1193 ; GFX6-LABEL: agent_one_as_seq_cst_fence:
1194 ; GFX6: ; %bb.0: ; %entry
1195 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1196 ; GFX6-NEXT: buffer_wbinvl1
1197 ; GFX6-NEXT: s_endpgm
1199 ; GFX7-LABEL: agent_one_as_seq_cst_fence:
1200 ; GFX7: ; %bb.0: ; %entry
1201 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1202 ; GFX7-NEXT: buffer_wbinvl1_vol
1203 ; GFX7-NEXT: s_endpgm
1205 ; GFX10-WGP-LABEL: agent_one_as_seq_cst_fence:
1206 ; GFX10-WGP: ; %bb.0: ; %entry
1207 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1208 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1209 ; GFX10-WGP-NEXT: buffer_gl0_inv
1210 ; GFX10-WGP-NEXT: buffer_gl1_inv
1211 ; GFX10-WGP-NEXT: s_endpgm
1213 ; GFX10-CU-LABEL: agent_one_as_seq_cst_fence:
1214 ; GFX10-CU: ; %bb.0: ; %entry
1215 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1216 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1217 ; GFX10-CU-NEXT: buffer_gl0_inv
1218 ; GFX10-CU-NEXT: buffer_gl1_inv
1219 ; GFX10-CU-NEXT: s_endpgm
1221 ; SKIP-CACHE-INV-LABEL: agent_one_as_seq_cst_fence:
1222 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1223 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1224 ; SKIP-CACHE-INV-NEXT: s_endpgm
1226 ; GFX90A-NOTTGSPLIT-LABEL: agent_one_as_seq_cst_fence:
1227 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1228 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1229 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1230 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1232 ; GFX90A-TGSPLIT-LABEL: agent_one_as_seq_cst_fence:
1233 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1234 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1235 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1236 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1238 fence syncscope("agent-one-as") seq_cst
1242 define amdgpu_kernel void @system_acquire_fence() {
1243 ; GFX6-LABEL: system_acquire_fence:
1244 ; GFX6: ; %bb.0: ; %entry
1245 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1246 ; GFX6-NEXT: buffer_wbinvl1
1247 ; GFX6-NEXT: s_endpgm
1249 ; GFX7-LABEL: system_acquire_fence:
1250 ; GFX7: ; %bb.0: ; %entry
1251 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1252 ; GFX7-NEXT: buffer_wbinvl1_vol
1253 ; GFX7-NEXT: s_endpgm
1255 ; GFX10-WGP-LABEL: system_acquire_fence:
1256 ; GFX10-WGP: ; %bb.0: ; %entry
1257 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1258 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1259 ; GFX10-WGP-NEXT: buffer_gl0_inv
1260 ; GFX10-WGP-NEXT: buffer_gl1_inv
1261 ; GFX10-WGP-NEXT: s_endpgm
1263 ; GFX10-CU-LABEL: system_acquire_fence:
1264 ; GFX10-CU: ; %bb.0: ; %entry
1265 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1266 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1267 ; GFX10-CU-NEXT: buffer_gl0_inv
1268 ; GFX10-CU-NEXT: buffer_gl1_inv
1269 ; GFX10-CU-NEXT: s_endpgm
1271 ; SKIP-CACHE-INV-LABEL: system_acquire_fence:
1272 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1273 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1274 ; SKIP-CACHE-INV-NEXT: s_endpgm
1276 ; GFX90A-NOTTGSPLIT-LABEL: system_acquire_fence:
1277 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1278 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1279 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1280 ; GFX90A-NOTTGSPLIT-NEXT: buffer_invl2
1281 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1282 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1284 ; GFX90A-TGSPLIT-LABEL: system_acquire_fence:
1285 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1286 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1287 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1288 ; GFX90A-TGSPLIT-NEXT: buffer_invl2
1289 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1290 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1296 define amdgpu_kernel void @system_release_fence() {
1297 ; GFX6-LABEL: system_release_fence:
1298 ; GFX6: ; %bb.0: ; %entry
1299 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1300 ; GFX6-NEXT: s_endpgm
1302 ; GFX7-LABEL: system_release_fence:
1303 ; GFX7: ; %bb.0: ; %entry
1304 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1305 ; GFX7-NEXT: s_endpgm
1307 ; GFX10-WGP-LABEL: system_release_fence:
1308 ; GFX10-WGP: ; %bb.0: ; %entry
1309 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1310 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1311 ; GFX10-WGP-NEXT: s_endpgm
1313 ; GFX10-CU-LABEL: system_release_fence:
1314 ; GFX10-CU: ; %bb.0: ; %entry
1315 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1316 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1317 ; GFX10-CU-NEXT: s_endpgm
1319 ; SKIP-CACHE-INV-LABEL: system_release_fence:
1320 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1321 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1322 ; SKIP-CACHE-INV-NEXT: s_endpgm
1324 ; GFX90A-NOTTGSPLIT-LABEL: system_release_fence:
1325 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1326 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1327 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1328 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1330 ; GFX90A-TGSPLIT-LABEL: system_release_fence:
1331 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1332 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1333 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1334 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1340 define amdgpu_kernel void @system_acq_rel_fence() {
1341 ; GFX6-LABEL: system_acq_rel_fence:
1342 ; GFX6: ; %bb.0: ; %entry
1343 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1344 ; GFX6-NEXT: buffer_wbinvl1
1345 ; GFX6-NEXT: s_endpgm
1347 ; GFX7-LABEL: system_acq_rel_fence:
1348 ; GFX7: ; %bb.0: ; %entry
1349 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1350 ; GFX7-NEXT: buffer_wbinvl1_vol
1351 ; GFX7-NEXT: s_endpgm
1353 ; GFX10-WGP-LABEL: system_acq_rel_fence:
1354 ; GFX10-WGP: ; %bb.0: ; %entry
1355 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1356 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1357 ; GFX10-WGP-NEXT: buffer_gl0_inv
1358 ; GFX10-WGP-NEXT: buffer_gl1_inv
1359 ; GFX10-WGP-NEXT: s_endpgm
1361 ; GFX10-CU-LABEL: system_acq_rel_fence:
1362 ; GFX10-CU: ; %bb.0: ; %entry
1363 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1364 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1365 ; GFX10-CU-NEXT: buffer_gl0_inv
1366 ; GFX10-CU-NEXT: buffer_gl1_inv
1367 ; GFX10-CU-NEXT: s_endpgm
1369 ; SKIP-CACHE-INV-LABEL: system_acq_rel_fence:
1370 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1371 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1372 ; SKIP-CACHE-INV-NEXT: s_endpgm
1374 ; GFX90A-NOTTGSPLIT-LABEL: system_acq_rel_fence:
1375 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1376 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1377 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1378 ; GFX90A-NOTTGSPLIT-NEXT: buffer_invl2
1379 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1380 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1382 ; GFX90A-TGSPLIT-LABEL: system_acq_rel_fence:
1383 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1384 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1385 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1386 ; GFX90A-TGSPLIT-NEXT: buffer_invl2
1387 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1388 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1394 define amdgpu_kernel void @system_seq_cst_fence() {
1395 ; GFX6-LABEL: system_seq_cst_fence:
1396 ; GFX6: ; %bb.0: ; %entry
1397 ; GFX6-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1398 ; GFX6-NEXT: buffer_wbinvl1
1399 ; GFX6-NEXT: s_endpgm
1401 ; GFX7-LABEL: system_seq_cst_fence:
1402 ; GFX7: ; %bb.0: ; %entry
1403 ; GFX7-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1404 ; GFX7-NEXT: buffer_wbinvl1_vol
1405 ; GFX7-NEXT: s_endpgm
1407 ; GFX10-WGP-LABEL: system_seq_cst_fence:
1408 ; GFX10-WGP: ; %bb.0: ; %entry
1409 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1410 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1411 ; GFX10-WGP-NEXT: buffer_gl0_inv
1412 ; GFX10-WGP-NEXT: buffer_gl1_inv
1413 ; GFX10-WGP-NEXT: s_endpgm
1415 ; GFX10-CU-LABEL: system_seq_cst_fence:
1416 ; GFX10-CU: ; %bb.0: ; %entry
1417 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1418 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1419 ; GFX10-CU-NEXT: buffer_gl0_inv
1420 ; GFX10-CU-NEXT: buffer_gl1_inv
1421 ; GFX10-CU-NEXT: s_endpgm
1423 ; SKIP-CACHE-INV-LABEL: system_seq_cst_fence:
1424 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1425 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1426 ; SKIP-CACHE-INV-NEXT: s_endpgm
1428 ; GFX90A-NOTTGSPLIT-LABEL: system_seq_cst_fence:
1429 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1430 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1431 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1432 ; GFX90A-NOTTGSPLIT-NEXT: buffer_invl2
1433 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1434 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1436 ; GFX90A-TGSPLIT-LABEL: system_seq_cst_fence:
1437 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1438 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1439 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1440 ; GFX90A-TGSPLIT-NEXT: buffer_invl2
1441 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1442 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1448 define amdgpu_kernel void @system_one_as_acquire_fence() {
1449 ; GFX6-LABEL: system_one_as_acquire_fence:
1450 ; GFX6: ; %bb.0: ; %entry
1451 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1452 ; GFX6-NEXT: buffer_wbinvl1
1453 ; GFX6-NEXT: s_endpgm
1455 ; GFX7-LABEL: system_one_as_acquire_fence:
1456 ; GFX7: ; %bb.0: ; %entry
1457 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1458 ; GFX7-NEXT: buffer_wbinvl1_vol
1459 ; GFX7-NEXT: s_endpgm
1461 ; GFX10-WGP-LABEL: system_one_as_acquire_fence:
1462 ; GFX10-WGP: ; %bb.0: ; %entry
1463 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1464 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1465 ; GFX10-WGP-NEXT: buffer_gl0_inv
1466 ; GFX10-WGP-NEXT: buffer_gl1_inv
1467 ; GFX10-WGP-NEXT: s_endpgm
1469 ; GFX10-CU-LABEL: system_one_as_acquire_fence:
1470 ; GFX10-CU: ; %bb.0: ; %entry
1471 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1472 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1473 ; GFX10-CU-NEXT: buffer_gl0_inv
1474 ; GFX10-CU-NEXT: buffer_gl1_inv
1475 ; GFX10-CU-NEXT: s_endpgm
1477 ; SKIP-CACHE-INV-LABEL: system_one_as_acquire_fence:
1478 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1479 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1480 ; SKIP-CACHE-INV-NEXT: s_endpgm
1482 ; GFX90A-NOTTGSPLIT-LABEL: system_one_as_acquire_fence:
1483 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1484 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1485 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1486 ; GFX90A-NOTTGSPLIT-NEXT: buffer_invl2
1487 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1488 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1490 ; GFX90A-TGSPLIT-LABEL: system_one_as_acquire_fence:
1491 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1492 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1493 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1494 ; GFX90A-TGSPLIT-NEXT: buffer_invl2
1495 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1496 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1498 fence syncscope("one-as") acquire
1502 define amdgpu_kernel void @system_one_as_release_fence() {
1503 ; GFX6-LABEL: system_one_as_release_fence:
1504 ; GFX6: ; %bb.0: ; %entry
1505 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1506 ; GFX6-NEXT: s_endpgm
1508 ; GFX7-LABEL: system_one_as_release_fence:
1509 ; GFX7: ; %bb.0: ; %entry
1510 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1511 ; GFX7-NEXT: s_endpgm
1513 ; GFX10-WGP-LABEL: system_one_as_release_fence:
1514 ; GFX10-WGP: ; %bb.0: ; %entry
1515 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1516 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1517 ; GFX10-WGP-NEXT: s_endpgm
1519 ; GFX10-CU-LABEL: system_one_as_release_fence:
1520 ; GFX10-CU: ; %bb.0: ; %entry
1521 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1522 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1523 ; GFX10-CU-NEXT: s_endpgm
1525 ; SKIP-CACHE-INV-LABEL: system_one_as_release_fence:
1526 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1527 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1528 ; SKIP-CACHE-INV-NEXT: s_endpgm
1530 ; GFX90A-NOTTGSPLIT-LABEL: system_one_as_release_fence:
1531 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1532 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1533 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1534 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1536 ; GFX90A-TGSPLIT-LABEL: system_one_as_release_fence:
1537 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1538 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1539 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1540 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1542 fence syncscope("one-as") release
1546 define amdgpu_kernel void @system_one_as_acq_rel_fence() {
1547 ; GFX6-LABEL: system_one_as_acq_rel_fence:
1548 ; GFX6: ; %bb.0: ; %entry
1549 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1550 ; GFX6-NEXT: buffer_wbinvl1
1551 ; GFX6-NEXT: s_endpgm
1553 ; GFX7-LABEL: system_one_as_acq_rel_fence:
1554 ; GFX7: ; %bb.0: ; %entry
1555 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1556 ; GFX7-NEXT: buffer_wbinvl1_vol
1557 ; GFX7-NEXT: s_endpgm
1559 ; GFX10-WGP-LABEL: system_one_as_acq_rel_fence:
1560 ; GFX10-WGP: ; %bb.0: ; %entry
1561 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1562 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1563 ; GFX10-WGP-NEXT: buffer_gl0_inv
1564 ; GFX10-WGP-NEXT: buffer_gl1_inv
1565 ; GFX10-WGP-NEXT: s_endpgm
1567 ; GFX10-CU-LABEL: system_one_as_acq_rel_fence:
1568 ; GFX10-CU: ; %bb.0: ; %entry
1569 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1570 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1571 ; GFX10-CU-NEXT: buffer_gl0_inv
1572 ; GFX10-CU-NEXT: buffer_gl1_inv
1573 ; GFX10-CU-NEXT: s_endpgm
1575 ; SKIP-CACHE-INV-LABEL: system_one_as_acq_rel_fence:
1576 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1577 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1578 ; SKIP-CACHE-INV-NEXT: s_endpgm
1580 ; GFX90A-NOTTGSPLIT-LABEL: system_one_as_acq_rel_fence:
1581 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1582 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1583 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1584 ; GFX90A-NOTTGSPLIT-NEXT: buffer_invl2
1585 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1586 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1588 ; GFX90A-TGSPLIT-LABEL: system_one_as_acq_rel_fence:
1589 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1590 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1591 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1592 ; GFX90A-TGSPLIT-NEXT: buffer_invl2
1593 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1594 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1596 fence syncscope("one-as") acq_rel
1600 define amdgpu_kernel void @system_one_as_seq_cst_fence() {
1601 ; GFX6-LABEL: system_one_as_seq_cst_fence:
1602 ; GFX6: ; %bb.0: ; %entry
1603 ; GFX6-NEXT: s_waitcnt vmcnt(0)
1604 ; GFX6-NEXT: buffer_wbinvl1
1605 ; GFX6-NEXT: s_endpgm
1607 ; GFX7-LABEL: system_one_as_seq_cst_fence:
1608 ; GFX7: ; %bb.0: ; %entry
1609 ; GFX7-NEXT: s_waitcnt vmcnt(0)
1610 ; GFX7-NEXT: buffer_wbinvl1_vol
1611 ; GFX7-NEXT: s_endpgm
1613 ; GFX10-WGP-LABEL: system_one_as_seq_cst_fence:
1614 ; GFX10-WGP: ; %bb.0: ; %entry
1615 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
1616 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1617 ; GFX10-WGP-NEXT: buffer_gl0_inv
1618 ; GFX10-WGP-NEXT: buffer_gl1_inv
1619 ; GFX10-WGP-NEXT: s_endpgm
1621 ; GFX10-CU-LABEL: system_one_as_seq_cst_fence:
1622 ; GFX10-CU: ; %bb.0: ; %entry
1623 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
1624 ; GFX10-CU-NEXT: s_waitcnt_vscnt null, 0x0
1625 ; GFX10-CU-NEXT: buffer_gl0_inv
1626 ; GFX10-CU-NEXT: buffer_gl1_inv
1627 ; GFX10-CU-NEXT: s_endpgm
1629 ; SKIP-CACHE-INV-LABEL: system_one_as_seq_cst_fence:
1630 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1631 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
1632 ; SKIP-CACHE-INV-NEXT: s_endpgm
1634 ; GFX90A-NOTTGSPLIT-LABEL: system_one_as_seq_cst_fence:
1635 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1636 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbl2
1637 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
1638 ; GFX90A-NOTTGSPLIT-NEXT: buffer_invl2
1639 ; GFX90A-NOTTGSPLIT-NEXT: buffer_wbinvl1_vol
1640 ; GFX90A-NOTTGSPLIT-NEXT: s_endpgm
1642 ; GFX90A-TGSPLIT-LABEL: system_one_as_seq_cst_fence:
1643 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1644 ; GFX90A-TGSPLIT-NEXT: buffer_wbl2
1645 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1646 ; GFX90A-TGSPLIT-NEXT: buffer_invl2
1647 ; GFX90A-TGSPLIT-NEXT: buffer_wbinvl1_vol
1648 ; GFX90A-TGSPLIT-NEXT: s_endpgm
1650 fence syncscope("one-as") seq_cst