[llvm] r261284 - [CaptureTracking] Add a test case for pointer cmpxchg
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 16:13:09 PST 2016
Author: reames
Date: Thu Feb 18 18:13:09 2016
New Revision: 261284
URL: http://llvm.org/viewvc/llvm-project?rev=261284&view=rev
Log:
[CaptureTracking] Add a test case for pointer cmpxchg
This test builds on 261250 (IR support for cmpxchg of pointers) and 261245 (capture tracking support for cmpxchg) to show that correctly analyze the capturing of pointers in a cmpxchg of pointer type.
Modified:
llvm/trunk/test/Transforms/FunctionAttrs/nocapture.ll
Modified: llvm/trunk/test/Transforms/FunctionAttrs/nocapture.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/FunctionAttrs/nocapture.ll?rev=261284&r1=261283&r2=261284&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/FunctionAttrs/nocapture.ll (original)
+++ llvm/trunk/test/Transforms/FunctionAttrs/nocapture.ll Thu Feb 18 18:13:09 2016
@@ -199,6 +199,12 @@ define void @test_cmpxchg(i32* %p) {
ret void
}
+; CHECK: define void @test_cmpxchg_ptr(i32** nocapture %p, i32* %q)
+define void @test_cmpxchg_ptr(i32** %p, i32* %q) {
+ cmpxchg i32** %p, i32* null, i32* %q 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
More information about the llvm-commits
mailing list