Lines Matching +full:0 +full:xc

18 ; GFX6:       ; %bb.0: ; %entry
20 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
21 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
22 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
25 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
37 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
38 ; GFX6-NEXT: s_waitcnt vmcnt(0)
39 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
43 ; GFX7: ; %bb.0: ; %entry
44 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
45 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
46 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
49 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
52 ; GFX7-NEXT: s_waitcnt vmcnt(0)
53 ; GFX7-NEXT: flat_store_dword v[0:1], v2
57 ; GFX10-WGP: ; %bb.0: ; %entry
58 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
59 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
60 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
61 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
63 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
68 ; GFX10-CU: ; %bb.0: ; %entry
69 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
70 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
71 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
72 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
74 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
79 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
80 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
81 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
82 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
83 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
86 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
98 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
99 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
100 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
104 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
105 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
106 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
107 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
108 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
110 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
115 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
116 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
117 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
118 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
119 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
121 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
126 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
127 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
128 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
129 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
130 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
132 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
133 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
137 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
138 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
139 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
140 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
141 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
143 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
144 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
148 ; GFX11-WGP: ; %bb.0: ; %entry
149 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
150 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
151 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
152 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
154 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
155 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
159 ; GFX11-CU: ; %bb.0: ; %entry
160 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
161 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
162 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
163 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
165 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
166 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
170 ; GFX12-WGP: ; %bb.0: ; %entry
171 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
172 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
173 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
174 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
176 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
177 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
181 ; GFX12-CU: ; %bb.0: ; %entry
182 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
183 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
184 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
185 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
187 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
188 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
199 ; GFX6: ; %bb.0: ; %entry
201 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
202 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
203 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
206 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
218 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
219 ; GFX6-NEXT: s_waitcnt vmcnt(0)
220 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
224 ; GFX7: ; %bb.0: ; %entry
225 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
226 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
227 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
230 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
233 ; GFX7-NEXT: s_waitcnt vmcnt(0)
234 ; GFX7-NEXT: flat_store_dword v[0:1], v2
238 ; GFX10-WGP: ; %bb.0: ; %entry
239 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
240 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
241 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
242 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
244 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
249 ; GFX10-CU: ; %bb.0: ; %entry
250 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
251 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
252 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
253 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
255 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
260 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
261 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
262 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
263 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
264 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
267 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
279 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
280 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
281 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
285 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
286 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
287 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
288 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
289 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
291 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
296 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
297 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
298 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
299 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
300 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
302 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
307 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
308 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
309 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
310 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
311 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
313 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
314 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
318 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
319 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
320 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
321 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
322 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
324 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
325 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
329 ; GFX11-WGP: ; %bb.0: ; %entry
330 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
331 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
332 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
333 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
335 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
336 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
340 ; GFX11-CU: ; %bb.0: ; %entry
341 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
342 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
343 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
344 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
346 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
347 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
351 ; GFX12-WGP: ; %bb.0: ; %entry
352 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
353 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
354 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
355 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
357 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
358 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
362 ; GFX12-CU: ; %bb.0: ; %entry
363 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
364 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
365 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
366 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
368 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
369 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
380 ; GFX6: ; %bb.0: ; %entry
382 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
383 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
384 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
387 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
399 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
400 ; GFX6-NEXT: s_waitcnt vmcnt(0)
401 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
405 ; GFX7: ; %bb.0: ; %entry
406 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
407 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
408 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
411 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
414 ; GFX7-NEXT: s_waitcnt vmcnt(0)
415 ; GFX7-NEXT: flat_store_dword v[0:1], v2
419 ; GFX10-WGP: ; %bb.0: ; %entry
420 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
421 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
422 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
423 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
425 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
431 ; GFX10-CU: ; %bb.0: ; %entry
432 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
433 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
434 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
435 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
437 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
442 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
443 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
444 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
445 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
446 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
449 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
461 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
462 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
463 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
467 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
468 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
469 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
470 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
471 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
473 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
478 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
479 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
480 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
481 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
482 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
484 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
490 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
491 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
492 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
493 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
494 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
496 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
497 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
501 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
502 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
503 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
504 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
505 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
507 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
509 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
513 ; GFX11-WGP: ; %bb.0: ; %entry
514 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
515 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
516 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
517 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
519 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
521 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
525 ; GFX11-CU: ; %bb.0: ; %entry
526 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
527 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
528 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
529 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
531 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
532 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
536 ; GFX12-WGP: ; %bb.0: ; %entry
537 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
538 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
539 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
540 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
542 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
544 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
548 ; GFX12-CU: ; %bb.0: ; %entry
549 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
550 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
551 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
552 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
554 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
555 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
566 ; GFX6: ; %bb.0: ; %entry
568 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
569 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
570 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
573 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
585 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
586 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
587 ; GFX6-NEXT: s_waitcnt vmcnt(0)
588 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
592 ; GFX7: ; %bb.0: ; %entry
593 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
594 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
595 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
598 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
599 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
602 ; GFX7-NEXT: s_waitcnt vmcnt(0)
603 ; GFX7-NEXT: flat_store_dword v[0:1], v2
607 ; GFX10-WGP: ; %bb.0: ; %entry
608 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
609 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
610 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
611 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
612 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
614 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
620 ; GFX10-CU: ; %bb.0: ; %entry
621 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
622 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
623 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
624 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
626 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
631 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
632 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
633 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
634 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
635 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
638 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
650 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
651 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
652 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
653 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
657 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
658 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
659 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
660 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
661 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
663 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
668 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
669 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
670 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
671 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
672 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
674 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
680 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
681 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
682 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
683 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
684 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
686 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
687 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
691 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
692 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
693 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
694 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
695 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
697 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
699 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
703 ; GFX11-WGP: ; %bb.0: ; %entry
704 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
705 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
706 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
707 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
708 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
710 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
712 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
716 ; GFX11-CU: ; %bb.0: ; %entry
717 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
718 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
719 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
720 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
722 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
723 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
727 ; GFX12-WGP: ; %bb.0: ; %entry
728 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
729 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
730 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
731 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
732 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
733 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
734 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
735 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
737 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
738 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
739 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
741 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
745 ; GFX12-CU: ; %bb.0: ; %entry
746 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
747 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
748 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
749 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
750 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
752 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
753 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
764 ; GFX6: ; %bb.0: ; %entry
766 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
767 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
768 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
771 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
778 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
782 ; GFX7: ; %bb.0: ; %entry
783 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
784 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
785 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
789 ; GFX7-NEXT: flat_store_dword v[0:1], v2
793 ; GFX10-WGP: ; %bb.0: ; %entry
794 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
795 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
796 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
797 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
803 ; GFX10-CU: ; %bb.0: ; %entry
804 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
805 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
806 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
807 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
813 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
814 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
815 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
816 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
817 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
820 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
827 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
831 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
832 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
833 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
834 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
835 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
841 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
842 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
843 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
844 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
845 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
851 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
852 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
853 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
854 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
855 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
857 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
861 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
862 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
863 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
864 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
865 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
867 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
871 ; GFX11-WGP: ; %bb.0: ; %entry
872 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
873 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
874 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
875 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
877 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
881 ; GFX11-CU: ; %bb.0: ; %entry
882 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
883 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
884 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
885 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
887 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
891 ; GFX12-WGP: ; %bb.0: ; %entry
892 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
893 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
894 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
895 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
897 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
901 ; GFX12-CU: ; %bb.0: ; %entry
902 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
903 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
904 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
905 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
907 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
917 ; GFX6: ; %bb.0: ; %entry
919 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
920 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
921 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
924 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
931 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
935 ; GFX7: ; %bb.0: ; %entry
936 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
937 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
938 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
942 ; GFX7-NEXT: flat_store_dword v[0:1], v2
946 ; GFX10-WGP: ; %bb.0: ; %entry
947 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
948 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
949 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
950 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
956 ; GFX10-CU: ; %bb.0: ; %entry
957 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
958 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
959 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
960 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
966 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
967 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
968 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
969 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
970 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
973 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
980 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
984 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
985 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
986 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
987 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
988 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
994 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
995 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
996 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
997 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
998 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1004 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
1005 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
1006 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
1007 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1008 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1010 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
1014 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
1015 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
1016 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
1017 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1018 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1020 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
1024 ; GFX11-WGP: ; %bb.0: ; %entry
1025 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
1026 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1027 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
1028 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
1030 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
1034 ; GFX11-CU: ; %bb.0: ; %entry
1035 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
1036 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1037 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
1038 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1040 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
1044 ; GFX12-WGP: ; %bb.0: ; %entry
1045 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
1046 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1047 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
1048 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
1050 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1] scope:SCOPE_SE
1054 ; GFX12-CU: ; %bb.0: ; %entry
1055 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
1056 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1057 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
1058 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
1060 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
1070 ; GFX6: ; %bb.0: ; %entry
1072 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
1073 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
1074 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1077 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
1084 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1085 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
1089 ; GFX7: ; %bb.0: ; %entry
1090 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
1091 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
1092 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1096 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1097 ; GFX7-NEXT: flat_store_dword v[0:1], v2
1101 ; GFX10-WGP: ; %bb.0: ; %entry
1102 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
1103 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1104 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
1105 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
1107 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1108 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1113 ; GFX10-CU: ; %bb.0: ; %entry
1114 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
1115 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1116 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
1117 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1119 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1124 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1125 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
1126 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
1127 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
1128 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1131 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
1138 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1139 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
1143 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1144 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
1145 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1146 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1147 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1149 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1154 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1155 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
1156 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1157 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1158 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1160 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1165 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
1166 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
1167 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
1168 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1169 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1171 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1172 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
1176 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
1177 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
1178 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
1179 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1180 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1182 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1183 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
1187 ; GFX11-WGP: ; %bb.0: ; %entry
1188 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
1189 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1190 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
1191 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
1193 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1194 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1195 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
1199 ; GFX11-CU: ; %bb.0: ; %entry
1200 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
1201 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1202 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
1203 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1205 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1206 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
1210 ; GFX12-WGP: ; %bb.0: ; %entry
1211 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
1212 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1213 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
1214 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
1216 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
1217 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
1218 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
1219 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
1220 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1] scope:SCOPE_SE
1224 ; GFX12-CU: ; %bb.0: ; %entry
1225 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
1226 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1227 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
1228 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
1230 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
1231 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
1241 ; GFX6: ; %bb.0: ; %entry
1243 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
1244 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
1245 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1248 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
1255 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1256 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
1260 ; GFX7: ; %bb.0: ; %entry
1261 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
1262 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
1263 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1267 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1268 ; GFX7-NEXT: flat_store_dword v[0:1], v2
1272 ; GFX10-WGP: ; %bb.0: ; %entry
1273 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
1274 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1275 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
1276 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
1278 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1279 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1284 ; GFX10-CU: ; %bb.0: ; %entry
1285 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
1286 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1287 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
1288 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1290 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1295 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1296 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
1297 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
1298 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
1299 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1302 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
1309 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1310 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
1314 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1315 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
1316 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1317 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1318 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1320 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1325 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1326 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
1327 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
1328 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1329 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1331 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1336 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
1337 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
1338 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
1339 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1340 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1342 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1343 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
1347 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
1348 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
1349 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
1350 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1351 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1353 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1354 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
1358 ; GFX11-WGP: ; %bb.0: ; %entry
1359 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
1360 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1361 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
1362 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
1364 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1365 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1366 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
1370 ; GFX11-CU: ; %bb.0: ; %entry
1371 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
1372 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1373 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
1374 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1376 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1377 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
1381 ; GFX12-WGP: ; %bb.0: ; %entry
1382 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
1383 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1384 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
1385 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
1387 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
1388 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
1389 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
1390 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
1391 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1] scope:SCOPE_SE
1395 ; GFX12-CU: ; %bb.0: ; %entry
1396 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
1397 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
1398 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
1399 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
1401 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
1402 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
1412 ; GFX6: ; %bb.0: ; %entry
1413 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1414 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
1415 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1418 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
1425 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
1429 ; GFX7: ; %bb.0: ; %entry
1430 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
1431 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
1432 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1436 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
1440 ; GFX10-WGP: ; %bb.0: ; %entry
1441 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
1442 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1443 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
1444 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
1450 ; GFX10-CU: ; %bb.0: ; %entry
1451 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
1452 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1453 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
1454 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1460 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1461 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1462 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
1463 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1466 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
1473 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
1477 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1478 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1479 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1480 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1481 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1487 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1488 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1489 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1490 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1491 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1497 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
1498 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1499 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1500 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
1501 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1503 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
1507 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
1508 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1509 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1510 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
1511 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1513 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
1517 ; GFX11-WGP: ; %bb.0: ; %entry
1518 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
1519 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1520 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
1521 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
1523 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1527 ; GFX11-CU: ; %bb.0: ; %entry
1528 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
1529 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1530 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
1531 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1533 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1537 ; GFX12-WGP: ; %bb.0: ; %entry
1538 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
1539 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1540 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
1541 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
1543 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
1547 ; GFX12-CU: ; %bb.0: ; %entry
1548 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
1549 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1550 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
1551 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
1553 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1563 ; GFX6: ; %bb.0: ; %entry
1564 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1565 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
1566 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1569 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
1576 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
1580 ; GFX7: ; %bb.0: ; %entry
1581 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
1582 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
1583 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1587 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
1591 ; GFX10-WGP: ; %bb.0: ; %entry
1592 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
1593 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1594 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
1595 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
1598 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1603 ; GFX10-CU: ; %bb.0: ; %entry
1604 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
1605 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1606 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
1607 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1613 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1614 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1615 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
1616 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1619 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
1626 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
1630 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1631 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1632 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1633 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1634 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1640 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1641 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1642 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1643 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1644 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1647 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1652 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
1653 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1654 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1655 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
1656 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1658 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
1662 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
1663 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1664 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1665 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
1666 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1668 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
1669 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1674 ; GFX11-WGP: ; %bb.0: ; %entry
1675 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
1676 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1677 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
1678 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
1680 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1681 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1686 ; GFX11-CU: ; %bb.0: ; %entry
1687 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
1688 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1689 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
1690 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1692 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1696 ; GFX12-WGP: ; %bb.0: ; %entry
1697 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
1698 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1699 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
1700 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
1702 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
1703 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
1708 ; GFX12-CU: ; %bb.0: ; %entry
1709 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
1710 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1711 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
1712 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
1714 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1724 ; GFX6: ; %bb.0: ; %entry
1725 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1726 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
1727 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1730 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
1737 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1738 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
1742 ; GFX7: ; %bb.0: ; %entry
1743 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
1744 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
1745 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1749 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1750 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
1754 ; GFX10-WGP: ; %bb.0: ; %entry
1755 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
1756 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1757 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
1758 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
1760 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1761 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1766 ; GFX10-CU: ; %bb.0: ; %entry
1767 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
1768 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1769 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
1770 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1772 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1777 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1778 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1779 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
1780 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1783 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
1790 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1791 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
1795 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1796 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1797 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1798 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1799 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1801 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1806 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1807 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1808 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1809 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1810 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1812 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1817 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
1818 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1819 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1820 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
1821 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1823 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1824 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
1828 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
1829 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1830 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1831 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
1832 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1834 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1835 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
1839 ; GFX11-WGP: ; %bb.0: ; %entry
1840 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
1841 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1842 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
1843 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
1845 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1846 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1847 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1851 ; GFX11-CU: ; %bb.0: ; %entry
1852 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
1853 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1854 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
1855 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1857 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
1858 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1862 ; GFX12-WGP: ; %bb.0: ; %entry
1863 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
1864 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1865 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
1866 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
1868 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
1869 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
1870 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
1871 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
1872 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
1876 ; GFX12-CU: ; %bb.0: ; %entry
1877 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
1878 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
1879 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
1880 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
1882 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
1883 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
1893 ; GFX6: ; %bb.0: ; %entry
1894 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1895 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
1896 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1899 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
1906 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
1907 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
1911 ; GFX7: ; %bb.0: ; %entry
1912 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
1913 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
1914 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1918 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
1919 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
1923 ; GFX10-WGP: ; %bb.0: ; %entry
1924 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
1925 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1926 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
1927 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
1929 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1930 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1932 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
1937 ; GFX10-CU: ; %bb.0: ; %entry
1938 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
1939 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1940 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
1941 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1943 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
1948 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
1949 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1950 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
1951 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1954 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
1961 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
1962 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
1966 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
1967 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1968 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1969 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1970 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1972 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1977 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
1978 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1979 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
1980 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
1981 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1983 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
1985 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
1990 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
1991 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
1992 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
1993 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
1994 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1996 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
1997 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
2001 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
2002 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2003 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2004 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2005 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2007 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2008 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
2009 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2014 ; GFX11-WGP: ; %bb.0: ; %entry
2015 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
2016 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2017 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2018 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
2020 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2021 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2022 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
2023 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2028 ; GFX11-CU: ; %bb.0: ; %entry
2029 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
2030 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2031 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2032 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2034 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2035 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
2039 ; GFX12-WGP: ; %bb.0: ; %entry
2040 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
2041 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2042 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2043 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
2045 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
2046 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
2047 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
2048 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
2049 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
2050 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
2055 ; GFX12-CU: ; %bb.0: ; %entry
2056 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
2057 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2058 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2059 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
2061 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
2062 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
2072 ; GFX6: ; %bb.0: ; %entry
2073 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2074 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
2075 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2078 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
2085 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2086 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
2090 ; GFX7: ; %bb.0: ; %entry
2091 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
2092 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
2093 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2097 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2098 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
2102 ; GFX10-WGP: ; %bb.0: ; %entry
2103 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
2104 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2105 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
2106 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
2108 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2109 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2111 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2116 ; GFX10-CU: ; %bb.0: ; %entry
2117 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
2118 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2119 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
2120 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2122 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2127 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
2128 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2129 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
2130 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2133 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
2140 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2141 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
2145 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
2146 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2147 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2148 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2149 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2151 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2156 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
2157 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2158 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2159 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2160 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2162 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2164 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2169 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
2170 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2171 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2172 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2173 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2175 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2176 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
2180 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
2181 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2182 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2183 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2184 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2186 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2187 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
2188 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2193 ; GFX11-WGP: ; %bb.0: ; %entry
2194 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
2195 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2196 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2197 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
2199 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2200 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2201 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
2202 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2207 ; GFX11-CU: ; %bb.0: ; %entry
2208 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
2209 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2210 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2211 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2213 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2214 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
2218 ; GFX12-WGP: ; %bb.0: ; %entry
2219 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
2220 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2221 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2222 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
2224 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
2225 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
2226 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
2227 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
2228 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
2229 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
2234 ; GFX12-CU: ; %bb.0: ; %entry
2235 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
2236 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2237 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2238 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
2240 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
2241 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
2251 ; GFX6: ; %bb.0: ; %entry
2252 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2253 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
2254 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2257 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
2264 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0 glc
2265 ; GFX6-NEXT: s_waitcnt vmcnt(0)
2266 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
2270 ; GFX7: ; %bb.0: ; %entry
2271 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2272 ; GFX7-NEXT: s_load_dword s6, s[8:9], 0x2
2273 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2277 ; GFX7-NEXT: flat_atomic_swap v2, v[0:1], v2 glc
2280 ; GFX7-NEXT: s_waitcnt vmcnt(0)
2281 ; GFX7-NEXT: flat_store_dword v[0:1], v2
2285 ; GFX10-WGP: ; %bb.0: ; %entry
2286 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
2287 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2288 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
2289 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
2292 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
2298 ; GFX10-CU: ; %bb.0: ; %entry
2299 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
2300 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2301 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
2302 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2305 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
2310 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
2311 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2312 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
2313 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2316 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
2323 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0 glc
2324 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
2325 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
2329 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
2330 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2331 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2332 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2333 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2336 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
2341 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
2342 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2343 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2344 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2345 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2348 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2354 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
2355 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2356 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2357 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2358 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2360 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
2361 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
2362 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
2366 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
2367 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2368 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2369 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2370 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2372 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
2373 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2375 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
2379 ; GFX11-WGP: ; %bb.0: ; %entry
2380 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
2381 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2382 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2383 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
2385 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
2386 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
2388 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
2392 ; GFX11-CU: ; %bb.0: ; %entry
2393 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
2394 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2395 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2396 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2398 ; GFX11-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
2399 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
2400 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
2404 ; GFX12-WGP: ; %bb.0: ; %entry
2405 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
2406 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2407 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2408 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
2410 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN scope:SCOPE_SE
2411 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
2413 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
2417 ; GFX12-CU: ; %bb.0: ; %entry
2418 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
2419 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2420 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2421 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
2423 ; GFX12-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN
2424 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
2425 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
2436 ; GFX6: ; %bb.0: ; %entry
2437 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2438 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
2439 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2442 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
2449 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2450 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0 glc
2451 ; GFX6-NEXT: s_waitcnt vmcnt(0)
2452 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
2456 ; GFX7: ; %bb.0: ; %entry
2457 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2458 ; GFX7-NEXT: s_load_dword s6, s[8:9], 0x2
2459 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2463 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2464 ; GFX7-NEXT: flat_atomic_swap v2, v[0:1], v2 glc
2467 ; GFX7-NEXT: s_waitcnt vmcnt(0)
2468 ; GFX7-NEXT: flat_store_dword v[0:1], v2
2472 ; GFX10-WGP: ; %bb.0: ; %entry
2473 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
2474 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2475 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
2476 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
2478 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2479 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2481 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
2487 ; GFX10-CU: ; %bb.0: ; %entry
2488 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
2489 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2490 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
2491 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2493 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2495 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
2500 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
2501 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2502 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
2503 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2506 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
2513 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2514 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0 glc
2515 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
2516 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
2520 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
2521 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2522 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2523 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2524 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2526 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2528 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
2533 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
2534 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2535 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2536 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2537 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2539 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2541 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2547 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
2548 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2549 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2550 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2551 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2553 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2554 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
2555 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
2556 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
2560 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
2561 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2562 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2563 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2564 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2566 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2567 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
2568 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2570 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
2574 ; GFX11-WGP: ; %bb.0: ; %entry
2575 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
2576 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2577 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2578 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
2580 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2581 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2582 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
2583 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
2585 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
2589 ; GFX11-CU: ; %bb.0: ; %entry
2590 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
2591 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2592 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2593 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2595 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2596 ; GFX11-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
2597 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
2598 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
2602 ; GFX12-WGP: ; %bb.0: ; %entry
2603 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
2604 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2605 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2606 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
2608 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
2609 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
2610 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
2611 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
2612 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN scope:SCOPE_SE
2613 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
2614 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
2615 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
2617 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
2621 ; GFX12-CU: ; %bb.0: ; %entry
2622 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
2623 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2624 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2625 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
2627 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
2628 ; GFX12-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN
2629 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
2630 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
2641 ; GFX6: ; %bb.0: ; %entry
2642 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2643 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
2644 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2647 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
2654 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2655 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0 glc
2656 ; GFX6-NEXT: s_waitcnt vmcnt(0)
2657 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
2661 ; GFX7: ; %bb.0: ; %entry
2662 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2663 ; GFX7-NEXT: s_load_dword s6, s[8:9], 0x2
2664 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2668 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2669 ; GFX7-NEXT: flat_atomic_swap v2, v[0:1], v2 glc
2672 ; GFX7-NEXT: s_waitcnt vmcnt(0)
2673 ; GFX7-NEXT: flat_store_dword v[0:1], v2
2677 ; GFX10-WGP: ; %bb.0: ; %entry
2678 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
2679 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2680 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
2681 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
2683 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2684 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2686 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
2692 ; GFX10-CU: ; %bb.0: ; %entry
2693 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
2694 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2695 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
2696 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2698 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2700 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
2705 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
2706 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2707 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
2708 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2711 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
2718 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2719 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0 glc
2720 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
2721 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
2725 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
2726 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2727 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2728 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2729 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2731 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2733 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
2738 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
2739 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2740 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2741 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
2742 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2744 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2746 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2752 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
2753 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2754 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2755 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2756 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2758 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2759 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
2760 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
2761 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
2765 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
2766 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2767 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2768 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
2769 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2771 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2772 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
2773 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
2775 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
2779 ; GFX11-WGP: ; %bb.0: ; %entry
2780 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
2781 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2782 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2783 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
2785 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
2786 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
2787 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
2788 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
2790 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
2794 ; GFX11-CU: ; %bb.0: ; %entry
2795 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
2796 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2797 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2798 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2800 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
2801 ; GFX11-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
2802 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
2803 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
2807 ; GFX12-WGP: ; %bb.0: ; %entry
2808 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
2809 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2810 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
2811 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
2813 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
2814 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
2815 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
2816 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
2817 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN scope:SCOPE_SE
2818 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
2819 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
2820 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
2822 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
2826 ; GFX12-CU: ; %bb.0: ; %entry
2827 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
2828 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
2829 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
2830 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
2832 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
2833 ; GFX12-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN
2834 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
2835 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
2846 ; GFX6: ; %bb.0: ; %entry
2848 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
2849 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
2850 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
2851 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
2854 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
2864 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
2868 ; GFX7: ; %bb.0: ; %entry
2870 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
2871 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
2872 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
2874 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
2889 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
2893 ; GFX10-WGP: ; %bb.0: ; %entry
2894 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
2895 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2896 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
2897 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
2898 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
2907 ; GFX10-CU: ; %bb.0: ; %entry
2908 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
2909 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2910 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
2911 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
2912 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
2921 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
2923 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
2924 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
2925 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
2926 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
2929 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
2939 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
2943 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
2944 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2945 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2946 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
2947 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
2948 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2957 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
2958 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2959 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
2960 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
2961 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
2962 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2971 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
2972 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2973 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2974 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
2975 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
2976 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2981 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
2985 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
2986 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
2987 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
2988 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
2989 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
2990 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
2995 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
2999 ; GFX11-WGP: ; %bb.0: ; %entry
3000 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
3001 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3002 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3003 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3004 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
3009 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3013 ; GFX11-CU: ; %bb.0: ; %entry
3014 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
3015 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3016 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3017 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3018 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3023 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3027 ; GFX12-WGP: ; %bb.0: ; %entry
3028 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
3029 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3030 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3031 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3032 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
3037 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
3041 ; GFX12-CU: ; %bb.0: ; %entry
3042 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
3043 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3044 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3045 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3046 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
3051 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3062 ; GFX6: ; %bb.0: ; %entry
3064 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
3065 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
3066 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
3067 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
3070 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
3080 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
3084 ; GFX7: ; %bb.0: ; %entry
3086 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
3087 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
3088 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
3090 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
3105 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
3109 ; GFX10-WGP: ; %bb.0: ; %entry
3110 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
3111 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3112 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
3113 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
3114 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
3120 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3125 ; GFX10-CU: ; %bb.0: ; %entry
3126 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
3127 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3128 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
3129 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
3130 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
3139 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
3141 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
3142 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
3143 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
3144 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
3147 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
3157 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
3161 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
3162 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3163 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3164 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3165 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3166 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3175 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
3176 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3177 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3178 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3179 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3180 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3186 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
3191 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
3192 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3193 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3194 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3195 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3196 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3201 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3205 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
3206 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3207 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3208 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3209 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3210 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3215 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3216 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
3221 ; GFX11-WGP: ; %bb.0: ; %entry
3222 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
3223 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3224 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3225 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3226 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
3231 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3232 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3237 ; GFX11-CU: ; %bb.0: ; %entry
3238 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
3239 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3240 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3241 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3242 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3247 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3251 ; GFX12-WGP: ; %bb.0: ; %entry
3252 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
3253 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3254 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3255 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3256 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
3261 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
3262 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
3267 ; GFX12-CU: ; %bb.0: ; %entry
3268 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
3269 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3270 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3271 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3272 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
3277 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3288 ; GFX6: ; %bb.0: ; %entry
3290 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
3291 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
3292 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
3293 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
3296 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
3306 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
3307 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
3311 ; GFX7: ; %bb.0: ; %entry
3313 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
3314 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
3315 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
3317 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
3332 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
3333 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
3337 ; GFX10-WGP: ; %bb.0: ; %entry
3338 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
3339 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3340 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
3341 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
3342 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
3347 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3348 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3353 ; GFX10-CU: ; %bb.0: ; %entry
3354 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
3355 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3356 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
3357 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
3358 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
3363 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
3368 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
3370 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
3371 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
3372 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
3373 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
3376 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
3386 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
3387 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
3391 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
3392 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3393 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3394 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3395 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3396 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3401 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3406 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
3407 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3408 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3409 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3410 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3411 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3416 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3421 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
3422 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3423 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3424 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3425 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3426 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3431 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3432 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3436 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
3437 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3438 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3439 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3440 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3441 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3446 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3447 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3451 ; GFX11-WGP: ; %bb.0: ; %entry
3452 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
3453 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3454 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3455 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3456 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
3461 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3462 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3463 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3467 ; GFX11-CU: ; %bb.0: ; %entry
3468 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
3469 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3470 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3471 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3472 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3477 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3478 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3482 ; GFX12-WGP: ; %bb.0: ; %entry
3483 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
3484 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3485 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3486 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3487 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
3492 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
3493 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
3494 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
3495 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
3496 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
3500 ; GFX12-CU: ; %bb.0: ; %entry
3501 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
3502 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3503 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3504 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3505 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
3510 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
3511 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3522 ; GFX6: ; %bb.0: ; %entry
3524 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
3525 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
3526 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
3527 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
3530 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
3540 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
3541 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
3545 ; GFX7: ; %bb.0: ; %entry
3547 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
3548 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
3549 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
3551 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
3566 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
3567 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
3571 ; GFX10-WGP: ; %bb.0: ; %entry
3572 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
3573 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3574 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
3575 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
3576 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
3581 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3582 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3584 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3589 ; GFX10-CU: ; %bb.0: ; %entry
3590 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
3591 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3592 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
3593 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
3594 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
3599 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
3604 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
3606 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
3607 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
3608 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
3609 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
3612 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
3622 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
3623 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
3627 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
3628 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3629 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3630 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3631 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3632 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3637 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3642 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
3643 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3644 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3645 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3646 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3647 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3652 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3654 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
3659 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
3660 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3661 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3662 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3663 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3664 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3669 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3670 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3674 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
3675 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3676 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3677 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3678 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3679 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3684 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3685 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3686 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
3691 ; GFX11-WGP: ; %bb.0: ; %entry
3692 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
3693 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3694 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3695 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3696 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
3701 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3702 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3703 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3704 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3709 ; GFX11-CU: ; %bb.0: ; %entry
3710 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
3711 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3712 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3713 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3714 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3719 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3720 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3724 ; GFX12-WGP: ; %bb.0: ; %entry
3725 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
3726 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3727 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3728 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3729 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
3734 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
3735 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
3736 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
3737 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
3738 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
3739 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
3744 ; GFX12-CU: ; %bb.0: ; %entry
3745 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
3746 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3747 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3748 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3749 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
3754 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
3755 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3766 ; GFX6: ; %bb.0: ; %entry
3768 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
3769 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
3770 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
3771 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
3774 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
3784 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
3785 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
3789 ; GFX7: ; %bb.0: ; %entry
3791 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
3792 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
3793 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
3795 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
3810 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
3811 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
3815 ; GFX10-WGP: ; %bb.0: ; %entry
3816 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
3817 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3818 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
3819 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
3820 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
3825 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3826 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3828 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3833 ; GFX10-CU: ; %bb.0: ; %entry
3834 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
3835 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3836 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
3837 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
3838 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
3843 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
3848 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
3850 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
3851 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
3852 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
3853 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
3856 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
3866 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
3867 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
3871 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
3872 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3873 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3874 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3875 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3876 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3881 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3886 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
3887 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3888 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
3889 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
3890 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
3891 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3896 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3898 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
3903 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
3904 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3905 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3906 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3907 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3908 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3913 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3914 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3918 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
3919 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
3920 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
3921 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
3922 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
3923 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
3928 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3929 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
3930 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
3935 ; GFX11-WGP: ; %bb.0: ; %entry
3936 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
3937 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3938 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3939 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3940 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
3945 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
3946 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3947 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3948 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
3953 ; GFX11-CU: ; %bb.0: ; %entry
3954 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
3955 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3956 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3957 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3958 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3963 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
3964 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
3968 ; GFX12-WGP: ; %bb.0: ; %entry
3969 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
3970 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3971 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
3972 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
3973 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
3978 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
3979 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
3980 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
3981 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
3982 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
3983 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
3988 ; GFX12-CU: ; %bb.0: ; %entry
3989 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
3990 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
3991 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
3992 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
3993 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
3998 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
3999 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4010 ; GFX6: ; %bb.0: ; %entry
4012 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
4013 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
4014 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
4015 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4018 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
4028 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
4032 ; GFX7: ; %bb.0: ; %entry
4034 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
4035 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
4036 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
4038 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4053 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
4057 ; GFX10-WGP: ; %bb.0: ; %entry
4058 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
4059 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4060 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
4061 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
4062 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
4068 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4073 ; GFX10-CU: ; %bb.0: ; %entry
4074 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
4075 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4076 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
4077 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
4078 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
4087 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
4089 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
4090 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
4091 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
4092 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
4095 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
4105 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
4109 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
4110 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4111 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4112 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4113 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4114 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4123 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
4124 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4125 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4126 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4127 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4128 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4134 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4139 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
4140 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4141 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4142 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4143 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4144 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4149 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4153 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
4154 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4155 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4156 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4157 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4158 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4163 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4164 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4169 ; GFX11-WGP: ; %bb.0: ; %entry
4170 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
4171 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4172 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4173 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4174 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
4179 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4180 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4185 ; GFX11-CU: ; %bb.0: ; %entry
4186 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
4187 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4188 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4189 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4190 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
4195 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4199 ; GFX12-WGP: ; %bb.0: ; %entry
4200 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
4201 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4202 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4203 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4204 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
4209 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
4210 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
4215 ; GFX12-CU: ; %bb.0: ; %entry
4216 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
4217 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4218 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4219 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4220 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
4225 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4236 ; GFX6: ; %bb.0: ; %entry
4238 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
4239 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
4240 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
4241 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4244 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
4254 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
4258 ; GFX7: ; %bb.0: ; %entry
4260 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
4261 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
4262 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
4264 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4279 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
4283 ; GFX10-WGP: ; %bb.0: ; %entry
4284 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
4285 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4286 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
4287 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
4288 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
4294 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4299 ; GFX10-CU: ; %bb.0: ; %entry
4300 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
4301 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4302 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
4303 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
4304 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
4313 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
4315 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
4316 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
4317 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
4318 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
4321 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
4331 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
4335 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
4336 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4337 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4338 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4339 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4340 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4349 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
4350 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4351 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4352 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4353 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4354 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4360 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4365 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
4366 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4367 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4368 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4369 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4370 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4375 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4379 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
4380 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4381 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4382 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4383 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4384 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4389 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4390 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4395 ; GFX11-WGP: ; %bb.0: ; %entry
4396 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
4397 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4398 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4399 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4400 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
4405 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4406 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4411 ; GFX11-CU: ; %bb.0: ; %entry
4412 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
4413 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4414 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4415 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4416 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
4421 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4425 ; GFX12-WGP: ; %bb.0: ; %entry
4426 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
4427 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4428 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4429 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4430 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
4435 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
4436 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
4441 ; GFX12-CU: ; %bb.0: ; %entry
4442 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
4443 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4444 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4445 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4446 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
4451 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4462 ; GFX6: ; %bb.0: ; %entry
4464 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
4465 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
4466 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
4467 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4470 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
4480 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4481 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
4485 ; GFX7: ; %bb.0: ; %entry
4487 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
4488 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
4489 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
4491 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4506 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4507 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
4511 ; GFX10-WGP: ; %bb.0: ; %entry
4512 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
4513 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4514 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
4515 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
4516 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
4521 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4522 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4524 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4529 ; GFX10-CU: ; %bb.0: ; %entry
4530 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
4531 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4532 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
4533 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
4534 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
4539 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
4544 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
4546 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
4547 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
4548 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
4549 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
4552 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
4562 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
4563 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
4567 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
4568 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4569 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4570 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4571 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4572 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4577 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4582 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
4583 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4584 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4585 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4586 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4587 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4592 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4594 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4599 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
4600 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4601 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4602 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4603 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4604 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4609 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4610 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4614 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
4615 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4616 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4617 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4618 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4619 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4624 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4625 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4626 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4631 ; GFX11-WGP: ; %bb.0: ; %entry
4632 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
4633 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4634 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4635 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4636 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
4641 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4642 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4643 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4644 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4649 ; GFX11-CU: ; %bb.0: ; %entry
4650 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
4651 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4652 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4653 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4654 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
4659 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
4660 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4664 ; GFX12-WGP: ; %bb.0: ; %entry
4665 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
4666 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4667 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4668 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4669 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
4674 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
4675 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
4676 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
4677 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
4678 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
4679 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
4684 ; GFX12-CU: ; %bb.0: ; %entry
4685 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
4686 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4687 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4688 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4689 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
4694 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
4695 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4706 ; GFX6: ; %bb.0: ; %entry
4708 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
4709 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
4710 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
4711 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4714 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
4724 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4725 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
4729 ; GFX7: ; %bb.0: ; %entry
4731 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
4732 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
4733 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
4735 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4750 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4751 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
4755 ; GFX10-WGP: ; %bb.0: ; %entry
4756 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
4757 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4758 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
4759 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
4760 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
4765 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4766 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4768 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4773 ; GFX10-CU: ; %bb.0: ; %entry
4774 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
4775 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4776 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
4777 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
4778 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
4783 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
4788 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
4790 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
4791 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
4792 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
4793 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
4796 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
4806 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
4807 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
4811 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
4812 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4813 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4814 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4815 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4816 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4821 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4826 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
4827 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4828 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
4829 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
4830 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
4831 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4836 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4838 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4843 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
4844 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4845 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4846 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4847 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4848 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4853 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4854 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4858 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
4859 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
4860 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
4861 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
4862 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
4863 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
4868 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4869 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
4870 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
4875 ; GFX11-WGP: ; %bb.0: ; %entry
4876 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
4877 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4878 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4879 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4880 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
4885 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
4886 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4887 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4888 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
4893 ; GFX11-CU: ; %bb.0: ; %entry
4894 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
4895 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4896 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4897 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4898 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
4903 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
4904 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4908 ; GFX12-WGP: ; %bb.0: ; %entry
4909 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
4910 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4911 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
4912 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
4913 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
4918 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
4919 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
4920 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
4921 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
4922 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
4923 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
4928 ; GFX12-CU: ; %bb.0: ; %entry
4929 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
4930 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
4931 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
4932 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
4933 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
4938 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
4939 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
4950 ; GFX6: ; %bb.0: ; %entry
4952 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
4953 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
4954 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
4955 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4958 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
4968 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
4969 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
4973 ; GFX7: ; %bb.0: ; %entry
4975 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
4976 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
4977 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
4979 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4994 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
4995 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
4999 ; GFX10-WGP: ; %bb.0: ; %entry
5000 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
5001 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5002 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
5003 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
5004 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
5009 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5010 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5012 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5017 ; GFX10-CU: ; %bb.0: ; %entry
5018 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
5019 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5020 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
5021 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
5022 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5027 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5032 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
5034 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
5035 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
5036 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
5037 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5040 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
5050 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5051 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
5055 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
5056 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5057 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5058 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5059 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5060 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5065 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5070 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
5071 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5072 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5073 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5074 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5075 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5080 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5082 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5087 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
5088 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5089 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5090 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5091 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5092 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5097 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5098 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5102 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
5103 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5104 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5105 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5106 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5107 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5112 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5113 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5114 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5119 ; GFX11-WGP: ; %bb.0: ; %entry
5120 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
5121 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5122 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5123 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5124 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
5129 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5130 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5131 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5132 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5137 ; GFX11-CU: ; %bb.0: ; %entry
5138 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
5139 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5140 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5141 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5142 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5147 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5148 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5152 ; GFX12-WGP: ; %bb.0: ; %entry
5153 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
5154 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5155 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5156 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5157 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
5162 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
5163 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
5164 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5165 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
5166 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
5167 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5172 ; GFX12-CU: ; %bb.0: ; %entry
5173 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
5174 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5175 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5176 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5177 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
5182 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
5183 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5194 ; GFX6: ; %bb.0: ; %entry
5196 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
5197 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
5198 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
5199 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5202 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
5212 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5213 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
5217 ; GFX7: ; %bb.0: ; %entry
5219 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
5220 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
5221 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
5223 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5238 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5239 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
5243 ; GFX10-WGP: ; %bb.0: ; %entry
5244 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
5245 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5246 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
5247 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
5248 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
5253 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5254 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5256 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5261 ; GFX10-CU: ; %bb.0: ; %entry
5262 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
5263 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5264 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
5265 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
5266 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5271 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5276 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
5278 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
5279 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
5280 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
5281 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5284 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
5294 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5295 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
5299 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
5300 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5301 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5302 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5303 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5304 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5309 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5314 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
5315 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5316 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5317 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5318 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5319 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5324 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5326 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5331 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
5332 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5333 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5334 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5335 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5336 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5341 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5342 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5346 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
5347 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5348 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5349 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5350 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5351 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5356 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5357 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5358 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5363 ; GFX11-WGP: ; %bb.0: ; %entry
5364 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
5365 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5366 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5367 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5368 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
5373 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5374 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5375 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5376 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5381 ; GFX11-CU: ; %bb.0: ; %entry
5382 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
5383 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5384 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5385 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5386 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5391 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5392 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5396 ; GFX12-WGP: ; %bb.0: ; %entry
5397 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
5398 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5399 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5400 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5401 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
5406 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
5407 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
5408 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5409 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
5410 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
5411 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5416 ; GFX12-CU: ; %bb.0: ; %entry
5417 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
5418 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5419 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5420 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5421 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
5426 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
5427 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5438 ; GFX6: ; %bb.0: ; %entry
5440 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
5441 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
5442 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
5443 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5446 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
5456 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5457 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
5461 ; GFX7: ; %bb.0: ; %entry
5463 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
5464 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
5465 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
5467 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5482 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5483 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
5487 ; GFX10-WGP: ; %bb.0: ; %entry
5488 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
5489 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5490 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
5491 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
5492 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
5497 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5498 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5500 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5505 ; GFX10-CU: ; %bb.0: ; %entry
5506 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
5507 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5508 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
5509 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
5510 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5515 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5520 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
5522 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
5523 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
5524 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
5525 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5528 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
5538 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5539 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
5543 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
5544 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5545 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5546 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5547 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5548 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5553 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5558 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
5559 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5560 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5561 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5562 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5563 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5568 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5570 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5575 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
5576 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5577 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5578 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5579 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5580 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5585 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5586 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5590 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
5591 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5592 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5593 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5594 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5595 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5600 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5601 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5602 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5607 ; GFX11-WGP: ; %bb.0: ; %entry
5608 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
5609 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5610 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5611 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5612 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
5617 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5618 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5619 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5620 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5625 ; GFX11-CU: ; %bb.0: ; %entry
5626 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
5627 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5628 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5629 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5630 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5635 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5636 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5640 ; GFX12-WGP: ; %bb.0: ; %entry
5641 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
5642 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5643 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5644 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5645 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
5650 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
5651 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
5652 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5653 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
5654 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
5655 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5660 ; GFX12-CU: ; %bb.0: ; %entry
5661 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
5662 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5663 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5664 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5665 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
5670 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
5671 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5682 ; GFX6: ; %bb.0: ; %entry
5684 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
5685 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
5686 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
5687 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5690 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
5700 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5701 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
5705 ; GFX7: ; %bb.0: ; %entry
5707 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
5708 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
5709 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
5711 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5726 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5727 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
5731 ; GFX10-WGP: ; %bb.0: ; %entry
5732 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
5733 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5734 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
5735 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
5736 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
5741 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5742 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5744 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5749 ; GFX10-CU: ; %bb.0: ; %entry
5750 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
5751 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5752 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
5753 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
5754 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5759 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
5764 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
5766 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
5767 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
5768 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
5769 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5772 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
5782 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
5783 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
5787 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
5788 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5789 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5790 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5791 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5792 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5797 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5802 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
5803 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5804 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5805 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
5806 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
5807 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5812 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5814 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5819 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
5820 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5821 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5822 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5823 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5824 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5829 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5830 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5834 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
5835 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
5836 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
5837 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
5838 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
5839 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
5844 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5845 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
5846 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
5851 ; GFX11-WGP: ; %bb.0: ; %entry
5852 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
5853 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5854 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5855 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5856 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
5861 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5862 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5863 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5864 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5869 ; GFX11-CU: ; %bb.0: ; %entry
5870 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
5871 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5872 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5873 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5874 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5879 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
5880 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5884 ; GFX12-WGP: ; %bb.0: ; %entry
5885 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
5886 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5887 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
5888 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
5889 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
5894 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
5895 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
5896 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5897 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
5898 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
5899 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
5904 ; GFX12-CU: ; %bb.0: ; %entry
5905 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
5906 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
5907 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
5908 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
5909 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
5914 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
5915 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
5926 ; GFX6: ; %bb.0: ; %entry
5928 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
5929 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
5930 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
5931 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5934 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
5944 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
5945 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
5949 ; GFX7: ; %bb.0: ; %entry
5951 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
5952 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
5953 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
5955 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5970 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
5971 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
5975 ; GFX10-WGP: ; %bb.0: ; %entry
5976 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
5977 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5978 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
5979 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
5980 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
5985 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
5986 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5988 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
5993 ; GFX10-CU: ; %bb.0: ; %entry
5994 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
5995 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
5996 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
5997 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
5998 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
6003 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
6008 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
6010 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
6011 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
6012 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
6013 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
6016 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
6026 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
6027 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
6031 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
6032 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6033 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6034 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6035 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6036 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6041 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6046 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
6047 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6048 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6049 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6050 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6051 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6056 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6058 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6063 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
6064 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6065 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6066 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6067 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6068 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6073 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6074 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
6078 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
6079 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6080 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6081 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6082 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6083 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6088 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6089 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
6090 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6095 ; GFX11-WGP: ; %bb.0: ; %entry
6096 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
6097 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6098 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6099 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6100 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
6105 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6106 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
6107 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
6108 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
6113 ; GFX11-CU: ; %bb.0: ; %entry
6114 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
6115 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6116 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6117 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6118 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
6123 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
6124 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
6128 ; GFX12-WGP: ; %bb.0: ; %entry
6129 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
6130 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6131 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6132 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6133 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
6138 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
6139 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
6140 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
6141 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
6142 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
6143 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
6148 ; GFX12-CU: ; %bb.0: ; %entry
6149 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
6150 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6151 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6152 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6153 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
6158 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
6159 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
6170 ; GFX6: ; %bb.0: ; %entry
6172 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
6173 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
6174 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
6175 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
6178 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
6188 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
6189 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
6193 ; GFX7: ; %bb.0: ; %entry
6195 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
6196 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
6197 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
6199 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
6214 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
6215 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
6219 ; GFX10-WGP: ; %bb.0: ; %entry
6220 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
6221 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6222 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
6223 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
6224 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
6229 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6230 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
6232 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
6237 ; GFX10-CU: ; %bb.0: ; %entry
6238 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
6239 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6240 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
6241 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
6242 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
6247 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
6252 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
6254 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
6255 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
6256 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
6257 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
6260 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
6270 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
6271 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
6275 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
6276 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6277 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6278 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6279 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6280 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6285 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6290 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
6291 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6292 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6293 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6294 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6295 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6300 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6302 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6307 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
6308 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6309 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6310 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6311 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6312 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6317 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6318 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
6322 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
6323 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6324 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6325 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6326 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6327 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6332 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6333 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
6334 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6339 ; GFX11-WGP: ; %bb.0: ; %entry
6340 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
6341 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6342 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6343 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6344 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
6349 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6350 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
6351 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
6352 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
6357 ; GFX11-CU: ; %bb.0: ; %entry
6358 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
6359 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6360 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6361 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6362 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
6367 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
6368 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
6372 ; GFX12-WGP: ; %bb.0: ; %entry
6373 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
6374 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6375 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6376 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6377 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
6382 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
6383 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
6384 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
6385 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
6386 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
6387 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
6392 ; GFX12-CU: ; %bb.0: ; %entry
6393 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
6394 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6395 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6396 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6397 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
6402 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
6403 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
6414 ; GFX6: ; %bb.0: ; %entry
6416 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
6417 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
6418 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
6419 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
6422 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
6432 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
6434 ; GFX6-NEXT: s_waitcnt vmcnt(0)
6435 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
6439 ; GFX7: ; %bb.0: ; %entry
6441 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
6442 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
6443 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
6445 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
6460 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
6463 ; GFX7-NEXT: s_waitcnt vmcnt(0)
6464 ; GFX7-NEXT: flat_store_dword v[0:1], v2
6468 ; GFX10-WGP: ; %bb.0: ; %entry
6469 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
6470 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6471 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
6472 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
6473 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
6479 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
6484 ; GFX10-CU: ; %bb.0: ; %entry
6485 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
6486 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6487 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
6488 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
6489 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
6495 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
6500 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
6502 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
6503 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
6504 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
6505 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
6508 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
6518 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
6520 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
6521 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
6525 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
6526 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6527 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6528 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6529 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6530 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6536 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
6541 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
6542 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6543 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6544 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6545 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6546 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6552 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6557 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
6558 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6559 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6560 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6561 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6562 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6567 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
6568 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
6569 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
6573 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
6574 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6575 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6576 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6577 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6578 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6583 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
6584 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6585 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
6589 ; GFX11-WGP: ; %bb.0: ; %entry
6590 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
6591 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6592 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6593 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6594 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
6599 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
6600 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
6601 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
6605 ; GFX11-CU: ; %bb.0: ; %entry
6606 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
6607 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6608 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6609 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6610 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
6615 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
6616 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
6617 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
6621 ; GFX12-WGP: ; %bb.0: ; %entry
6622 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
6623 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6624 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6625 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6626 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
6631 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
6632 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
6633 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
6637 ; GFX12-CU: ; %bb.0: ; %entry
6638 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
6639 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6640 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6641 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6642 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
6647 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
6648 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
6649 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
6655 %val0 = extractvalue { i32, i1 } %val, 0
6662 ; GFX6: ; %bb.0: ; %entry
6664 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
6665 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
6666 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
6667 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
6670 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
6680 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
6682 ; GFX6-NEXT: s_waitcnt vmcnt(0)
6683 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
6687 ; GFX7: ; %bb.0: ; %entry
6689 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
6690 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
6691 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
6693 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
6708 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
6711 ; GFX7-NEXT: s_waitcnt vmcnt(0)
6712 ; GFX7-NEXT: flat_store_dword v[0:1], v2
6716 ; GFX10-WGP: ; %bb.0: ; %entry
6717 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
6718 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6719 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
6720 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
6721 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
6727 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
6733 ; GFX10-CU: ; %bb.0: ; %entry
6734 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
6735 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6736 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
6737 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
6738 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
6744 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
6749 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
6751 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
6752 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
6753 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
6754 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
6757 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
6767 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
6769 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
6770 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
6774 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
6775 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6776 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6777 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6778 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6779 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6785 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
6790 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
6791 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6792 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6793 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
6794 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
6795 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6801 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6807 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
6808 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6809 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6810 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6811 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6812 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6817 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
6818 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
6819 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
6823 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
6824 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
6825 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
6826 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
6827 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
6828 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
6833 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
6834 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
6836 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
6840 ; GFX11-WGP: ; %bb.0: ; %entry
6841 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
6842 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6843 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6844 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6845 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
6850 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
6851 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
6853 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
6857 ; GFX11-CU: ; %bb.0: ; %entry
6858 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
6859 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6860 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6861 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6862 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
6867 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
6868 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
6869 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
6873 ; GFX12-WGP: ; %bb.0: ; %entry
6874 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
6875 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6876 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
6877 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
6878 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
6883 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
6884 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
6886 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
6890 ; GFX12-CU: ; %bb.0: ; %entry
6891 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
6892 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
6893 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
6894 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
6895 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
6900 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
6901 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
6902 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
6908 %val0 = extractvalue { i32, i1 } %val, 0
6915 ; GFX6: ; %bb.0: ; %entry
6917 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
6918 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
6919 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
6920 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
6923 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
6933 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
6934 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
6936 ; GFX6-NEXT: s_waitcnt vmcnt(0)
6937 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
6941 ; GFX7: ; %bb.0: ; %entry
6943 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
6944 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
6945 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
6947 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
6962 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
6963 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
6966 ; GFX7-NEXT: s_waitcnt vmcnt(0)
6967 ; GFX7-NEXT: flat_store_dword v[0:1], v2
6971 ; GFX10-WGP: ; %bb.0: ; %entry
6972 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
6973 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6974 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
6975 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
6976 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
6981 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
6982 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
6984 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
6989 ; GFX10-CU: ; %bb.0: ; %entry
6990 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
6991 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
6992 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
6993 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
6994 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
6999 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
7001 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
7006 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
7008 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
7009 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
7010 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
7011 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
7014 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
7024 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
7025 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
7027 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
7028 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
7032 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
7033 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7034 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7035 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7036 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7037 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7042 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7044 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7049 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
7050 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7051 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7052 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7053 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7054 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7059 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7061 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7066 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
7067 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7068 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7069 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7070 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7071 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7076 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7077 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7078 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7079 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7083 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
7084 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7085 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7086 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7087 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7088 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7093 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7094 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7095 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7096 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7100 ; GFX11-WGP: ; %bb.0: ; %entry
7101 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
7102 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7103 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7104 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7105 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
7110 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7111 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
7112 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7113 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
7114 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7118 ; GFX11-CU: ; %bb.0: ; %entry
7119 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
7120 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7121 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7122 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7123 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
7128 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
7129 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7130 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
7131 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7135 ; GFX12-WGP: ; %bb.0: ; %entry
7136 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
7137 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7138 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7139 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7140 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
7145 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
7146 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
7147 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
7148 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
7149 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
7150 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
7151 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7155 ; GFX12-CU: ; %bb.0: ; %entry
7156 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
7157 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7158 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7159 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7160 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
7165 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
7166 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
7167 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
7168 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7174 %val0 = extractvalue { i32, i1 } %val, 0
7181 ; GFX6: ; %bb.0: ; %entry
7183 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
7184 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
7185 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
7186 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
7189 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
7199 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
7200 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
7202 ; GFX6-NEXT: s_waitcnt vmcnt(0)
7203 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
7207 ; GFX7: ; %bb.0: ; %entry
7209 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
7210 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
7211 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
7213 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
7228 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
7229 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
7232 ; GFX7-NEXT: s_waitcnt vmcnt(0)
7233 ; GFX7-NEXT: flat_store_dword v[0:1], v2
7237 ; GFX10-WGP: ; %bb.0: ; %entry
7238 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
7239 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7240 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
7241 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
7242 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
7247 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7248 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
7250 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
7256 ; GFX10-CU: ; %bb.0: ; %entry
7257 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
7258 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7259 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
7260 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
7261 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
7266 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
7268 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
7273 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
7275 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
7276 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
7277 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
7278 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
7281 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
7291 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
7292 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
7294 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
7295 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
7299 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
7300 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7301 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7302 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7303 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7304 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7309 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7311 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7316 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
7317 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7318 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7319 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7320 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7321 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7326 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7328 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7334 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
7335 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7336 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7337 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7338 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7339 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7344 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7345 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7346 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7347 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7351 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
7352 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7353 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7354 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7355 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7356 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7361 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7362 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7363 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7365 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7369 ; GFX11-WGP: ; %bb.0: ; %entry
7370 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
7371 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7372 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7373 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7374 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
7379 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7380 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
7381 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7382 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
7384 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7388 ; GFX11-CU: ; %bb.0: ; %entry
7389 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
7390 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7391 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7392 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7393 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
7398 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
7399 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7400 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
7401 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7405 ; GFX12-WGP: ; %bb.0: ; %entry
7406 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
7407 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7408 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7409 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7410 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
7415 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
7416 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
7417 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
7418 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
7419 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
7420 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
7421 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
7422 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
7424 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7428 ; GFX12-CU: ; %bb.0: ; %entry
7429 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
7430 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7431 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7432 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7433 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
7438 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
7439 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
7440 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
7441 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7447 %val0 = extractvalue { i32, i1 } %val, 0
7454 ; GFX6: ; %bb.0: ; %entry
7456 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
7457 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
7458 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
7459 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
7462 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
7472 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
7473 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
7475 ; GFX6-NEXT: s_waitcnt vmcnt(0)
7476 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
7480 ; GFX7: ; %bb.0: ; %entry
7482 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
7483 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
7484 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
7486 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
7501 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
7502 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
7505 ; GFX7-NEXT: s_waitcnt vmcnt(0)
7506 ; GFX7-NEXT: flat_store_dword v[0:1], v2
7510 ; GFX10-WGP: ; %bb.0: ; %entry
7511 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
7512 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7513 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
7514 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
7515 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
7520 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7521 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
7523 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
7529 ; GFX10-CU: ; %bb.0: ; %entry
7530 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
7531 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7532 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
7533 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
7534 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
7539 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
7541 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
7546 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
7548 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
7549 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
7550 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
7551 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
7554 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
7564 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
7565 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
7567 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
7568 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
7572 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
7573 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7574 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7575 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7576 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7577 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7582 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7584 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7589 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
7590 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7591 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7592 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7593 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7594 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7599 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7601 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7607 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
7608 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7609 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7610 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7611 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7612 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7617 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7618 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7619 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7620 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7624 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
7625 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7626 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7627 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7628 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7629 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7634 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7635 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7636 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7638 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7642 ; GFX11-WGP: ; %bb.0: ; %entry
7643 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
7644 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7645 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7646 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7647 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
7652 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
7653 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
7654 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7655 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
7657 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7661 ; GFX11-CU: ; %bb.0: ; %entry
7662 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
7663 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7664 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7665 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7666 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
7671 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
7672 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7673 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
7674 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7678 ; GFX12-WGP: ; %bb.0: ; %entry
7679 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
7680 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7681 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7682 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7683 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
7688 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
7689 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
7690 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
7691 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
7692 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
7693 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
7694 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
7695 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
7697 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7701 ; GFX12-CU: ; %bb.0: ; %entry
7702 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
7703 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7704 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7705 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7706 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
7711 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
7712 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
7713 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
7714 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7720 %val0 = extractvalue { i32, i1 } %val, 0
7727 ; GFX6: ; %bb.0: ; %entry
7729 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
7730 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
7731 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
7732 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
7735 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
7745 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
7747 ; GFX6-NEXT: s_waitcnt vmcnt(0)
7748 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
7752 ; GFX7: ; %bb.0: ; %entry
7754 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
7755 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
7756 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
7758 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
7773 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
7776 ; GFX7-NEXT: s_waitcnt vmcnt(0)
7777 ; GFX7-NEXT: flat_store_dword v[0:1], v2
7781 ; GFX10-WGP: ; %bb.0: ; %entry
7782 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
7783 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7784 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
7785 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
7786 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
7792 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
7798 ; GFX10-CU: ; %bb.0: ; %entry
7799 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
7800 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7801 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
7802 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
7803 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
7809 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
7814 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
7816 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
7817 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
7818 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
7819 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
7822 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
7832 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
7834 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
7835 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
7839 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
7840 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7841 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7842 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7843 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7844 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7850 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7855 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
7856 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7857 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
7858 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
7859 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
7860 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7866 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7872 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
7873 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7874 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7875 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7876 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7877 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7882 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7883 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
7884 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7888 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
7889 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
7890 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
7891 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
7892 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
7893 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
7898 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
7899 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
7901 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
7905 ; GFX11-WGP: ; %bb.0: ; %entry
7906 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
7907 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7908 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7909 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7910 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
7915 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7916 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
7918 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7922 ; GFX11-CU: ; %bb.0: ; %entry
7923 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
7924 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7925 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7926 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7927 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
7932 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
7933 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
7934 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7938 ; GFX12-WGP: ; %bb.0: ; %entry
7939 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
7940 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7941 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
7942 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
7943 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
7948 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
7949 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
7950 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
7951 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
7953 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
7957 ; GFX12-CU: ; %bb.0: ; %entry
7958 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
7959 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
7960 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
7961 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
7962 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
7967 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
7968 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
7969 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
7975 %val0 = extractvalue { i32, i1 } %val, 0
7982 ; GFX6: ; %bb.0: ; %entry
7984 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
7985 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
7986 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
7987 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
7990 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
8000 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
8002 ; GFX6-NEXT: s_waitcnt vmcnt(0)
8003 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
8007 ; GFX7: ; %bb.0: ; %entry
8009 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
8010 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
8011 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
8013 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
8028 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
8031 ; GFX7-NEXT: s_waitcnt vmcnt(0)
8032 ; GFX7-NEXT: flat_store_dword v[0:1], v2
8036 ; GFX10-WGP: ; %bb.0: ; %entry
8037 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
8038 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8039 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
8040 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
8041 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
8047 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
8053 ; GFX10-CU: ; %bb.0: ; %entry
8054 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
8055 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8056 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
8057 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
8058 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
8064 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
8069 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
8071 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
8072 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
8073 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
8074 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
8077 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
8087 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
8089 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
8090 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
8094 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
8095 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8096 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8097 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8098 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8099 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8105 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8110 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
8111 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8112 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8113 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8114 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8115 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8121 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8127 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
8128 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8129 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8130 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8131 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8132 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8137 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8138 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8139 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8143 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
8144 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8145 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8146 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8147 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8148 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8153 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8154 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8156 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8160 ; GFX11-WGP: ; %bb.0: ; %entry
8161 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
8162 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8163 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
8164 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
8165 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
8170 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
8171 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
8173 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
8177 ; GFX11-CU: ; %bb.0: ; %entry
8178 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
8179 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8180 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
8181 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
8182 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
8187 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
8188 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
8189 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
8193 ; GFX12-WGP: ; %bb.0: ; %entry
8194 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
8195 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8196 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
8197 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
8198 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
8203 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
8204 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
8206 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
8210 ; GFX12-CU: ; %bb.0: ; %entry
8211 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
8212 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8213 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
8214 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
8215 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
8220 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
8221 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
8222 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
8228 %val0 = extractvalue { i32, i1 } %val, 0
8235 ; GFX6: ; %bb.0: ; %entry
8237 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
8238 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
8239 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
8240 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
8243 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
8253 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
8254 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
8256 ; GFX6-NEXT: s_waitcnt vmcnt(0)
8257 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
8261 ; GFX7: ; %bb.0: ; %entry
8263 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
8264 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
8265 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
8267 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
8282 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
8283 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
8286 ; GFX7-NEXT: s_waitcnt vmcnt(0)
8287 ; GFX7-NEXT: flat_store_dword v[0:1], v2
8291 ; GFX10-WGP: ; %bb.0: ; %entry
8292 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
8293 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8294 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
8295 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
8296 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
8301 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8302 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
8304 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
8310 ; GFX10-CU: ; %bb.0: ; %entry
8311 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
8312 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8313 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
8314 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
8315 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
8320 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
8322 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
8327 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
8329 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
8330 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
8331 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
8332 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
8335 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
8345 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
8346 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
8348 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
8349 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
8353 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
8354 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8355 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8356 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8357 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8358 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8363 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8365 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8370 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
8371 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8372 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8373 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8374 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8375 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8380 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8382 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8388 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
8389 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8390 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8391 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8392 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8393 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8398 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8399 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8400 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8401 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8405 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
8406 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8407 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8408 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8409 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8410 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8415 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8416 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8417 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8419 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8423 ; GFX11-WGP: ; %bb.0: ; %entry
8424 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
8425 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8426 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
8427 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
8428 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
8433 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8434 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
8435 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
8436 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
8438 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
8442 ; GFX11-CU: ; %bb.0: ; %entry
8443 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
8444 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8445 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
8446 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
8447 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
8452 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
8453 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
8454 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
8455 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
8459 ; GFX12-WGP: ; %bb.0: ; %entry
8460 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
8461 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8462 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
8463 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
8464 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
8469 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
8470 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
8471 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
8472 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
8473 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
8474 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
8475 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
8476 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
8478 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
8482 ; GFX12-CU: ; %bb.0: ; %entry
8483 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
8484 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8485 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
8486 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
8487 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
8492 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
8493 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
8494 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
8495 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
8501 %val0 = extractvalue { i32, i1 } %val, 0
8508 ; GFX6: ; %bb.0: ; %entry
8510 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
8511 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
8512 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
8513 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
8516 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
8526 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
8527 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
8529 ; GFX6-NEXT: s_waitcnt vmcnt(0)
8530 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
8534 ; GFX7: ; %bb.0: ; %entry
8536 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
8537 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
8538 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
8540 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
8555 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
8556 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
8559 ; GFX7-NEXT: s_waitcnt vmcnt(0)
8560 ; GFX7-NEXT: flat_store_dword v[0:1], v2
8564 ; GFX10-WGP: ; %bb.0: ; %entry
8565 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
8566 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8567 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
8568 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
8569 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
8574 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8575 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
8577 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
8583 ; GFX10-CU: ; %bb.0: ; %entry
8584 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
8585 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8586 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
8587 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
8588 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
8593 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
8595 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
8600 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
8602 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
8603 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
8604 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
8605 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
8608 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
8618 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
8619 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
8621 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
8622 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
8626 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
8627 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8628 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8629 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8630 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8631 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8636 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8638 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8643 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
8644 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8645 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8646 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8647 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8648 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8653 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8655 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8661 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
8662 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8663 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8664 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8665 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8666 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8671 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8672 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8673 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8674 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8678 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
8679 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8680 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8681 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8682 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8683 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8688 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8689 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8690 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8692 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8696 ; GFX11-WGP: ; %bb.0: ; %entry
8697 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
8698 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8699 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
8700 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
8701 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
8706 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8707 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
8708 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
8709 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
8711 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
8715 ; GFX11-CU: ; %bb.0: ; %entry
8716 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
8717 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8718 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
8719 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
8720 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
8725 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
8726 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
8727 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
8728 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
8732 ; GFX12-WGP: ; %bb.0: ; %entry
8733 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
8734 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8735 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
8736 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
8737 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
8742 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
8743 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
8744 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
8745 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
8746 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
8747 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
8748 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
8749 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
8751 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
8755 ; GFX12-CU: ; %bb.0: ; %entry
8756 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
8757 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8758 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
8759 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
8760 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
8765 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
8766 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
8767 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
8768 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
8774 %val0 = extractvalue { i32, i1 } %val, 0
8781 ; GFX6: ; %bb.0: ; %entry
8783 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
8784 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
8785 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
8786 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
8789 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
8799 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
8800 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
8802 ; GFX6-NEXT: s_waitcnt vmcnt(0)
8803 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
8807 ; GFX7: ; %bb.0: ; %entry
8809 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
8810 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
8811 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
8813 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
8828 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
8829 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
8832 ; GFX7-NEXT: s_waitcnt vmcnt(0)
8833 ; GFX7-NEXT: flat_store_dword v[0:1], v2
8837 ; GFX10-WGP: ; %bb.0: ; %entry
8838 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
8839 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8840 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
8841 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
8842 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
8847 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8848 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
8850 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
8856 ; GFX10-CU: ; %bb.0: ; %entry
8857 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
8858 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8859 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
8860 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
8861 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
8866 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
8868 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
8873 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
8875 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
8876 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
8877 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
8878 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
8881 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
8891 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
8892 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
8894 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
8895 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
8899 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
8900 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8901 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8902 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8903 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8904 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8909 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8911 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8916 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
8917 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8918 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
8919 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
8920 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
8921 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8926 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8928 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8934 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
8935 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8936 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8937 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8938 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8939 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8944 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8945 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8946 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
8947 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8951 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
8952 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
8953 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
8954 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
8955 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
8956 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
8961 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8962 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
8963 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
8965 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
8969 ; GFX11-WGP: ; %bb.0: ; %entry
8970 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
8971 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8972 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
8973 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
8974 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
8979 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
8980 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
8981 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
8982 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
8984 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
8988 ; GFX11-CU: ; %bb.0: ; %entry
8989 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
8990 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
8991 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
8992 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
8993 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
8998 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
8999 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
9000 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
9001 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9005 ; GFX12-WGP: ; %bb.0: ; %entry
9006 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
9007 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9008 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
9009 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
9010 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
9015 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
9016 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
9017 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
9018 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
9019 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
9020 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
9021 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
9022 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
9024 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
9028 ; GFX12-CU: ; %bb.0: ; %entry
9029 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
9030 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9031 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
9032 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
9033 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
9038 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
9039 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
9040 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
9041 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9047 %val0 = extractvalue { i32, i1 } %val, 0
9054 ; GFX6: ; %bb.0: ; %entry
9056 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9057 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
9058 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
9059 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9062 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
9072 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9073 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
9075 ; GFX6-NEXT: s_waitcnt vmcnt(0)
9076 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
9080 ; GFX7: ; %bb.0: ; %entry
9082 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9083 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
9084 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
9086 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9101 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9102 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
9105 ; GFX7-NEXT: s_waitcnt vmcnt(0)
9106 ; GFX7-NEXT: flat_store_dword v[0:1], v2
9110 ; GFX10-WGP: ; %bb.0: ; %entry
9111 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
9112 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9113 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
9114 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
9115 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
9120 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9121 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
9123 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
9129 ; GFX10-CU: ; %bb.0: ; %entry
9130 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
9131 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9132 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
9133 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
9134 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9139 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9141 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
9146 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
9148 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
9149 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
9150 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
9151 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9154 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
9164 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9165 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
9167 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
9168 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
9172 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
9173 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9174 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9175 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
9176 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
9177 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9182 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9184 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
9189 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
9190 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9191 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9192 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
9193 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
9194 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9199 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9201 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
9207 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
9208 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9209 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
9210 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
9211 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
9212 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9217 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9218 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
9219 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
9220 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
9224 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
9225 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9226 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
9227 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
9228 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
9229 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9234 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9235 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
9236 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
9238 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
9242 ; GFX11-WGP: ; %bb.0: ; %entry
9243 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
9244 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9245 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
9246 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
9247 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
9252 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9253 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
9254 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
9255 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
9257 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
9261 ; GFX11-CU: ; %bb.0: ; %entry
9262 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
9263 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9264 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
9265 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
9266 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
9271 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
9272 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
9273 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
9274 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9278 ; GFX12-WGP: ; %bb.0: ; %entry
9279 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
9280 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9281 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
9282 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
9283 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
9288 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
9289 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
9290 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
9291 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
9292 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
9293 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
9294 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
9295 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
9297 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
9301 ; GFX12-CU: ; %bb.0: ; %entry
9302 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
9303 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9304 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
9305 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
9306 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
9311 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
9312 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
9313 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
9314 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9320 %val0 = extractvalue { i32, i1 } %val, 0
9327 ; GFX6: ; %bb.0: ; %entry
9329 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9330 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
9331 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
9332 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9335 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
9345 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9346 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
9348 ; GFX6-NEXT: s_waitcnt vmcnt(0)
9349 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
9353 ; GFX7: ; %bb.0: ; %entry
9355 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9356 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
9357 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
9359 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9374 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9375 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
9378 ; GFX7-NEXT: s_waitcnt vmcnt(0)
9379 ; GFX7-NEXT: flat_store_dword v[0:1], v2
9383 ; GFX10-WGP: ; %bb.0: ; %entry
9384 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
9385 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9386 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
9387 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
9388 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
9393 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9394 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
9396 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
9402 ; GFX10-CU: ; %bb.0: ; %entry
9403 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
9404 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9405 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
9406 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
9407 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9412 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9414 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
9419 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
9421 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
9422 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
9423 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
9424 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9427 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
9437 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9438 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
9440 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
9441 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
9445 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
9446 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9447 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9448 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
9449 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
9450 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9455 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9457 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
9462 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
9463 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9464 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9465 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
9466 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
9467 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9472 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9474 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
9480 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
9481 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9482 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
9483 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
9484 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
9485 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9490 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9491 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
9492 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
9493 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
9497 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
9498 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9499 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
9500 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
9501 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
9502 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9507 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9508 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
9509 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
9511 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
9515 ; GFX11-WGP: ; %bb.0: ; %entry
9516 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
9517 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9518 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
9519 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
9520 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
9525 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9526 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
9527 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
9528 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
9530 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
9534 ; GFX11-CU: ; %bb.0: ; %entry
9535 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
9536 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9537 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
9538 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
9539 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
9544 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
9545 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
9546 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
9547 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9551 ; GFX12-WGP: ; %bb.0: ; %entry
9552 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
9553 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9554 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
9555 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
9556 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
9561 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
9562 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
9563 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
9564 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
9565 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
9566 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
9568 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
9572 ; GFX12-CU: ; %bb.0: ; %entry
9573 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
9574 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9575 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
9576 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
9577 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
9582 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
9583 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
9584 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
9585 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9591 %val0 = extractvalue { i32, i1 } %val, 0
9598 ; GFX6: ; %bb.0: ; %entry
9600 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9601 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
9602 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
9603 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9606 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
9616 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9617 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
9619 ; GFX6-NEXT: s_waitcnt vmcnt(0)
9620 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
9624 ; GFX7: ; %bb.0: ; %entry
9626 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9627 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
9628 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
9630 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9645 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9646 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
9649 ; GFX7-NEXT: s_waitcnt vmcnt(0)
9650 ; GFX7-NEXT: flat_store_dword v[0:1], v2
9654 ; GFX10-WGP: ; %bb.0: ; %entry
9655 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
9656 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9657 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
9658 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
9659 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
9664 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9665 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
9667 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
9673 ; GFX10-CU: ; %bb.0: ; %entry
9674 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
9675 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9676 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
9677 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
9678 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9683 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9685 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
9690 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
9692 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
9693 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
9694 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
9695 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9698 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
9708 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9709 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
9711 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
9712 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
9716 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
9717 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9718 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9719 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
9720 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
9721 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9726 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9728 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
9733 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
9734 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9735 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9736 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
9737 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
9738 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9743 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9745 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
9751 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
9752 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9753 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
9754 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
9755 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
9756 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9761 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9762 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
9763 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
9764 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
9768 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
9769 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9770 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
9771 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
9772 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
9773 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9778 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9779 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
9780 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
9782 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
9786 ; GFX11-WGP: ; %bb.0: ; %entry
9787 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
9788 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9789 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
9790 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
9791 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
9796 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9797 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
9798 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
9799 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
9801 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
9805 ; GFX11-CU: ; %bb.0: ; %entry
9806 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
9807 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9808 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
9809 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
9810 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
9815 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
9816 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
9817 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
9818 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9822 ; GFX12-WGP: ; %bb.0: ; %entry
9823 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
9824 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9825 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
9826 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
9827 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
9832 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
9833 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
9834 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
9835 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
9836 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
9837 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
9838 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
9839 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
9841 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
9845 ; GFX12-CU: ; %bb.0: ; %entry
9846 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
9847 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
9848 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
9849 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
9850 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
9855 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
9856 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
9857 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
9858 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
9864 %val0 = extractvalue { i32, i1 } %val, 0
9871 ; GFX6: ; %bb.0: ; %entry
9873 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9874 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
9875 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
9876 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9879 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
9889 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
9890 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
9892 ; GFX6-NEXT: s_waitcnt vmcnt(0)
9893 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
9897 ; GFX7: ; %bb.0: ; %entry
9899 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
9900 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
9901 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
9903 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9918 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
9919 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
9922 ; GFX7-NEXT: s_waitcnt vmcnt(0)
9923 ; GFX7-NEXT: flat_store_dword v[0:1], v2
9927 ; GFX10-WGP: ; %bb.0: ; %entry
9928 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
9929 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9930 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
9931 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
9932 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
9937 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
9938 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
9940 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
9946 ; GFX10-CU: ; %bb.0: ; %entry
9947 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
9948 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9949 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
9950 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
9951 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9956 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
9958 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
9963 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
9965 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
9966 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
9967 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
9968 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9971 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
9981 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
9982 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
9984 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
9985 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
9989 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
9990 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
9991 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
9992 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
9993 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
9994 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
9999 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10001 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10006 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
10007 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10008 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
10009 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
10010 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
10011 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10016 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
10018 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10024 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
10025 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10026 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
10027 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
10028 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
10029 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10034 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10035 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
10036 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10037 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10041 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
10042 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10043 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
10044 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
10045 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
10046 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10051 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
10052 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
10053 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10055 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10059 ; GFX11-WGP: ; %bb.0: ; %entry
10060 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
10061 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10062 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
10063 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
10064 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
10069 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
10070 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
10071 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
10072 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
10074 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10078 ; GFX11-CU: ; %bb.0: ; %entry
10079 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
10080 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10081 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
10082 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
10083 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
10088 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
10089 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
10090 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
10091 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10095 ; GFX12-WGP: ; %bb.0: ; %entry
10096 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
10097 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10098 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
10099 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
10100 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
10105 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
10106 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
10107 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
10108 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
10109 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
10110 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
10111 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
10112 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
10114 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10118 ; GFX12-CU: ; %bb.0: ; %entry
10119 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
10120 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10121 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
10122 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
10123 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
10128 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
10129 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
10130 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
10131 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10137 %val0 = extractvalue { i32, i1 } %val, 0
10144 ; GFX6: ; %bb.0: ; %entry
10146 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
10147 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
10148 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
10149 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
10152 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
10162 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
10163 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
10165 ; GFX6-NEXT: s_waitcnt vmcnt(0)
10166 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
10170 ; GFX7: ; %bb.0: ; %entry
10172 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
10173 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
10174 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
10176 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
10191 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
10192 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
10195 ; GFX7-NEXT: s_waitcnt vmcnt(0)
10196 ; GFX7-NEXT: flat_store_dword v[0:1], v2
10200 ; GFX10-WGP: ; %bb.0: ; %entry
10201 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
10202 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
10203 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
10204 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
10205 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
10210 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
10211 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
10213 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
10219 ; GFX10-CU: ; %bb.0: ; %entry
10220 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
10221 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
10222 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
10223 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
10224 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
10229 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
10231 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
10236 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
10238 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
10239 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
10240 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
10241 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
10244 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
10254 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
10255 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
10257 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
10258 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
10262 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
10263 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10264 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
10265 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
10266 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
10267 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10272 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10274 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10279 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
10280 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10281 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
10282 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
10283 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
10284 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10289 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
10291 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10297 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
10298 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10299 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
10300 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
10301 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
10302 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10307 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10308 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
10309 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10310 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10314 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
10315 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10316 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
10317 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
10318 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
10319 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10324 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
10325 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
10326 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10328 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10332 ; GFX11-WGP: ; %bb.0: ; %entry
10333 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
10334 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10335 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
10336 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
10337 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
10342 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
10343 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
10344 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
10345 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
10347 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10351 ; GFX11-CU: ; %bb.0: ; %entry
10352 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
10353 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10354 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
10355 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
10356 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
10361 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
10362 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
10363 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
10364 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10368 ; GFX12-WGP: ; %bb.0: ; %entry
10369 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
10370 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10371 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
10372 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
10373 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
10378 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
10379 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
10380 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
10381 ; GFX12-WGP-NEXT: s_wait_loadcnt_dscnt 0x0
10382 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
10383 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
10384 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
10385 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
10387 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10391 ; GFX12-CU: ; %bb.0: ; %entry
10392 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
10393 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
10394 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
10395 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
10396 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
10401 ; GFX12-CU-NEXT: s_wait_dscnt 0x0
10402 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
10403 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
10404 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10410 %val0 = extractvalue { i32, i1 } %val, 0
10417 ; GFX6: ; %bb.0: ; %entry
10419 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
10420 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
10421 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
10424 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
10436 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
10437 ; GFX6-NEXT: s_waitcnt vmcnt(0)
10438 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
10442 ; GFX7: ; %bb.0: ; %entry
10443 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10444 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
10445 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
10448 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
10451 ; GFX7-NEXT: s_waitcnt vmcnt(0)
10452 ; GFX7-NEXT: flat_store_dword v[0:1], v2
10456 ; GFX10-WGP: ; %bb.0: ; %entry
10457 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
10458 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10459 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10460 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
10462 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
10467 ; GFX10-CU: ; %bb.0: ; %entry
10468 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
10469 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10470 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10471 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
10473 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
10478 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
10479 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
10480 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
10481 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
10482 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
10485 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
10497 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
10498 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
10499 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
10503 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
10504 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10505 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10506 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10507 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10509 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10514 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
10515 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10516 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10517 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10518 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10520 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10525 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
10526 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10527 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
10528 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
10529 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10531 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10532 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10536 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
10537 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10538 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
10539 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
10540 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10542 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10543 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10547 ; GFX11-WGP: ; %bb.0: ; %entry
10548 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
10549 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10550 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10551 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
10553 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
10554 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10558 ; GFX11-CU: ; %bb.0: ; %entry
10559 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
10560 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10561 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10562 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
10564 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
10565 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10569 ; GFX12-WGP: ; %bb.0: ; %entry
10570 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
10571 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10572 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10573 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
10575 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
10576 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10580 ; GFX12-CU: ; %bb.0: ; %entry
10581 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
10582 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10583 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10584 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
10586 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
10587 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10598 ; GFX6: ; %bb.0: ; %entry
10600 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
10601 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
10602 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
10605 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
10617 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
10618 ; GFX6-NEXT: s_waitcnt vmcnt(0)
10619 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
10623 ; GFX7: ; %bb.0: ; %entry
10624 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10625 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
10626 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
10629 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
10632 ; GFX7-NEXT: s_waitcnt vmcnt(0)
10633 ; GFX7-NEXT: flat_store_dword v[0:1], v2
10637 ; GFX10-WGP: ; %bb.0: ; %entry
10638 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
10639 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10640 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10641 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
10643 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
10648 ; GFX10-CU: ; %bb.0: ; %entry
10649 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
10650 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10651 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10652 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
10654 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
10659 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
10660 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
10661 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
10662 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
10663 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
10666 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
10678 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
10679 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
10680 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
10684 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
10685 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10686 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10687 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10688 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10690 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10695 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
10696 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10697 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10698 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10699 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10701 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10706 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
10707 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10708 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
10709 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
10710 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10712 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10713 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10717 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
10718 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10719 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
10720 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
10721 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10723 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10724 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10728 ; GFX11-WGP: ; %bb.0: ; %entry
10729 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
10730 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10731 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10732 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
10734 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
10735 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10739 ; GFX11-CU: ; %bb.0: ; %entry
10740 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
10741 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10742 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10743 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
10745 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
10746 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10750 ; GFX12-WGP: ; %bb.0: ; %entry
10751 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
10752 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10753 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10754 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
10756 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
10757 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10761 ; GFX12-CU: ; %bb.0: ; %entry
10762 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
10763 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10764 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10765 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
10767 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
10768 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10779 ; GFX6: ; %bb.0: ; %entry
10781 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
10782 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
10783 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
10786 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
10798 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
10799 ; GFX6-NEXT: s_waitcnt vmcnt(0)
10800 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
10804 ; GFX7: ; %bb.0: ; %entry
10805 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10806 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
10807 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
10810 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
10813 ; GFX7-NEXT: s_waitcnt vmcnt(0)
10814 ; GFX7-NEXT: flat_store_dword v[0:1], v2
10818 ; GFX10-WGP: ; %bb.0: ; %entry
10819 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
10820 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10821 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10822 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
10824 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
10830 ; GFX10-CU: ; %bb.0: ; %entry
10831 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
10832 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10833 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10834 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
10836 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
10841 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
10842 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
10843 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
10844 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
10845 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
10848 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
10860 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
10861 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
10862 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
10866 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
10867 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10868 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10869 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10870 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10872 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10877 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
10878 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10879 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10880 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
10881 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10883 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10889 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
10890 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10891 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
10892 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
10893 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10895 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
10896 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10900 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
10901 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
10902 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
10903 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
10904 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
10906 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
10908 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
10912 ; GFX11-WGP: ; %bb.0: ; %entry
10913 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
10914 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10915 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10916 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
10918 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
10920 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10924 ; GFX11-CU: ; %bb.0: ; %entry
10925 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
10926 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10927 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10928 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
10930 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
10931 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10935 ; GFX12-WGP: ; %bb.0: ; %entry
10936 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
10937 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10938 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10939 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
10941 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
10943 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
10947 ; GFX12-CU: ; %bb.0: ; %entry
10948 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
10949 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
10950 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
10951 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
10953 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
10954 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
10965 ; GFX6: ; %bb.0: ; %entry
10967 ; GFX6-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
10968 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
10969 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
10972 ; GFX6-NEXT: s_mov_b32 s12, 0x100f000
10984 ; GFX6-NEXT: buffer_load_dword v0, off, s[8:11], 0
10985 ; GFX6-NEXT: s_waitcnt vmcnt(0)
10986 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
10990 ; GFX7: ; %bb.0: ; %entry
10991 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
10992 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x2
10993 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
10996 ; GFX7-NEXT: flat_load_dword v2, v[0:1]
10999 ; GFX7-NEXT: s_waitcnt vmcnt(0)
11000 ; GFX7-NEXT: flat_store_dword v[0:1], v2
11004 ; GFX10-WGP: ; %bb.0: ; %entry
11005 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
11006 ; GFX10-WGP-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
11007 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11008 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
11009 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
11011 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
11017 ; GFX10-CU: ; %bb.0: ; %entry
11018 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
11019 ; GFX10-CU-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
11020 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11021 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
11023 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
11028 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
11029 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
11030 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0
11031 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
11032 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
11035 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s8, 0xf000
11047 ; SKIP-CACHE-INV-NEXT: buffer_load_dword v0, off, s[4:7], 0
11048 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
11049 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
11053 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
11054 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11055 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
11056 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11057 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11059 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
11064 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
11065 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11066 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
11067 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11068 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
11070 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
11076 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
11077 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11078 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
11079 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11080 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11082 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
11083 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11087 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
11088 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11089 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x0
11090 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11091 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
11093 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
11095 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11099 ; GFX11-WGP: ; %bb.0: ; %entry
11100 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
11101 ; GFX11-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
11102 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11103 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
11104 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
11106 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
11108 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
11112 ; GFX11-CU: ; %bb.0: ; %entry
11113 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
11114 ; GFX11-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
11115 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11116 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
11118 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
11119 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11123 ; GFX12-WGP: ; %bb.0: ; %entry
11124 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
11125 ; GFX12-WGP-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
11126 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11127 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
11128 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
11129 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
11130 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
11131 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
11133 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
11134 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
11135 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
11137 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
11141 ; GFX12-CU: ; %bb.0: ; %entry
11142 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
11143 ; GFX12-CU-NEXT: s_load_b64 s[2:3], s[4:5], 0x0
11144 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11145 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
11147 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
11148 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11159 ; GFX6: ; %bb.0: ; %entry
11161 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
11162 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
11163 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
11166 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
11173 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
11177 ; GFX7: ; %bb.0: ; %entry
11178 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
11179 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
11180 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
11184 ; GFX7-NEXT: flat_store_dword v[0:1], v2
11188 ; GFX10-WGP: ; %bb.0: ; %entry
11189 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
11190 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11191 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
11192 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
11198 ; GFX10-CU: ; %bb.0: ; %entry
11199 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
11200 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11201 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
11202 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
11208 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
11209 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
11210 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
11211 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
11212 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
11215 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
11222 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
11226 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
11227 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11228 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11229 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11230 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11236 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
11237 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11238 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11239 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11240 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11246 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
11247 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11248 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11249 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11250 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11252 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11256 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
11257 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11258 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11259 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11260 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11262 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11266 ; GFX11-WGP: ; %bb.0: ; %entry
11267 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11268 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11269 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
11270 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
11272 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
11276 ; GFX11-CU: ; %bb.0: ; %entry
11277 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11278 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11279 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
11280 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
11282 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11286 ; GFX12-WGP: ; %bb.0: ; %entry
11287 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11288 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11289 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
11290 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
11292 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
11296 ; GFX12-CU: ; %bb.0: ; %entry
11297 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11298 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11299 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
11300 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
11302 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11312 ; GFX6: ; %bb.0: ; %entry
11314 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
11315 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
11316 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
11319 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
11326 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
11330 ; GFX7: ; %bb.0: ; %entry
11331 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
11332 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
11333 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
11337 ; GFX7-NEXT: flat_store_dword v[0:1], v2
11341 ; GFX10-WGP: ; %bb.0: ; %entry
11342 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
11343 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11344 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
11345 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
11351 ; GFX10-CU: ; %bb.0: ; %entry
11352 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
11353 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11354 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
11355 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
11361 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
11362 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
11363 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
11364 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
11365 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
11368 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
11375 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
11379 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
11380 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11381 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11382 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11383 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11389 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
11390 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11391 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11392 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11393 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11399 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
11400 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11401 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11402 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11403 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11405 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11409 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
11410 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11411 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11412 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11413 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11415 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11419 ; GFX11-WGP: ; %bb.0: ; %entry
11420 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11421 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11422 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
11423 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
11425 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
11429 ; GFX11-CU: ; %bb.0: ; %entry
11430 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11431 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11432 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
11433 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
11435 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11439 ; GFX12-WGP: ; %bb.0: ; %entry
11440 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11441 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11442 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
11443 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
11445 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1] scope:SCOPE_SE
11449 ; GFX12-CU: ; %bb.0: ; %entry
11450 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11451 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11452 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
11453 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
11455 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11465 ; GFX6: ; %bb.0: ; %entry
11467 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
11468 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
11469 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
11472 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
11479 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
11483 ; GFX7: ; %bb.0: ; %entry
11484 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
11485 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
11486 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
11490 ; GFX7-NEXT: flat_store_dword v[0:1], v2
11494 ; GFX10-WGP: ; %bb.0: ; %entry
11495 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
11496 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11497 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
11498 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
11500 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
11501 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
11506 ; GFX10-CU: ; %bb.0: ; %entry
11507 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
11508 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11509 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
11510 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
11516 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
11517 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
11518 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
11519 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
11520 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
11523 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
11530 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
11534 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
11535 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11536 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11537 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11538 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11544 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
11545 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11546 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11547 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11548 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11550 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
11555 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
11556 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11557 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11558 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11559 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11561 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11565 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
11566 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11567 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11568 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11569 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11571 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
11572 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11576 ; GFX11-WGP: ; %bb.0: ; %entry
11577 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11578 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11579 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
11580 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
11582 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
11583 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
11584 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
11588 ; GFX11-CU: ; %bb.0: ; %entry
11589 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11590 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11591 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
11592 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
11594 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11598 ; GFX12-WGP: ; %bb.0: ; %entry
11599 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11600 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11601 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
11602 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
11604 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
11605 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
11606 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
11607 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
11608 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1] scope:SCOPE_SE
11612 ; GFX12-CU: ; %bb.0: ; %entry
11613 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11614 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11615 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
11616 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
11618 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11628 ; GFX6: ; %bb.0: ; %entry
11630 ; GFX6-NEXT: s_load_dword s8, s[4:5], 0x0
11631 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x2
11632 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
11635 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
11642 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
11646 ; GFX7: ; %bb.0: ; %entry
11647 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x0
11648 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x2
11649 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
11653 ; GFX7-NEXT: flat_store_dword v[0:1], v2
11657 ; GFX10-WGP: ; %bb.0: ; %entry
11658 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x0
11659 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11660 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
11661 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
11663 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
11664 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
11669 ; GFX10-CU: ; %bb.0: ; %entry
11670 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x0
11671 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11672 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
11673 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
11679 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
11680 ; SKIP-CACHE-INV-NEXT: s_mov_b64 s[0:1], s[4:5]
11681 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[0:1], 0x0
11682 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x2
11683 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
11686 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
11693 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
11697 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
11698 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11699 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11700 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11701 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11707 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
11708 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x0
11709 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x8
11710 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11711 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11713 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
11718 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
11719 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11720 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11721 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11722 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11724 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11728 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
11729 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x0
11730 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x8
11731 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11732 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11734 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
11735 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
11739 ; GFX11-WGP: ; %bb.0: ; %entry
11740 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11741 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11742 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
11743 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
11745 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
11746 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
11747 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
11751 ; GFX11-CU: ; %bb.0: ; %entry
11752 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11753 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11754 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
11755 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
11757 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11761 ; GFX12-WGP: ; %bb.0: ; %entry
11762 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x0
11763 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11764 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
11765 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
11767 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
11768 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
11769 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
11770 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
11771 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1] scope:SCOPE_SE
11775 ; GFX12-CU: ; %bb.0: ; %entry
11776 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x0
11777 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x8
11778 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
11779 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
11781 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
11791 ; GFX6: ; %bb.0: ; %entry
11792 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11793 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
11794 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
11797 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
11804 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
11808 ; GFX7: ; %bb.0: ; %entry
11809 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
11810 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
11811 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
11815 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
11819 ; GFX10-WGP: ; %bb.0: ; %entry
11820 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
11821 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11822 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
11823 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
11829 ; GFX10-CU: ; %bb.0: ; %entry
11830 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
11831 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11832 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
11833 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
11839 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
11840 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
11841 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
11842 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
11845 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
11852 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
11856 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
11857 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11858 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11859 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
11860 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11866 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
11867 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11868 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11869 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
11870 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11876 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
11877 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11878 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
11879 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
11880 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11882 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
11886 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
11887 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
11888 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
11889 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
11890 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
11892 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
11896 ; GFX11-WGP: ; %bb.0: ; %entry
11897 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
11898 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
11899 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
11900 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
11902 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
11906 ; GFX11-CU: ; %bb.0: ; %entry
11907 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
11908 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
11909 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
11910 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
11912 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
11916 ; GFX12-WGP: ; %bb.0: ; %entry
11917 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
11918 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
11919 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
11920 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
11922 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
11926 ; GFX12-CU: ; %bb.0: ; %entry
11927 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
11928 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
11929 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
11930 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
11932 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
11942 ; GFX6: ; %bb.0: ; %entry
11943 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11944 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
11945 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
11948 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
11955 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
11959 ; GFX7: ; %bb.0: ; %entry
11960 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
11961 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
11962 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
11966 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
11970 ; GFX10-WGP: ; %bb.0: ; %entry
11971 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
11972 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11973 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
11974 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
11977 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
11982 ; GFX10-CU: ; %bb.0: ; %entry
11983 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
11984 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
11985 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
11986 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
11992 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
11993 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
11994 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
11995 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
11998 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
12005 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
12009 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
12010 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12011 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12012 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12013 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12019 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
12020 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12021 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12022 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12023 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12026 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12031 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
12032 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12033 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12034 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12035 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12037 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12041 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
12042 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12043 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12044 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12045 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12047 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12048 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12053 ; GFX11-WGP: ; %bb.0: ; %entry
12054 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
12055 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12056 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12057 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
12059 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12060 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12065 ; GFX11-CU: ; %bb.0: ; %entry
12066 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
12067 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12068 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12069 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
12071 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12075 ; GFX12-WGP: ; %bb.0: ; %entry
12076 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
12077 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12078 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12079 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
12081 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
12082 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
12087 ; GFX12-CU: ; %bb.0: ; %entry
12088 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
12089 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12090 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12091 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
12093 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12103 ; GFX6: ; %bb.0: ; %entry
12104 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12105 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
12106 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
12109 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
12116 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
12120 ; GFX7: ; %bb.0: ; %entry
12121 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
12122 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
12123 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
12127 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
12131 ; GFX10-WGP: ; %bb.0: ; %entry
12132 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
12133 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12134 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
12135 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
12137 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
12138 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12143 ; GFX10-CU: ; %bb.0: ; %entry
12144 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
12145 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12146 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
12147 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
12153 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
12154 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12155 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
12156 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
12159 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
12166 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
12170 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
12171 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12172 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12173 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12174 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12180 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
12181 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12182 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12183 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12184 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12186 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12191 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
12192 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12193 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12194 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12195 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12197 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12201 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
12202 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12203 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12204 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12205 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12207 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12208 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12212 ; GFX11-WGP: ; %bb.0: ; %entry
12213 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
12214 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12215 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12216 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
12218 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
12219 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12220 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12224 ; GFX11-CU: ; %bb.0: ; %entry
12225 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
12226 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12227 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12228 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
12230 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12234 ; GFX12-WGP: ; %bb.0: ; %entry
12235 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
12236 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12237 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12238 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
12240 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
12241 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
12242 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
12243 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
12244 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
12248 ; GFX12-CU: ; %bb.0: ; %entry
12249 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
12250 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12251 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12252 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
12254 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12264 ; GFX6: ; %bb.0: ; %entry
12265 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12266 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
12267 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
12270 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
12277 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
12281 ; GFX7: ; %bb.0: ; %entry
12282 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
12283 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
12284 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
12288 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
12292 ; GFX10-WGP: ; %bb.0: ; %entry
12293 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
12294 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12295 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
12296 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
12298 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
12299 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12301 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12306 ; GFX10-CU: ; %bb.0: ; %entry
12307 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
12308 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12309 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
12310 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
12316 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
12317 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12318 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
12319 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
12322 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
12329 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
12333 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
12334 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12335 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12336 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12337 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12343 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
12344 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12345 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12346 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12347 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12349 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12351 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12356 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
12357 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12358 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12359 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12360 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12362 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12366 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
12367 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12368 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12369 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12370 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12372 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12373 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12374 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12379 ; GFX11-WGP: ; %bb.0: ; %entry
12380 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
12381 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12382 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12383 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
12385 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
12386 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12387 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12388 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12393 ; GFX11-CU: ; %bb.0: ; %entry
12394 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
12395 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12396 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12397 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
12399 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12403 ; GFX12-WGP: ; %bb.0: ; %entry
12404 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
12405 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12406 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12407 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
12409 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
12410 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
12411 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
12412 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
12413 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
12414 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
12419 ; GFX12-CU: ; %bb.0: ; %entry
12420 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
12421 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12422 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12423 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
12425 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12435 ; GFX6: ; %bb.0: ; %entry
12436 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12437 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
12438 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
12441 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
12448 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0
12452 ; GFX7: ; %bb.0: ; %entry
12453 ; GFX7-NEXT: s_load_dwordx2 s[6:7], s[8:9], 0x0
12454 ; GFX7-NEXT: s_load_dword s4, s[8:9], 0x2
12455 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
12459 ; GFX7-NEXT: flat_atomic_swap v[0:1], v2
12463 ; GFX10-WGP: ; %bb.0: ; %entry
12464 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
12465 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12466 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
12467 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
12469 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
12470 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12472 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12477 ; GFX10-CU: ; %bb.0: ; %entry
12478 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
12479 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12480 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
12481 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
12487 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
12488 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12489 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
12490 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
12493 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
12500 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0
12504 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
12505 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12506 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12507 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12508 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12514 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
12515 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12516 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12517 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12518 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12520 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12522 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12527 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
12528 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12529 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12530 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12531 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12533 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12537 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
12538 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12539 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12540 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12541 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12543 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12544 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v0, v1, s[0:1]
12545 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12550 ; GFX11-WGP: ; %bb.0: ; %entry
12551 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
12552 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12553 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12554 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
12556 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
12557 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12558 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12559 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12564 ; GFX11-CU: ; %bb.0: ; %entry
12565 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
12566 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12567 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12568 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
12570 ; GFX11-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12574 ; GFX12-WGP: ; %bb.0: ; %entry
12575 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
12576 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12577 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12578 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
12580 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
12581 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
12582 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
12583 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
12584 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v0, v1, s[0:1] scope:SCOPE_SE
12585 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
12590 ; GFX12-CU: ; %bb.0: ; %entry
12591 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
12592 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12593 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12594 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
12596 ; GFX12-CU-NEXT: global_atomic_swap_b32 v0, v1, s[0:1]
12606 ; GFX6: ; %bb.0: ; %entry
12607 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12608 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
12609 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
12612 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
12619 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0 glc
12620 ; GFX6-NEXT: s_waitcnt vmcnt(0)
12621 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
12625 ; GFX7: ; %bb.0: ; %entry
12626 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12627 ; GFX7-NEXT: s_load_dword s6, s[8:9], 0x2
12628 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
12632 ; GFX7-NEXT: flat_atomic_swap v2, v[0:1], v2 glc
12635 ; GFX7-NEXT: s_waitcnt vmcnt(0)
12636 ; GFX7-NEXT: flat_store_dword v[0:1], v2
12640 ; GFX10-WGP: ; %bb.0: ; %entry
12641 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
12642 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12643 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
12644 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
12647 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
12653 ; GFX10-CU: ; %bb.0: ; %entry
12654 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
12655 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12656 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
12657 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
12660 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
12665 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
12666 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12667 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
12668 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
12671 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
12678 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0 glc
12679 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
12680 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
12684 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
12685 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12686 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12687 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12688 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12691 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
12696 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
12697 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12698 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12699 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12700 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12703 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12709 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
12710 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12711 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12712 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12713 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12715 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
12716 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
12717 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
12721 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
12722 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12723 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12724 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12725 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12727 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
12728 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12730 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
12734 ; GFX11-WGP: ; %bb.0: ; %entry
12735 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
12736 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12737 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12738 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
12740 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
12741 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
12743 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
12747 ; GFX11-CU: ; %bb.0: ; %entry
12748 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
12749 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12750 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12751 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
12753 ; GFX11-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
12754 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
12755 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
12759 ; GFX12-WGP: ; %bb.0: ; %entry
12760 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
12761 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12762 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12763 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
12765 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN scope:SCOPE_SE
12766 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
12768 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
12772 ; GFX12-CU: ; %bb.0: ; %entry
12773 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
12774 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12775 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12776 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
12778 ; GFX12-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN
12779 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
12780 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
12791 ; GFX6: ; %bb.0: ; %entry
12792 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12793 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
12794 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
12797 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
12804 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0 glc
12805 ; GFX6-NEXT: s_waitcnt vmcnt(0)
12806 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
12810 ; GFX7: ; %bb.0: ; %entry
12811 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12812 ; GFX7-NEXT: s_load_dword s6, s[8:9], 0x2
12813 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
12817 ; GFX7-NEXT: flat_atomic_swap v2, v[0:1], v2 glc
12820 ; GFX7-NEXT: s_waitcnt vmcnt(0)
12821 ; GFX7-NEXT: flat_store_dword v[0:1], v2
12825 ; GFX10-WGP: ; %bb.0: ; %entry
12826 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
12827 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12828 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
12829 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
12831 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
12832 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12834 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
12840 ; GFX10-CU: ; %bb.0: ; %entry
12841 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
12842 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12843 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
12844 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
12847 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
12852 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
12853 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12854 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
12855 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
12858 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
12865 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0 glc
12866 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
12867 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
12871 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
12872 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12873 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12874 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12875 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12878 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
12883 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
12884 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12885 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12886 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
12887 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12889 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12891 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12897 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
12898 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12899 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12900 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12901 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12903 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
12904 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
12905 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
12909 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
12910 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
12911 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
12912 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
12913 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
12915 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12916 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
12917 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
12919 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
12923 ; GFX11-WGP: ; %bb.0: ; %entry
12924 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
12925 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12926 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12927 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
12929 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
12930 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
12931 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
12932 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
12934 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
12938 ; GFX11-CU: ; %bb.0: ; %entry
12939 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
12940 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12941 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12942 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
12944 ; GFX11-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
12945 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
12946 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
12950 ; GFX12-WGP: ; %bb.0: ; %entry
12951 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
12952 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12953 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
12954 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
12956 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
12957 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
12958 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
12959 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
12960 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN scope:SCOPE_SE
12961 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
12962 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
12963 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
12965 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
12969 ; GFX12-CU: ; %bb.0: ; %entry
12970 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
12971 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
12972 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
12973 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
12975 ; GFX12-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN
12976 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
12977 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
12988 ; GFX6: ; %bb.0: ; %entry
12989 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
12990 ; GFX6-NEXT: s_load_dword s8, s[8:9], 0x2
12991 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
12994 ; GFX6-NEXT: s_mov_b32 s9, 0x100f000
13001 ; GFX6-NEXT: buffer_atomic_swap v0, off, s[4:7], 0 glc
13002 ; GFX6-NEXT: s_waitcnt vmcnt(0)
13003 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
13007 ; GFX7: ; %bb.0: ; %entry
13008 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13009 ; GFX7-NEXT: s_load_dword s6, s[8:9], 0x2
13010 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
13014 ; GFX7-NEXT: flat_atomic_swap v2, v[0:1], v2 glc
13017 ; GFX7-NEXT: s_waitcnt vmcnt(0)
13018 ; GFX7-NEXT: flat_store_dword v[0:1], v2
13022 ; GFX10-WGP: ; %bb.0: ; %entry
13023 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
13024 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13025 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0x8
13026 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
13028 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
13029 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13031 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
13037 ; GFX10-CU: ; %bb.0: ; %entry
13038 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
13039 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13040 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0x8
13041 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
13044 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
13049 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
13050 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13051 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[4:5], 0x2
13052 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
13055 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s5, 0xf000
13062 ; SKIP-CACHE-INV-NEXT: buffer_atomic_swap v0, off, s[0:3], 0 glc
13063 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
13064 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
13068 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
13069 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13070 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13071 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
13072 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13075 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
13080 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
13081 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13082 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13083 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0x8
13084 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13086 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13088 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13094 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
13095 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13096 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13097 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
13098 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13100 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
13101 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
13102 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
13106 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
13107 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13108 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13109 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0x8
13110 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13112 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13113 ; GFX940-TGSPLIT-NEXT: global_atomic_swap v1, v0, v1, s[0:1] sc0
13114 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13116 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
13120 ; GFX11-WGP: ; %bb.0: ; %entry
13121 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
13122 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13123 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
13124 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
13126 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
13127 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13128 ; GFX11-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
13129 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
13131 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
13135 ; GFX11-CU: ; %bb.0: ; %entry
13136 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
13137 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13138 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
13139 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
13141 ; GFX11-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] glc
13142 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
13143 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
13147 ; GFX12-WGP: ; %bb.0: ; %entry
13148 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
13149 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13150 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0x8
13151 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
13153 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
13154 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
13155 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
13156 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
13157 ; GFX12-WGP-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN scope:SCOPE_SE
13158 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
13159 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
13160 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
13162 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
13166 ; GFX12-CU: ; %bb.0: ; %entry
13167 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
13168 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13169 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0x8
13170 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
13172 ; GFX12-CU-NEXT: global_atomic_swap_b32 v1, v0, v1, s[0:1] th:TH_ATOMIC_RETURN
13173 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
13174 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
13185 ; GFX6: ; %bb.0: ; %entry
13187 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
13188 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
13189 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
13190 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
13193 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
13203 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
13207 ; GFX7: ; %bb.0: ; %entry
13209 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
13210 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
13211 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
13213 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
13228 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
13232 ; GFX10-WGP: ; %bb.0: ; %entry
13233 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
13234 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13235 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
13236 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
13237 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
13246 ; GFX10-CU: ; %bb.0: ; %entry
13247 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
13248 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13249 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
13250 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
13251 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
13260 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
13262 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
13263 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
13264 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
13265 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
13268 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
13278 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
13282 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
13283 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13284 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13285 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13286 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13287 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13296 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
13297 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13298 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13299 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13300 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13301 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13310 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
13311 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13312 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13313 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
13314 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
13315 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13320 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
13324 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
13325 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13326 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13327 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
13328 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
13329 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13334 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
13338 ; GFX11-WGP: ; %bb.0: ; %entry
13339 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
13340 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13341 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
13342 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
13343 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
13348 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13352 ; GFX11-CU: ; %bb.0: ; %entry
13353 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
13354 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13355 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
13356 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
13357 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
13362 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13366 ; GFX12-WGP: ; %bb.0: ; %entry
13367 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
13368 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13369 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
13370 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
13371 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
13376 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
13380 ; GFX12-CU: ; %bb.0: ; %entry
13381 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
13382 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13383 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
13384 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
13385 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
13390 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13401 ; GFX6: ; %bb.0: ; %entry
13403 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
13404 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
13405 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
13406 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
13409 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
13419 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
13423 ; GFX7: ; %bb.0: ; %entry
13425 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
13426 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
13427 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
13429 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
13444 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
13448 ; GFX10-WGP: ; %bb.0: ; %entry
13449 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
13450 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13451 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
13452 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
13453 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
13459 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13464 ; GFX10-CU: ; %bb.0: ; %entry
13465 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
13466 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13467 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
13468 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
13469 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
13478 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
13480 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
13481 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
13482 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
13483 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
13486 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
13496 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
13500 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
13501 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13502 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13503 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13504 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13505 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13514 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
13515 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13516 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13517 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13518 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13519 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13525 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13530 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
13531 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13532 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13533 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
13534 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
13535 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13540 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
13544 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
13545 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13546 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13547 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
13548 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
13549 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13554 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
13555 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13560 ; GFX11-WGP: ; %bb.0: ; %entry
13561 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
13562 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13563 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
13564 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
13565 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
13570 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13571 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13576 ; GFX11-CU: ; %bb.0: ; %entry
13577 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
13578 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13579 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
13580 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
13581 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
13586 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13590 ; GFX12-WGP: ; %bb.0: ; %entry
13591 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
13592 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13593 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
13594 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
13595 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
13600 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
13601 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
13606 ; GFX12-CU: ; %bb.0: ; %entry
13607 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
13608 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13609 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
13610 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
13611 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
13616 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13627 ; GFX6: ; %bb.0: ; %entry
13629 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
13630 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
13631 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
13632 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
13635 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
13645 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
13649 ; GFX7: ; %bb.0: ; %entry
13651 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
13652 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
13653 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
13655 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
13670 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
13674 ; GFX10-WGP: ; %bb.0: ; %entry
13675 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
13676 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13677 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
13678 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
13679 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
13684 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
13685 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13690 ; GFX10-CU: ; %bb.0: ; %entry
13691 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
13692 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13693 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
13694 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
13695 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
13704 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
13706 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
13707 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
13708 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
13709 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
13712 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
13722 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
13726 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
13727 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13728 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13729 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13730 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13731 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13740 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
13741 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13742 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13743 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13744 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13745 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13750 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13755 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
13756 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13757 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13758 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
13759 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
13760 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13765 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
13769 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
13770 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13771 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13772 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
13773 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
13774 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13779 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13780 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
13784 ; GFX11-WGP: ; %bb.0: ; %entry
13785 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
13786 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13787 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
13788 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
13789 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
13794 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
13795 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13796 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13800 ; GFX11-CU: ; %bb.0: ; %entry
13801 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
13802 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13803 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
13804 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
13805 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
13810 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13814 ; GFX12-WGP: ; %bb.0: ; %entry
13815 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
13816 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13817 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
13818 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
13819 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
13824 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
13825 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
13826 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
13827 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
13828 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
13832 ; GFX12-CU: ; %bb.0: ; %entry
13833 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
13834 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
13835 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
13836 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
13837 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
13842 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
13853 ; GFX6: ; %bb.0: ; %entry
13855 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
13856 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
13857 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
13858 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
13861 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
13871 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
13875 ; GFX7: ; %bb.0: ; %entry
13877 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
13878 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
13879 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
13881 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
13896 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
13900 ; GFX10-WGP: ; %bb.0: ; %entry
13901 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
13902 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13903 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
13904 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
13905 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
13910 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
13911 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13913 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
13918 ; GFX10-CU: ; %bb.0: ; %entry
13919 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
13920 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13921 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
13922 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
13923 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
13932 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
13934 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
13935 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
13936 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
13937 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
13940 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
13950 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
13954 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
13955 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13956 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13957 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13958 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13959 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13968 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
13969 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13970 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
13971 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
13972 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
13973 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13978 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13980 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
13985 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
13986 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
13987 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
13988 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
13989 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
13990 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
13995 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
13999 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
14000 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14001 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14002 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14003 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14004 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14009 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14010 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14011 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14016 ; GFX11-WGP: ; %bb.0: ; %entry
14017 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
14018 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14019 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14020 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14021 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
14026 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
14027 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14028 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14029 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14034 ; GFX11-CU: ; %bb.0: ; %entry
14035 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
14036 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14037 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14038 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14039 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
14044 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14048 ; GFX12-WGP: ; %bb.0: ; %entry
14049 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
14050 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14051 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14052 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14053 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
14058 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
14059 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
14060 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
14061 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14062 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
14063 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14068 ; GFX12-CU: ; %bb.0: ; %entry
14069 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
14070 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14071 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14072 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14073 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
14078 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14089 ; GFX6: ; %bb.0: ; %entry
14091 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
14092 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
14093 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
14094 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
14097 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
14107 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
14111 ; GFX7: ; %bb.0: ; %entry
14113 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
14114 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
14115 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
14117 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
14132 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
14136 ; GFX10-WGP: ; %bb.0: ; %entry
14137 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
14138 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14139 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
14140 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
14141 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
14146 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
14147 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14149 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14154 ; GFX10-CU: ; %bb.0: ; %entry
14155 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
14156 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14157 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
14158 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
14159 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
14168 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
14170 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
14171 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
14172 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
14173 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
14176 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
14186 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
14190 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
14191 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14192 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14193 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14194 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14195 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14204 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
14205 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14206 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14207 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14208 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14209 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14214 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14216 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14221 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
14222 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14223 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14224 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14225 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14226 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14231 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14235 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
14236 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14237 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14238 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14239 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14240 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14245 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14246 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14247 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14252 ; GFX11-WGP: ; %bb.0: ; %entry
14253 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
14254 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14255 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14256 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14257 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
14262 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
14263 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14264 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14265 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14270 ; GFX11-CU: ; %bb.0: ; %entry
14271 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
14272 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14273 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14274 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14275 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
14280 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14284 ; GFX12-WGP: ; %bb.0: ; %entry
14285 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
14286 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14287 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14288 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14289 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
14294 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
14295 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
14296 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
14297 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14298 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
14299 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14304 ; GFX12-CU: ; %bb.0: ; %entry
14305 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
14306 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14307 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14308 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14309 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
14314 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14325 ; GFX6: ; %bb.0: ; %entry
14327 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
14328 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
14329 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
14330 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
14333 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
14343 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
14347 ; GFX7: ; %bb.0: ; %entry
14349 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
14350 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
14351 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
14353 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
14368 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
14372 ; GFX10-WGP: ; %bb.0: ; %entry
14373 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
14374 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14375 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
14376 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
14377 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
14383 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14388 ; GFX10-CU: ; %bb.0: ; %entry
14389 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
14390 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14391 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
14392 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
14393 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
14402 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
14404 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
14405 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
14406 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
14407 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
14410 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
14420 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
14424 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
14425 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14426 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14427 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14428 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14429 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14438 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
14439 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14440 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14441 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14442 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14443 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14449 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14454 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
14455 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14456 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14457 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14458 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14459 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14464 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14468 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
14469 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14470 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14471 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14472 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14473 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14478 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14479 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14484 ; GFX11-WGP: ; %bb.0: ; %entry
14485 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
14486 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14487 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14488 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14489 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
14494 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14495 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14500 ; GFX11-CU: ; %bb.0: ; %entry
14501 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
14502 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14503 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14504 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14505 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
14510 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14514 ; GFX12-WGP: ; %bb.0: ; %entry
14515 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
14516 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14517 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14518 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14519 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
14524 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
14525 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14530 ; GFX12-CU: ; %bb.0: ; %entry
14531 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
14532 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14533 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14534 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14535 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
14540 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14551 ; GFX6: ; %bb.0: ; %entry
14553 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
14554 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
14555 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
14556 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
14559 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
14569 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
14573 ; GFX7: ; %bb.0: ; %entry
14575 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
14576 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
14577 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
14579 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
14594 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
14598 ; GFX10-WGP: ; %bb.0: ; %entry
14599 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
14600 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14601 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
14602 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
14603 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
14609 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14614 ; GFX10-CU: ; %bb.0: ; %entry
14615 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
14616 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14617 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
14618 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
14619 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
14628 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
14630 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
14631 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
14632 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
14633 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
14636 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
14646 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
14650 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
14651 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14652 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14653 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14654 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14655 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14664 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
14665 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14666 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14667 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14668 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14669 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14675 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14680 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
14681 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14682 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14683 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14684 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14685 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14690 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14694 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
14695 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14696 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14697 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14698 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14699 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14704 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14705 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14710 ; GFX11-WGP: ; %bb.0: ; %entry
14711 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
14712 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14713 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14714 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14715 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
14720 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14721 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14726 ; GFX11-CU: ; %bb.0: ; %entry
14727 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
14728 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14729 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14730 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14731 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
14736 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14740 ; GFX12-WGP: ; %bb.0: ; %entry
14741 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
14742 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14743 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14744 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14745 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
14750 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
14751 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14756 ; GFX12-CU: ; %bb.0: ; %entry
14757 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
14758 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14759 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14760 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14761 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
14766 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14777 ; GFX6: ; %bb.0: ; %entry
14779 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
14780 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
14781 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
14782 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
14785 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
14795 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
14799 ; GFX7: ; %bb.0: ; %entry
14801 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
14802 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
14803 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
14805 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
14820 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
14824 ; GFX10-WGP: ; %bb.0: ; %entry
14825 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
14826 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14827 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
14828 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
14829 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
14834 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
14835 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14837 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14842 ; GFX10-CU: ; %bb.0: ; %entry
14843 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
14844 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14845 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
14846 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
14847 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
14856 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
14858 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
14859 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
14860 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
14861 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
14864 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
14874 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
14878 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
14879 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14880 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14881 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14882 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14883 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14892 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
14893 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14894 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
14895 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
14896 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
14897 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14902 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14904 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14909 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
14910 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14911 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14912 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14913 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14914 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14919 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14923 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
14924 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
14925 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
14926 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
14927 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
14928 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
14933 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14934 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
14935 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
14940 ; GFX11-WGP: ; %bb.0: ; %entry
14941 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
14942 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14943 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14944 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14945 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
14950 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
14951 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14952 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14953 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
14958 ; GFX11-CU: ; %bb.0: ; %entry
14959 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
14960 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14961 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14962 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14963 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
14968 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
14972 ; GFX12-WGP: ; %bb.0: ; %entry
14973 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
14974 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14975 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
14976 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
14977 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
14982 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
14983 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
14984 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
14985 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14986 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
14987 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
14992 ; GFX12-CU: ; %bb.0: ; %entry
14993 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
14994 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
14995 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
14996 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
14997 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
15002 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15013 ; GFX6: ; %bb.0: ; %entry
15015 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
15016 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
15017 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
15018 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
15021 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
15031 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
15035 ; GFX7: ; %bb.0: ; %entry
15037 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
15038 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
15039 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
15041 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
15056 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
15060 ; GFX10-WGP: ; %bb.0: ; %entry
15061 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
15062 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15063 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
15064 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
15065 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
15070 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
15071 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15073 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15078 ; GFX10-CU: ; %bb.0: ; %entry
15079 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
15080 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15081 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
15082 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
15083 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
15092 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
15094 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
15095 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
15096 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
15097 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
15100 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
15110 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
15114 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
15115 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15116 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15117 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15118 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15119 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15128 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
15129 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15130 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15131 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15132 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15133 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15138 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15140 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15145 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
15146 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15147 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15148 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15149 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15150 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15155 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15159 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
15160 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15161 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15162 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15163 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15164 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15169 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15170 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15171 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15176 ; GFX11-WGP: ; %bb.0: ; %entry
15177 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
15178 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15179 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15180 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15181 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
15186 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
15187 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15188 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15189 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15194 ; GFX11-CU: ; %bb.0: ; %entry
15195 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
15196 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15197 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15198 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15199 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
15204 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15208 ; GFX12-WGP: ; %bb.0: ; %entry
15209 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
15210 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15211 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15212 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15213 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
15218 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
15219 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
15220 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
15221 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15222 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
15223 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15228 ; GFX12-CU: ; %bb.0: ; %entry
15229 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
15230 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15231 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15232 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15233 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
15238 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15249 ; GFX6: ; %bb.0: ; %entry
15251 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
15252 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
15253 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
15254 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
15257 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
15267 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
15271 ; GFX7: ; %bb.0: ; %entry
15273 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
15274 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
15275 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
15277 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
15292 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
15296 ; GFX10-WGP: ; %bb.0: ; %entry
15297 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
15298 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15299 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
15300 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
15301 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
15306 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
15307 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15309 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15314 ; GFX10-CU: ; %bb.0: ; %entry
15315 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
15316 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15317 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
15318 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
15319 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
15328 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
15330 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
15331 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
15332 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
15333 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
15336 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
15346 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
15350 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
15351 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15352 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15353 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15354 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15355 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15364 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
15365 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15366 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15367 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15368 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15369 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15374 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15376 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15381 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
15382 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15383 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15384 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15385 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15386 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15391 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15395 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
15396 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15397 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15398 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15399 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15400 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15405 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15406 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15407 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15412 ; GFX11-WGP: ; %bb.0: ; %entry
15413 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
15414 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15415 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15416 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15417 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
15422 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
15423 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15424 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15425 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15430 ; GFX11-CU: ; %bb.0: ; %entry
15431 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
15432 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15433 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15434 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15435 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
15440 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15444 ; GFX12-WGP: ; %bb.0: ; %entry
15445 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
15446 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15447 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15448 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15449 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
15454 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
15455 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
15456 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
15457 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15458 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
15459 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15464 ; GFX12-CU: ; %bb.0: ; %entry
15465 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
15466 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15467 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15468 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15469 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
15474 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15485 ; GFX6: ; %bb.0: ; %entry
15487 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
15488 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
15489 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
15490 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
15493 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
15503 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
15507 ; GFX7: ; %bb.0: ; %entry
15509 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
15510 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
15511 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
15513 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
15528 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
15532 ; GFX10-WGP: ; %bb.0: ; %entry
15533 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
15534 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15535 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
15536 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
15537 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
15542 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
15543 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15545 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15550 ; GFX10-CU: ; %bb.0: ; %entry
15551 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
15552 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15553 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
15554 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
15555 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
15564 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
15566 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
15567 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
15568 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
15569 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
15572 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
15582 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
15586 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
15587 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15588 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15589 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15590 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15591 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15600 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
15601 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15602 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15603 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15604 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15605 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15610 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15612 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15617 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
15618 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15619 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15620 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15621 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15622 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15627 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15631 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
15632 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15633 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15634 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15635 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15636 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15641 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15642 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15643 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15648 ; GFX11-WGP: ; %bb.0: ; %entry
15649 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
15650 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15651 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15652 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15653 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
15658 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
15659 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15660 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15661 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15666 ; GFX11-CU: ; %bb.0: ; %entry
15667 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
15668 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15669 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15670 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15671 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
15676 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15680 ; GFX12-WGP: ; %bb.0: ; %entry
15681 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
15682 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15683 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15684 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15685 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
15690 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
15691 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
15692 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
15693 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15694 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
15695 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15700 ; GFX12-CU: ; %bb.0: ; %entry
15701 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
15702 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15703 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15704 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15705 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
15710 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15721 ; GFX6: ; %bb.0: ; %entry
15723 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
15724 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
15725 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
15726 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
15729 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
15739 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
15743 ; GFX7: ; %bb.0: ; %entry
15745 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
15746 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
15747 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
15749 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
15764 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
15768 ; GFX10-WGP: ; %bb.0: ; %entry
15769 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
15770 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15771 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
15772 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
15773 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
15778 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
15779 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15781 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15786 ; GFX10-CU: ; %bb.0: ; %entry
15787 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
15788 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15789 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
15790 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
15791 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
15800 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
15802 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
15803 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
15804 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
15805 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
15808 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
15818 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
15822 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
15823 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15824 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15825 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15826 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15827 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15836 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
15837 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15838 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
15839 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
15840 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
15841 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15846 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15848 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15853 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
15854 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15855 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15856 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15857 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15858 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15863 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15867 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
15868 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
15869 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
15870 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
15871 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
15872 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
15877 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15878 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
15879 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
15884 ; GFX11-WGP: ; %bb.0: ; %entry
15885 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
15886 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15887 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15888 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15889 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
15894 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
15895 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15896 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15897 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
15902 ; GFX11-CU: ; %bb.0: ; %entry
15903 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
15904 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15905 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15906 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15907 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
15912 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15916 ; GFX12-WGP: ; %bb.0: ; %entry
15917 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
15918 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15919 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
15920 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
15921 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
15926 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
15927 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
15928 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
15929 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15930 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
15931 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
15936 ; GFX12-CU: ; %bb.0: ; %entry
15937 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
15938 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
15939 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
15940 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
15941 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
15946 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
15957 ; GFX6: ; %bb.0: ; %entry
15959 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
15960 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
15961 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
15962 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
15965 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
15975 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
15979 ; GFX7: ; %bb.0: ; %entry
15981 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
15982 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
15983 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
15985 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
16000 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
16004 ; GFX10-WGP: ; %bb.0: ; %entry
16005 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
16006 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16007 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
16008 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
16009 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
16014 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
16015 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16017 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16022 ; GFX10-CU: ; %bb.0: ; %entry
16023 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
16024 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16025 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
16026 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
16027 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
16036 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
16038 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
16039 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
16040 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
16041 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
16044 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
16054 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
16058 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
16059 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16060 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16061 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16062 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16063 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16072 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
16073 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16074 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16075 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16076 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16077 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16082 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16084 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16089 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
16090 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16091 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16092 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16093 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16094 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16099 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
16103 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
16104 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16105 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16106 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16107 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16108 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16113 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16114 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
16115 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16120 ; GFX11-WGP: ; %bb.0: ; %entry
16121 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
16122 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16123 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16124 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16125 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
16130 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
16131 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16132 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16133 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16138 ; GFX11-CU: ; %bb.0: ; %entry
16139 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
16140 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16141 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16142 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16143 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
16148 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16152 ; GFX12-WGP: ; %bb.0: ; %entry
16153 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
16154 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16155 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16156 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16157 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
16162 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
16163 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
16164 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
16165 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
16166 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
16167 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
16172 ; GFX12-CU: ; %bb.0: ; %entry
16173 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
16174 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16175 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16176 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16177 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
16182 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16193 ; GFX6: ; %bb.0: ; %entry
16195 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
16196 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
16197 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
16198 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
16201 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
16211 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
16215 ; GFX7: ; %bb.0: ; %entry
16217 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
16218 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
16219 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
16221 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
16236 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
16240 ; GFX10-WGP: ; %bb.0: ; %entry
16241 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
16242 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16243 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
16244 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
16245 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
16250 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
16251 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16253 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16258 ; GFX10-CU: ; %bb.0: ; %entry
16259 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
16260 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16261 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
16262 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
16263 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
16272 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
16274 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
16275 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
16276 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
16277 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
16280 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
16290 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
16294 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
16295 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16296 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16297 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16298 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16299 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16308 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
16309 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16310 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16311 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16312 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16313 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16318 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16320 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16325 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
16326 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16327 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16328 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16329 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16330 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16335 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
16339 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
16340 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16341 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16342 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16343 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16344 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16349 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16350 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
16351 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16356 ; GFX11-WGP: ; %bb.0: ; %entry
16357 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
16358 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16359 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16360 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16361 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
16366 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
16367 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16368 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16369 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16374 ; GFX11-CU: ; %bb.0: ; %entry
16375 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
16376 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16377 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16378 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16379 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
16384 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16388 ; GFX12-WGP: ; %bb.0: ; %entry
16389 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
16390 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16391 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16392 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16393 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
16398 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
16399 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
16400 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
16401 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
16402 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
16403 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
16408 ; GFX12-CU: ; %bb.0: ; %entry
16409 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
16410 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16411 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16412 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16413 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
16418 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16429 ; GFX6: ; %bb.0: ; %entry
16431 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
16432 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
16433 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
16434 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
16437 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
16447 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16
16451 ; GFX7: ; %bb.0: ; %entry
16453 ; GFX7-NEXT: s_load_dwordx2 s[8:9], s[4:5], 0x0
16454 ; GFX7-NEXT: s_load_dword s7, s[4:5], 0x2
16455 ; GFX7-NEXT: s_load_dword s6, s[4:5], 0x3
16457 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
16472 ; GFX7-NEXT: flat_atomic_cmpswap v[0:1], v[2:3]
16476 ; GFX10-WGP: ; %bb.0: ; %entry
16477 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
16478 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16479 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
16480 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
16481 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
16486 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
16487 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16489 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16494 ; GFX10-CU: ; %bb.0: ; %entry
16495 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
16496 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16497 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
16498 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
16499 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
16508 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
16510 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
16511 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
16512 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
16513 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
16516 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
16526 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16
16530 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
16531 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16532 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16533 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16534 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16535 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16544 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
16545 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16546 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16547 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16548 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16549 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16554 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16556 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16561 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
16562 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16563 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16564 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16565 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16566 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16571 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
16575 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
16576 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16577 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16578 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16579 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16580 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16585 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16586 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v0, v[2:3], s[0:1] offset:16
16587 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16592 ; GFX11-WGP: ; %bb.0: ; %entry
16593 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
16594 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16595 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16596 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16597 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
16602 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
16603 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16604 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16605 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
16610 ; GFX11-CU: ; %bb.0: ; %entry
16611 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
16612 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16613 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16614 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16615 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
16620 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16624 ; GFX12-WGP: ; %bb.0: ; %entry
16625 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
16626 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16627 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16628 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16629 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
16634 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
16635 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
16636 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
16637 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
16638 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16 scope:SCOPE_SE
16639 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
16644 ; GFX12-CU: ; %bb.0: ; %entry
16645 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
16646 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16647 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16648 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16649 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
16654 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v0, v[1:2], s[0:1] offset:16
16665 ; GFX6: ; %bb.0: ; %entry
16667 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
16668 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
16669 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
16670 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
16673 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
16683 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
16685 ; GFX6-NEXT: s_waitcnt vmcnt(0)
16686 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
16690 ; GFX7: ; %bb.0: ; %entry
16692 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
16693 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
16694 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
16696 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
16711 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
16714 ; GFX7-NEXT: s_waitcnt vmcnt(0)
16715 ; GFX7-NEXT: flat_store_dword v[0:1], v2
16719 ; GFX10-WGP: ; %bb.0: ; %entry
16720 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
16721 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16722 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
16723 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
16724 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
16730 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
16735 ; GFX10-CU: ; %bb.0: ; %entry
16736 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
16737 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16738 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
16739 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
16740 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
16746 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
16751 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
16753 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
16754 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
16755 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
16756 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
16759 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
16769 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
16771 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
16772 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
16776 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
16777 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16778 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16779 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16780 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16781 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16787 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
16792 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
16793 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16794 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16795 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
16796 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
16797 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16803 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16808 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
16809 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16810 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16811 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16812 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16813 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16818 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
16819 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
16820 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
16824 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
16825 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
16826 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
16827 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
16828 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
16829 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
16834 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
16835 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
16836 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
16840 ; GFX11-WGP: ; %bb.0: ; %entry
16841 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
16842 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16843 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16844 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16845 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
16850 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
16851 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
16852 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
16856 ; GFX11-CU: ; %bb.0: ; %entry
16857 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
16858 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16859 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16860 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16861 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
16866 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
16867 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
16868 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
16872 ; GFX12-WGP: ; %bb.0: ; %entry
16873 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
16874 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16875 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
16876 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
16877 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
16882 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
16883 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
16884 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
16888 ; GFX12-CU: ; %bb.0: ; %entry
16889 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
16890 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
16891 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
16892 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
16893 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
16898 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
16899 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
16900 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
16906 %val0 = extractvalue { i32, i1 } %val, 0
16913 ; GFX6: ; %bb.0: ; %entry
16915 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
16916 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
16917 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
16918 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
16921 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
16931 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
16933 ; GFX6-NEXT: s_waitcnt vmcnt(0)
16934 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
16938 ; GFX7: ; %bb.0: ; %entry
16940 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
16941 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
16942 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
16944 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
16959 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
16962 ; GFX7-NEXT: s_waitcnt vmcnt(0)
16963 ; GFX7-NEXT: flat_store_dword v[0:1], v2
16967 ; GFX10-WGP: ; %bb.0: ; %entry
16968 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
16969 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16970 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
16971 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
16972 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
16978 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
16984 ; GFX10-CU: ; %bb.0: ; %entry
16985 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
16986 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
16987 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
16988 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
16989 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
16995 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
17000 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
17002 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
17003 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
17004 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
17005 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
17008 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
17018 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
17020 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
17021 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
17025 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
17026 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17027 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17028 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17029 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17030 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17036 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17041 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
17042 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17043 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17044 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17045 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17046 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17052 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17058 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
17059 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17060 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17061 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17062 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17063 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17068 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17069 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17070 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17074 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
17075 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17076 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17077 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17078 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17079 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17084 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17085 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17087 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17091 ; GFX11-WGP: ; %bb.0: ; %entry
17092 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
17093 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17094 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17095 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17096 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
17101 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17102 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
17104 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17108 ; GFX11-CU: ; %bb.0: ; %entry
17109 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
17110 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17111 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17112 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17113 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
17118 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17119 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
17120 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17124 ; GFX12-WGP: ; %bb.0: ; %entry
17125 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
17126 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17127 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17128 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17129 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
17134 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
17135 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
17137 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17141 ; GFX12-CU: ; %bb.0: ; %entry
17142 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
17143 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17144 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17145 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17146 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
17151 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
17152 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
17153 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17159 %val0 = extractvalue { i32, i1 } %val, 0
17166 ; GFX6: ; %bb.0: ; %entry
17168 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17169 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
17170 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
17171 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
17174 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
17184 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
17186 ; GFX6-NEXT: s_waitcnt vmcnt(0)
17187 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
17191 ; GFX7: ; %bb.0: ; %entry
17193 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17194 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
17195 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
17197 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
17212 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
17215 ; GFX7-NEXT: s_waitcnt vmcnt(0)
17216 ; GFX7-NEXT: flat_store_dword v[0:1], v2
17220 ; GFX10-WGP: ; %bb.0: ; %entry
17221 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
17222 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17223 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
17224 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
17225 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
17230 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
17231 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
17233 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
17238 ; GFX10-CU: ; %bb.0: ; %entry
17239 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
17240 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17241 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
17242 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
17243 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
17249 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
17254 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
17256 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
17257 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
17258 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
17259 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
17262 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
17272 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
17274 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
17275 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
17279 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
17280 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17281 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17282 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17283 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17284 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17290 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17295 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
17296 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17297 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17298 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17299 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17300 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17305 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17307 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17312 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
17313 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17314 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17315 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17316 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17317 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17322 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17323 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17324 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17328 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
17329 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17330 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17331 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17332 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17333 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17338 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17339 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17340 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17341 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17345 ; GFX11-WGP: ; %bb.0: ; %entry
17346 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
17347 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17348 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17349 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17350 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
17355 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
17356 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
17357 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17358 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
17359 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17363 ; GFX11-CU: ; %bb.0: ; %entry
17364 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
17365 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17366 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17367 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17368 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
17373 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17374 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
17375 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17379 ; GFX12-WGP: ; %bb.0: ; %entry
17380 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
17381 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17382 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17383 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17384 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
17389 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
17390 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
17391 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
17392 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
17393 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
17394 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
17395 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17399 ; GFX12-CU: ; %bb.0: ; %entry
17400 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
17401 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17402 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17403 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17404 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
17409 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
17410 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
17411 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17417 %val0 = extractvalue { i32, i1 } %val, 0
17424 ; GFX6: ; %bb.0: ; %entry
17426 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17427 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
17428 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
17429 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
17432 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
17442 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
17444 ; GFX6-NEXT: s_waitcnt vmcnt(0)
17445 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
17449 ; GFX7: ; %bb.0: ; %entry
17451 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17452 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
17453 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
17455 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
17470 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
17473 ; GFX7-NEXT: s_waitcnt vmcnt(0)
17474 ; GFX7-NEXT: flat_store_dword v[0:1], v2
17478 ; GFX10-WGP: ; %bb.0: ; %entry
17479 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
17480 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17481 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
17482 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
17483 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
17488 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
17489 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
17491 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
17497 ; GFX10-CU: ; %bb.0: ; %entry
17498 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
17499 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17500 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
17501 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
17502 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
17508 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
17513 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
17515 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
17516 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
17517 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
17518 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
17521 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
17531 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
17533 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
17534 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
17538 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
17539 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17540 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17541 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17542 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17543 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17549 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17554 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
17555 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17556 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17557 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17558 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17559 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17564 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17566 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17572 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
17573 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17574 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17575 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17576 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17577 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17582 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17583 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17584 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17588 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
17589 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17590 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17591 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17592 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17593 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17598 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17599 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17600 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17602 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17606 ; GFX11-WGP: ; %bb.0: ; %entry
17607 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
17608 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17609 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17610 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17611 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
17616 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
17617 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
17618 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17619 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
17621 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17625 ; GFX11-CU: ; %bb.0: ; %entry
17626 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
17627 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17628 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17629 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17630 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
17635 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17636 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
17637 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17641 ; GFX12-WGP: ; %bb.0: ; %entry
17642 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
17643 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17644 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17645 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17646 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
17651 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
17652 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
17653 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
17654 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
17655 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
17656 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
17657 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
17658 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
17660 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17664 ; GFX12-CU: ; %bb.0: ; %entry
17665 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
17666 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17667 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17668 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17669 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
17674 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
17675 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
17676 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17682 %val0 = extractvalue { i32, i1 } %val, 0
17689 ; GFX6: ; %bb.0: ; %entry
17691 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17692 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
17693 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
17694 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
17697 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
17707 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
17709 ; GFX6-NEXT: s_waitcnt vmcnt(0)
17710 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
17714 ; GFX7: ; %bb.0: ; %entry
17716 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17717 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
17718 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
17720 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
17735 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
17738 ; GFX7-NEXT: s_waitcnt vmcnt(0)
17739 ; GFX7-NEXT: flat_store_dword v[0:1], v2
17743 ; GFX10-WGP: ; %bb.0: ; %entry
17744 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
17745 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17746 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
17747 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
17748 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
17753 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
17754 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
17756 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
17762 ; GFX10-CU: ; %bb.0: ; %entry
17763 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
17764 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17765 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
17766 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
17767 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
17773 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
17778 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
17780 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
17781 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
17782 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
17783 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
17786 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
17796 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
17798 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
17799 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
17803 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
17804 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17805 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17806 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17807 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17808 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17814 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17819 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
17820 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17821 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
17822 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
17823 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
17824 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17829 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17831 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17837 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
17838 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17839 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17840 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17841 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17842 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17847 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17848 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
17849 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17853 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
17854 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
17855 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
17856 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
17857 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
17858 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
17863 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17864 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
17865 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
17867 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
17871 ; GFX11-WGP: ; %bb.0: ; %entry
17872 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
17873 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17874 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17875 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17876 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
17881 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
17882 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
17883 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17884 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
17886 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17890 ; GFX11-CU: ; %bb.0: ; %entry
17891 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
17892 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17893 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17894 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17895 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
17900 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
17901 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
17902 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17906 ; GFX12-WGP: ; %bb.0: ; %entry
17907 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
17908 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17909 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
17910 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
17911 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
17916 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
17917 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
17918 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
17919 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
17920 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
17921 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
17922 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
17923 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
17925 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
17929 ; GFX12-CU: ; %bb.0: ; %entry
17930 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
17931 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
17932 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
17933 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
17934 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
17939 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
17940 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
17941 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
17947 %val0 = extractvalue { i32, i1 } %val, 0
17954 ; GFX6: ; %bb.0: ; %entry
17956 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17957 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
17958 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
17959 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
17962 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
17972 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
17974 ; GFX6-NEXT: s_waitcnt vmcnt(0)
17975 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
17979 ; GFX7: ; %bb.0: ; %entry
17981 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
17982 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
17983 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
17985 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
18000 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
18003 ; GFX7-NEXT: s_waitcnt vmcnt(0)
18004 ; GFX7-NEXT: flat_store_dword v[0:1], v2
18008 ; GFX10-WGP: ; %bb.0: ; %entry
18009 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
18010 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18011 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
18012 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
18013 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
18019 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
18025 ; GFX10-CU: ; %bb.0: ; %entry
18026 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
18027 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18028 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
18029 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
18030 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
18036 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
18041 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
18043 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
18044 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
18045 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
18046 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
18049 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
18059 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
18061 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
18062 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
18066 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
18067 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18068 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18069 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18070 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18071 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18077 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18082 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
18083 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18084 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18085 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18086 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18087 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18093 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18099 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
18100 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18101 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18102 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18103 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18104 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18109 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18110 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18111 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18115 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
18116 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18117 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18118 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18119 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18120 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18125 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18126 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18128 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18132 ; GFX11-WGP: ; %bb.0: ; %entry
18133 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
18134 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18135 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18136 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18137 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
18142 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18143 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
18145 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18149 ; GFX11-CU: ; %bb.0: ; %entry
18150 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
18151 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18152 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18153 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18154 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
18159 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18160 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
18161 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18165 ; GFX12-WGP: ; %bb.0: ; %entry
18166 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
18167 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18168 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18169 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18170 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
18175 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
18176 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
18177 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
18178 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
18180 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18184 ; GFX12-CU: ; %bb.0: ; %entry
18185 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
18186 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18187 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18188 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18189 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
18194 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
18195 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
18196 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18202 %val0 = extractvalue { i32, i1 } %val, 0
18209 ; GFX6: ; %bb.0: ; %entry
18211 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
18212 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
18213 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
18214 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
18217 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
18227 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
18229 ; GFX6-NEXT: s_waitcnt vmcnt(0)
18230 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
18234 ; GFX7: ; %bb.0: ; %entry
18236 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
18237 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
18238 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
18240 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
18255 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
18258 ; GFX7-NEXT: s_waitcnt vmcnt(0)
18259 ; GFX7-NEXT: flat_store_dword v[0:1], v2
18263 ; GFX10-WGP: ; %bb.0: ; %entry
18264 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
18265 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18266 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
18267 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
18268 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
18274 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
18280 ; GFX10-CU: ; %bb.0: ; %entry
18281 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
18282 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18283 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
18284 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
18285 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
18291 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
18296 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
18298 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
18299 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
18300 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
18301 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
18304 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
18314 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
18316 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
18317 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
18321 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
18322 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18323 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18324 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18325 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18326 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18332 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18337 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
18338 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18339 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18340 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18341 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18342 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18348 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18354 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
18355 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18356 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18357 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18358 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18359 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18364 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18365 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18366 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18370 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
18371 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18372 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18373 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18374 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18375 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18380 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18381 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18383 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18387 ; GFX11-WGP: ; %bb.0: ; %entry
18388 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
18389 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18390 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18391 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18392 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
18397 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18398 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
18400 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18404 ; GFX11-CU: ; %bb.0: ; %entry
18405 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
18406 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18407 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18408 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18409 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
18414 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18415 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
18416 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18420 ; GFX12-WGP: ; %bb.0: ; %entry
18421 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
18422 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18423 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18424 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18425 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
18430 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
18431 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
18433 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18437 ; GFX12-CU: ; %bb.0: ; %entry
18438 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
18439 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18440 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18441 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18442 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
18447 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
18448 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
18449 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18455 %val0 = extractvalue { i32, i1 } %val, 0
18462 ; GFX6: ; %bb.0: ; %entry
18464 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
18465 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
18466 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
18467 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
18470 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
18480 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
18482 ; GFX6-NEXT: s_waitcnt vmcnt(0)
18483 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
18487 ; GFX7: ; %bb.0: ; %entry
18489 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
18490 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
18491 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
18493 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
18508 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
18511 ; GFX7-NEXT: s_waitcnt vmcnt(0)
18512 ; GFX7-NEXT: flat_store_dword v[0:1], v2
18516 ; GFX10-WGP: ; %bb.0: ; %entry
18517 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
18518 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18519 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
18520 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
18521 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
18526 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
18527 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
18529 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
18535 ; GFX10-CU: ; %bb.0: ; %entry
18536 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
18537 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18538 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
18539 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
18540 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
18546 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
18551 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
18553 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
18554 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
18555 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
18556 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
18559 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
18569 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
18571 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
18572 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
18576 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
18577 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18578 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18579 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18580 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18581 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18587 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18592 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
18593 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18594 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18595 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18596 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18597 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18602 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18604 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18610 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
18611 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18612 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18613 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18614 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18615 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18620 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18621 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18622 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18626 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
18627 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18628 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18629 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18630 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18631 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18636 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18637 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18638 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18640 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18644 ; GFX11-WGP: ; %bb.0: ; %entry
18645 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
18646 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18647 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18648 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18649 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
18654 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
18655 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
18656 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18657 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
18659 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18663 ; GFX11-CU: ; %bb.0: ; %entry
18664 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
18665 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18666 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18667 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18668 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
18673 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18674 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
18675 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18679 ; GFX12-WGP: ; %bb.0: ; %entry
18680 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
18681 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18682 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18683 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18684 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
18689 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
18690 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
18691 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
18692 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
18693 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
18694 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
18695 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
18696 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
18698 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18702 ; GFX12-CU: ; %bb.0: ; %entry
18703 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
18704 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18705 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18706 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18707 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
18712 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
18713 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
18714 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18720 %val0 = extractvalue { i32, i1 } %val, 0
18727 ; GFX6: ; %bb.0: ; %entry
18729 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
18730 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
18731 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
18732 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
18735 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
18745 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
18747 ; GFX6-NEXT: s_waitcnt vmcnt(0)
18748 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
18752 ; GFX7: ; %bb.0: ; %entry
18754 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
18755 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
18756 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
18758 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
18773 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
18776 ; GFX7-NEXT: s_waitcnt vmcnt(0)
18777 ; GFX7-NEXT: flat_store_dword v[0:1], v2
18781 ; GFX10-WGP: ; %bb.0: ; %entry
18782 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
18783 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18784 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
18785 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
18786 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
18791 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
18792 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
18794 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
18800 ; GFX10-CU: ; %bb.0: ; %entry
18801 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
18802 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18803 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
18804 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
18805 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
18811 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
18816 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
18818 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
18819 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
18820 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
18821 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
18824 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
18834 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
18836 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
18837 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
18841 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
18842 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18843 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18844 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18845 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18846 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18852 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18857 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
18858 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18859 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
18860 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
18861 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
18862 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18867 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18869 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18875 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
18876 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18877 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18878 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18879 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18880 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18885 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18886 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
18887 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18891 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
18892 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
18893 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
18894 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
18895 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
18896 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
18901 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18902 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
18903 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
18905 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
18909 ; GFX11-WGP: ; %bb.0: ; %entry
18910 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
18911 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18912 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18913 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18914 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
18919 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
18920 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
18921 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18922 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
18924 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18928 ; GFX11-CU: ; %bb.0: ; %entry
18929 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
18930 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18931 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18932 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18933 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
18938 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
18939 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
18940 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18944 ; GFX12-WGP: ; %bb.0: ; %entry
18945 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
18946 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18947 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
18948 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
18949 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
18954 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
18955 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
18956 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
18957 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
18958 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
18959 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
18960 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
18961 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
18963 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
18967 ; GFX12-CU: ; %bb.0: ; %entry
18968 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
18969 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
18970 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
18971 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
18972 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
18977 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
18978 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
18979 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
18985 %val0 = extractvalue { i32, i1 } %val, 0
18992 ; GFX6: ; %bb.0: ; %entry
18994 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
18995 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
18996 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
18997 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
19000 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
19010 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
19012 ; GFX6-NEXT: s_waitcnt vmcnt(0)
19013 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
19017 ; GFX7: ; %bb.0: ; %entry
19019 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
19020 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
19021 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
19023 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
19038 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
19041 ; GFX7-NEXT: s_waitcnt vmcnt(0)
19042 ; GFX7-NEXT: flat_store_dword v[0:1], v2
19046 ; GFX10-WGP: ; %bb.0: ; %entry
19047 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
19048 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19049 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
19050 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
19051 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
19056 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19057 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19059 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19065 ; GFX10-CU: ; %bb.0: ; %entry
19066 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
19067 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19068 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
19069 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
19070 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
19076 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
19081 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
19083 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
19084 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
19085 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
19086 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
19089 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
19099 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
19101 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
19102 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
19106 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
19107 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19108 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19109 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19110 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19111 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19117 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19122 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
19123 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19124 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19125 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19126 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19127 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19132 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19134 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19140 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
19141 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19142 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19143 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19144 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19145 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19150 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19151 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19152 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19156 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
19157 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19158 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19159 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19160 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19161 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19166 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19167 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19168 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19170 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19174 ; GFX11-WGP: ; %bb.0: ; %entry
19175 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
19176 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19177 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
19178 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
19179 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
19184 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19185 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19186 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19187 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19189 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
19193 ; GFX11-CU: ; %bb.0: ; %entry
19194 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
19195 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19196 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
19197 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
19198 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
19203 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19204 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
19205 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
19209 ; GFX12-WGP: ; %bb.0: ; %entry
19210 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
19211 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19212 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
19213 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
19214 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
19219 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
19220 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
19221 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
19222 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
19223 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
19224 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
19225 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
19226 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
19228 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
19232 ; GFX12-CU: ; %bb.0: ; %entry
19233 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
19234 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19235 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
19236 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
19237 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
19242 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
19243 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
19244 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
19250 %val0 = extractvalue { i32, i1 } %val, 0
19257 ; GFX6: ; %bb.0: ; %entry
19259 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
19260 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
19261 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
19262 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
19265 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
19275 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
19277 ; GFX6-NEXT: s_waitcnt vmcnt(0)
19278 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
19282 ; GFX7: ; %bb.0: ; %entry
19284 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
19285 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
19286 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
19288 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
19303 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
19306 ; GFX7-NEXT: s_waitcnt vmcnt(0)
19307 ; GFX7-NEXT: flat_store_dword v[0:1], v2
19311 ; GFX10-WGP: ; %bb.0: ; %entry
19312 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
19313 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19314 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
19315 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
19316 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
19321 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19322 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19324 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19330 ; GFX10-CU: ; %bb.0: ; %entry
19331 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
19332 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19333 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
19334 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
19335 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
19341 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
19346 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
19348 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
19349 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
19350 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
19351 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
19354 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
19364 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
19366 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
19367 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
19371 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
19372 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19373 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19374 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19375 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19376 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19382 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19387 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
19388 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19389 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19390 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19391 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19392 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19397 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19399 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19405 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
19406 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19407 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19408 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19409 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19410 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19415 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19416 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19417 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19421 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
19422 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19423 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19424 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19425 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19426 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19431 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19432 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19433 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19435 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19439 ; GFX11-WGP: ; %bb.0: ; %entry
19440 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
19441 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19442 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
19443 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
19444 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
19449 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19450 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19451 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19452 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19454 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
19458 ; GFX11-CU: ; %bb.0: ; %entry
19459 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
19460 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19461 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
19462 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
19463 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
19468 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19469 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
19470 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
19474 ; GFX12-WGP: ; %bb.0: ; %entry
19475 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
19476 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19477 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
19478 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
19479 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
19484 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
19485 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
19486 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
19487 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
19488 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
19489 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
19490 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
19491 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
19493 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
19497 ; GFX12-CU: ; %bb.0: ; %entry
19498 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
19499 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19500 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
19501 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
19502 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
19507 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
19508 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
19509 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
19515 %val0 = extractvalue { i32, i1 } %val, 0
19522 ; GFX6: ; %bb.0: ; %entry
19524 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
19525 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
19526 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
19527 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
19530 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
19540 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
19542 ; GFX6-NEXT: s_waitcnt vmcnt(0)
19543 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
19547 ; GFX7: ; %bb.0: ; %entry
19549 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
19550 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
19551 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
19553 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
19568 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
19571 ; GFX7-NEXT: s_waitcnt vmcnt(0)
19572 ; GFX7-NEXT: flat_store_dword v[0:1], v2
19576 ; GFX10-WGP: ; %bb.0: ; %entry
19577 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
19578 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19579 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
19580 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
19581 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
19586 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19587 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19589 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19595 ; GFX10-CU: ; %bb.0: ; %entry
19596 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
19597 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19598 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
19599 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
19600 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
19606 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
19611 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
19613 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
19614 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
19615 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
19616 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
19619 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
19629 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
19631 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
19632 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
19636 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
19637 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19638 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19639 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19640 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19641 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19647 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19652 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
19653 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19654 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19655 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19656 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19657 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19662 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19664 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19670 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
19671 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19672 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19673 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19674 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19675 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19680 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19681 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19682 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19686 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
19687 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19688 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19689 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19690 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19691 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19696 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19697 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19698 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19700 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19704 ; GFX11-WGP: ; %bb.0: ; %entry
19705 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
19706 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19707 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
19708 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
19709 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
19714 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19715 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19716 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19717 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19719 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
19723 ; GFX11-CU: ; %bb.0: ; %entry
19724 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
19725 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19726 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
19727 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
19728 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
19733 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19734 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
19735 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
19739 ; GFX12-WGP: ; %bb.0: ; %entry
19740 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
19741 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19742 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
19743 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
19744 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
19749 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
19750 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
19751 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
19752 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
19753 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
19754 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
19756 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
19760 ; GFX12-CU: ; %bb.0: ; %entry
19761 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
19762 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19763 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
19764 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
19765 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
19770 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
19771 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
19772 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
19778 %val0 = extractvalue { i32, i1 } %val, 0
19785 ; GFX6: ; %bb.0: ; %entry
19787 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
19788 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
19789 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
19790 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
19793 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
19803 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
19805 ; GFX6-NEXT: s_waitcnt vmcnt(0)
19806 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
19810 ; GFX7: ; %bb.0: ; %entry
19812 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
19813 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
19814 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
19816 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
19831 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
19834 ; GFX7-NEXT: s_waitcnt vmcnt(0)
19835 ; GFX7-NEXT: flat_store_dword v[0:1], v2
19839 ; GFX10-WGP: ; %bb.0: ; %entry
19840 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
19841 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19842 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
19843 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
19844 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
19849 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19850 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19852 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
19858 ; GFX10-CU: ; %bb.0: ; %entry
19859 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
19860 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19861 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
19862 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
19863 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
19869 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
19874 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
19876 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
19877 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
19878 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
19879 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
19882 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
19892 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
19894 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
19895 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
19899 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
19900 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19901 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19902 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19903 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19904 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19910 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19915 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
19916 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19917 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
19918 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
19919 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
19920 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19925 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19927 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19933 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
19934 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19935 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19936 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19937 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19938 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19943 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19944 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
19945 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19949 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
19950 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
19951 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
19952 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
19953 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
19954 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
19959 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19960 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
19961 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
19963 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
19967 ; GFX11-WGP: ; %bb.0: ; %entry
19968 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
19969 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19970 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
19971 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
19972 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
19977 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19978 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
19979 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19980 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
19982 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
19986 ; GFX11-CU: ; %bb.0: ; %entry
19987 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
19988 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
19989 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
19990 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
19991 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
19996 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
19997 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
19998 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
20002 ; GFX12-WGP: ; %bb.0: ; %entry
20003 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
20004 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20005 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
20006 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
20007 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
20012 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
20013 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
20014 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
20015 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
20016 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
20017 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
20018 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
20019 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
20021 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
20025 ; GFX12-CU: ; %bb.0: ; %entry
20026 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
20027 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20028 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
20029 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
20030 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
20035 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
20036 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
20037 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
20043 %val0 = extractvalue { i32, i1 } %val, 0
20050 ; GFX6: ; %bb.0: ; %entry
20052 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
20053 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
20054 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
20055 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
20058 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
20068 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
20070 ; GFX6-NEXT: s_waitcnt vmcnt(0)
20071 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
20075 ; GFX7: ; %bb.0: ; %entry
20077 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
20078 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
20079 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
20081 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
20096 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
20099 ; GFX7-NEXT: s_waitcnt vmcnt(0)
20100 ; GFX7-NEXT: flat_store_dword v[0:1], v2
20104 ; GFX10-WGP: ; %bb.0: ; %entry
20105 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
20106 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20107 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
20108 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
20109 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
20114 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
20115 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
20117 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
20123 ; GFX10-CU: ; %bb.0: ; %entry
20124 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
20125 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20126 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
20127 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
20128 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
20134 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
20139 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
20141 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
20142 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
20143 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
20144 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
20147 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
20157 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
20159 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
20160 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
20164 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
20165 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20166 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20167 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
20168 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
20169 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20175 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
20180 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
20181 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20182 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20183 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
20184 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
20185 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20190 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20192 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20198 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
20199 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20200 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
20201 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
20202 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
20203 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20208 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
20209 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
20210 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
20214 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
20215 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20216 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
20217 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
20218 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
20219 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20224 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20225 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
20226 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20228 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
20232 ; GFX11-WGP: ; %bb.0: ; %entry
20233 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
20234 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20235 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
20236 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
20237 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
20242 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
20243 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
20244 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
20245 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
20247 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
20251 ; GFX11-CU: ; %bb.0: ; %entry
20252 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
20253 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20254 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
20255 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
20256 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
20261 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
20262 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
20263 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
20267 ; GFX12-WGP: ; %bb.0: ; %entry
20268 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
20269 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20270 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
20271 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
20272 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
20277 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
20278 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
20279 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
20280 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
20281 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
20282 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
20283 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
20284 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
20286 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
20290 ; GFX12-CU: ; %bb.0: ; %entry
20291 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
20292 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20293 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
20294 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
20295 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
20300 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
20301 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
20302 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
20308 %val0 = extractvalue { i32, i1 } %val, 0
20315 ; GFX6: ; %bb.0: ; %entry
20317 ; GFX6-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
20318 ; GFX6-NEXT: s_load_dword s9, s[6:7], 0x2
20319 ; GFX6-NEXT: s_load_dword s8, s[6:7], 0x3
20320 ; GFX6-NEXT: s_waitcnt lgkmcnt(0)
20323 ; GFX6-NEXT: s_mov_b32 s10, 0x100f000
20333 ; GFX6-NEXT: buffer_atomic_cmpswap v[0:1], off, s[4:7], 0 offset:16 glc
20335 ; GFX6-NEXT: s_waitcnt vmcnt(0)
20336 ; GFX6-NEXT: buffer_store_dword v0, off, s[4:7], 0
20340 ; GFX7: ; %bb.0: ; %entry
20342 ; GFX7-NEXT: s_load_dwordx2 s[4:5], s[6:7], 0x0
20343 ; GFX7-NEXT: s_load_dword s9, s[6:7], 0x2
20344 ; GFX7-NEXT: s_load_dword s8, s[6:7], 0x3
20346 ; GFX7-NEXT: s_waitcnt lgkmcnt(0)
20361 ; GFX7-NEXT: flat_atomic_cmpswap v2, v[0:1], v[2:3] glc
20364 ; GFX7-NEXT: s_waitcnt vmcnt(0)
20365 ; GFX7-NEXT: flat_store_dword v[0:1], v2
20369 ; GFX10-WGP: ; %bb.0: ; %entry
20370 ; GFX10-WGP-NEXT: v_mov_b32_e32 v0, 0
20371 ; GFX10-WGP-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20372 ; GFX10-WGP-NEXT: s_load_dword s7, s[8:9], 0x8
20373 ; GFX10-WGP-NEXT: s_load_dword s6, s[8:9], 0xc
20374 ; GFX10-WGP-NEXT: s_waitcnt lgkmcnt(0)
20379 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
20380 ; GFX10-WGP-NEXT: s_waitcnt_vscnt null, 0x0
20382 ; GFX10-WGP-NEXT: s_waitcnt vmcnt(0)
20388 ; GFX10-CU: ; %bb.0: ; %entry
20389 ; GFX10-CU-NEXT: v_mov_b32_e32 v0, 0
20390 ; GFX10-CU-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20391 ; GFX10-CU-NEXT: s_load_dword s7, s[8:9], 0x8
20392 ; GFX10-CU-NEXT: s_load_dword s6, s[8:9], 0xc
20393 ; GFX10-CU-NEXT: s_waitcnt lgkmcnt(0)
20399 ; GFX10-CU-NEXT: s_waitcnt vmcnt(0)
20404 ; SKIP-CACHE-INV: ; %bb.0: ; %entry
20406 ; SKIP-CACHE-INV-NEXT: s_load_dwordx2 s[0:1], s[2:3], 0x0
20407 ; SKIP-CACHE-INV-NEXT: s_load_dword s5, s[2:3], 0x2
20408 ; SKIP-CACHE-INV-NEXT: s_load_dword s4, s[2:3], 0x3
20409 ; SKIP-CACHE-INV-NEXT: s_waitcnt lgkmcnt(0)
20412 ; SKIP-CACHE-INV-NEXT: s_mov_b32 s6, 0xf000
20422 ; SKIP-CACHE-INV-NEXT: buffer_atomic_cmpswap v[0:1], off, s[0:3], 0 offset:16 glc
20424 ; SKIP-CACHE-INV-NEXT: s_waitcnt vmcnt(0)
20425 ; SKIP-CACHE-INV-NEXT: buffer_store_dword v0, off, s[0:3], 0
20429 ; GFX90A-NOTTGSPLIT: ; %bb.0: ; %entry
20430 ; GFX90A-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20431 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20432 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
20433 ; GFX90A-NOTTGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
20434 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20440 ; GFX90A-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
20445 ; GFX90A-TGSPLIT: ; %bb.0: ; %entry
20446 ; GFX90A-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20447 ; GFX90A-TGSPLIT-NEXT: s_load_dwordx2 s[4:5], s[8:9], 0x0
20448 ; GFX90A-TGSPLIT-NEXT: s_load_dword s7, s[8:9], 0x8
20449 ; GFX90A-TGSPLIT-NEXT: s_load_dword s6, s[8:9], 0xc
20450 ; GFX90A-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20455 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20457 ; GFX90A-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20463 ; GFX940-NOTTGSPLIT: ; %bb.0: ; %entry
20464 ; GFX940-NOTTGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20465 ; GFX940-NOTTGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
20466 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
20467 ; GFX940-NOTTGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
20468 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20473 ; GFX940-NOTTGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
20474 ; GFX940-NOTTGSPLIT-NEXT: s_waitcnt vmcnt(0)
20475 ; GFX940-NOTTGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
20479 ; GFX940-TGSPLIT: ; %bb.0: ; %entry
20480 ; GFX940-TGSPLIT-NEXT: v_mov_b32_e32 v0, 0
20481 ; GFX940-TGSPLIT-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
20482 ; GFX940-TGSPLIT-NEXT: s_load_dword s3, s[4:5], 0x8
20483 ; GFX940-TGSPLIT-NEXT: s_load_dword s2, s[4:5], 0xc
20484 ; GFX940-TGSPLIT-NEXT: s_waitcnt lgkmcnt(0)
20489 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20490 ; GFX940-TGSPLIT-NEXT: global_atomic_cmpswap v1, v0, v[2:3], s[0:1] offset:16 sc0
20491 ; GFX940-TGSPLIT-NEXT: s_waitcnt vmcnt(0)
20493 ; GFX940-TGSPLIT-NEXT: global_store_dword v0, v1, s[0:1] sc0 sc1
20497 ; GFX11-WGP: ; %bb.0: ; %entry
20498 ; GFX11-WGP-NEXT: v_mov_b32_e32 v0, 0
20499 ; GFX11-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20500 ; GFX11-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
20501 ; GFX11-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
20502 ; GFX11-WGP-NEXT: s_waitcnt lgkmcnt(0)
20507 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
20508 ; GFX11-WGP-NEXT: s_waitcnt_vscnt null, 0x0
20509 ; GFX11-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
20510 ; GFX11-WGP-NEXT: s_waitcnt vmcnt(0)
20512 ; GFX11-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
20516 ; GFX11-CU: ; %bb.0: ; %entry
20517 ; GFX11-CU-NEXT: v_mov_b32_e32 v0, 0
20518 ; GFX11-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20519 ; GFX11-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
20520 ; GFX11-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
20521 ; GFX11-CU-NEXT: s_waitcnt lgkmcnt(0)
20526 ; GFX11-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 glc
20527 ; GFX11-CU-NEXT: s_waitcnt vmcnt(0)
20528 ; GFX11-CU-NEXT: global_store_b32 v0, v1, s[0:1]
20532 ; GFX12-WGP: ; %bb.0: ; %entry
20533 ; GFX12-WGP-NEXT: v_mov_b32_e32 v0, 0
20534 ; GFX12-WGP-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20535 ; GFX12-WGP-NEXT: s_load_b32 s3, s[4:5], 0x8
20536 ; GFX12-WGP-NEXT: s_load_b32 s2, s[4:5], 0xc
20537 ; GFX12-WGP-NEXT: s_wait_kmcnt 0x0
20542 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
20543 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
20544 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
20545 ; GFX12-WGP-NEXT: s_wait_storecnt 0x0
20546 ; GFX12-WGP-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN scope:SCOPE_SE
20547 ; GFX12-WGP-NEXT: s_wait_bvhcnt 0x0
20548 ; GFX12-WGP-NEXT: s_wait_samplecnt 0x0
20549 ; GFX12-WGP-NEXT: s_wait_loadcnt 0x0
20551 ; GFX12-WGP-NEXT: global_store_b32 v0, v1, s[0:1]
20555 ; GFX12-CU: ; %bb.0: ; %entry
20556 ; GFX12-CU-NEXT: v_mov_b32_e32 v0, 0
20557 ; GFX12-CU-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
20558 ; GFX12-CU-NEXT: s_load_b32 s3, s[4:5], 0x8
20559 ; GFX12-CU-NEXT: s_load_b32 s2, s[4:5], 0xc
20560 ; GFX12-CU-NEXT: s_wait_kmcnt 0x0
20565 ; GFX12-CU-NEXT: global_atomic_cmpswap_b32 v1, v0, v[1:2], s[0:1] offset:16 th:TH_ATOMIC_RETURN
20566 ; GFX12-CU-NEXT: s_wait_loadcnt 0x0
20567 ; GFX12-CU-NEXT: global_store_b32 v0, v1, s[0:1]
20573 %val0 = extractvalue { i32, i1 } %val, 0