16
16
define double @test_atomicrmw_xchg_f64_global_agent (ptr addrspace (1 ) %ptr , double %value ) {
17
17
; COMMON-LABEL: define double @test_atomicrmw_xchg_f64_global_agent(
18
18
; COMMON-SAME: ptr addrspace(1) [[PTR:%.*]], double [[VALUE:%.*]]) #[[ATTR0:[0-9]+]] {
19
- ; COMMON-NEXT: [[TMP1:%.*]] = bitcast double [[VALUE]] to i64
20
- ; COMMON-NEXT: [[TMP2:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], i64 [[TMP1]] syncscope("agent") seq_cst, align 8
21
- ; COMMON-NEXT: [[RES:%.*]] = bitcast i64 [[TMP2]] to double
19
+ ; COMMON-NEXT: [[RES:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], double [[VALUE]] syncscope("agent") seq_cst, align 8
22
20
; COMMON-NEXT: ret double [[RES]]
23
21
;
24
22
%res = atomicrmw xchg ptr addrspace (1 ) %ptr , double %value syncscope("agent" ) seq_cst
@@ -29,9 +27,7 @@ define double @test_atomicrmw_xchg_f64_global_agent(ptr addrspace(1) %ptr, doubl
29
27
define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_fine_grained_memory (ptr addrspace (1 ) %ptr , double %value ) {
30
28
; COMMON-LABEL: define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_fine_grained_memory(
31
29
; COMMON-SAME: ptr addrspace(1) [[PTR:%.*]], double [[VALUE:%.*]]) #[[ATTR0]] {
32
- ; COMMON-NEXT: [[TMP1:%.*]] = bitcast double [[VALUE]] to i64
33
- ; COMMON-NEXT: [[TMP2:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], i64 [[TMP1]] syncscope("agent") seq_cst, align 8
34
- ; COMMON-NEXT: [[RES:%.*]] = bitcast i64 [[TMP2]] to double
30
+ ; COMMON-NEXT: [[RES:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], double [[VALUE]] syncscope("agent") seq_cst, align 8, !amdgpu.no.fine.grained.memory [[META0:![0-9]+]]
35
31
; COMMON-NEXT: ret double [[RES]]
36
32
;
37
33
%res = atomicrmw xchg ptr addrspace (1 ) %ptr , double %value syncscope("agent" ) seq_cst , !amdgpu.no.fine.grained.memory !0
@@ -42,9 +38,7 @@ define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_fine_grained_memo
42
38
define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_remote_memory (ptr addrspace (1 ) %ptr , double %value ) {
43
39
; COMMON-LABEL: define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_remote_memory(
44
40
; COMMON-SAME: ptr addrspace(1) [[PTR:%.*]], double [[VALUE:%.*]]) #[[ATTR0]] {
45
- ; COMMON-NEXT: [[TMP1:%.*]] = bitcast double [[VALUE]] to i64
46
- ; COMMON-NEXT: [[TMP2:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], i64 [[TMP1]] syncscope("agent") seq_cst, align 8
47
- ; COMMON-NEXT: [[RES:%.*]] = bitcast i64 [[TMP2]] to double
41
+ ; COMMON-NEXT: [[RES:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], double [[VALUE]] syncscope("agent") seq_cst, align 8, !amdgpu.no.remote.memory [[META0]]
48
42
; COMMON-NEXT: ret double [[RES]]
49
43
;
50
44
%res = atomicrmw xchg ptr addrspace (1 ) %ptr , double %value syncscope("agent" ) seq_cst , !amdgpu.no.remote.memory !0
@@ -55,9 +49,7 @@ define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_remote_memory(ptr
55
49
define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory (ptr addrspace (1 ) %ptr , double %value ) {
56
50
; COMMON-LABEL: define double @test_atomicrmw_xchg_f64_global_agent__amdgpu_no_fine_grained_memory__amdgpu_no_remote_memory(
57
51
; COMMON-SAME: ptr addrspace(1) [[PTR:%.*]], double [[VALUE:%.*]]) #[[ATTR0]] {
58
- ; COMMON-NEXT: [[TMP1:%.*]] = bitcast double [[VALUE]] to i64
59
- ; COMMON-NEXT: [[TMP2:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], i64 [[TMP1]] syncscope("agent") seq_cst, align 8
60
- ; COMMON-NEXT: [[RES:%.*]] = bitcast i64 [[TMP2]] to double
52
+ ; COMMON-NEXT: [[RES:%.*]] = atomicrmw xchg ptr addrspace(1) [[PTR]], double [[VALUE]] syncscope("agent") seq_cst, align 8, !amdgpu.no.fine.grained.memory [[META0]], !amdgpu.no.remote.memory [[META0]]
61
53
; COMMON-NEXT: ret double [[RES]]
62
54
;
63
55
%res = atomicrmw xchg ptr addrspace (1 ) %ptr , double %value syncscope("agent" ) seq_cst , !amdgpu.no.fine.grained.memory !0 , !amdgpu.no.remote.memory !0
@@ -268,7 +260,7 @@ define double @test_atomicrmw_fadd_f64_global_agent__amdgpu_no_fine_grained_memo
268
260
;
269
261
; GFX940-LABEL: define double @test_atomicrmw_fadd_f64_global_agent__amdgpu_no_fine_grained_memory(
270
262
; GFX940-SAME: ptr addrspace(1) [[PTR:%.*]], double [[VALUE:%.*]]) #[[ATTR0]] {
271
- ; GFX940-NEXT: [[RES:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR]], double [[VALUE]] syncscope("agent") seq_cst, align 8, !amdgpu.no.fine.grained.memory [[META0:![0-9]+ ]]
263
+ ; GFX940-NEXT: [[RES:%.*]] = atomicrmw fadd ptr addrspace(1) [[PTR]], double [[VALUE]] syncscope("agent") seq_cst, align 8, !amdgpu.no.fine.grained.memory [[META0]]
272
264
; GFX940-NEXT: ret double [[RES]]
273
265
;
274
266
; GFX10-LABEL: define double @test_atomicrmw_fadd_f64_global_agent__amdgpu_no_fine_grained_memory(
@@ -1681,5 +1673,19 @@ attributes #1 = { "denormal-fp-mode"="dynamic,dynamic" }
1681
1673
1682
1674
!0 = !{}
1683
1675
;.
1676
+ ; GFX803: [[META0]] = !{}
1677
+ ;.
1678
+ ; GFX906: [[META0]] = !{}
1679
+ ;.
1680
+ ; GFX908: [[META0]] = !{}
1681
+ ;.
1682
+ ; GFX90A: [[META0]] = !{}
1683
+ ;.
1684
1684
; GFX940: [[META0]] = !{}
1685
1685
;.
1686
+ ; GFX10: [[META0]] = !{}
1687
+ ;.
1688
+ ; GFX11: [[META0]] = !{}
1689
+ ;.
1690
+ ; GFX12: [[META0]] = !{}
1691
+ ;.
0 commit comments