Skip to content

Commit 0b17c0b

Browse files
author
Hugh Delaney
committed
Add test
1 parent 40ff737 commit 0b17c0b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; RUN: sed -e s/.T1://g %s | opt -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-add-global-for-atomic-xor -S | FileCheck %s --check-prefix=CHECK1
2+
; RUN: sed -e s/.T2://g %s | opt -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-add-global-for-atomic-xor -S | FileCheck %s --check-prefix=CHECK2
3+
4+
;T1: define i32 @test(ptr %p) {
5+
;T1: ; CHECK1: @HipAtomicXorModuleNeedsPrefetch
6+
;T1: %1 = atomicrmw volatile xor ptr %p, i32 1 syncscope("agent-one-as") monotonic, align 4
7+
;T1: ret i32 %1
8+
;T1: }
9+
10+
;T2: define i32 @test(ptr %p) {
11+
;T2: ; CHECK2-NOT: @HipAtomicXorModuleNeedsPrefetch
12+
;T2: %1 = atomicrmw volatile add ptr %p, i32 1 syncscope("agent-one-as") monotonic, align 4
13+
;T2: ret i32 %1
14+
;T2: }
15+

0 commit comments

Comments
 (0)