summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/nocapture.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/nocapture.ll b/llvm/test/Transforms/FunctionAttrs/nocapture.ll
index 4057b2a86e3..3bbe8248341 100644
--- a/llvm/test/Transforms/FunctionAttrs/nocapture.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nocapture.ll
@@ -193,3 +193,14 @@ define void @test6_2(i8* %x6_2, i8* %y6_2, i8* %z6_2) {
ret void
}
+; CHECK: define void @test_cmpxchg(i32* nocapture %p)
+define void @test_cmpxchg(i32* %p) {
+ cmpxchg i32* %p, i32 0, i32 1 acquire monotonic
+ ret void
+}
+
+; CHECK: define void @test_atomicrmw(i32* nocapture %p)
+define void @test_atomicrmw(i32* %p) {
+ atomicrmw add i32* %p, i32 1 seq_cst
+ ret void
+}
OpenPOWER on IntegriCloud