1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[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.

llvm-svn: 261284
This commit is contained in:
Philip Reames 2016-02-19 00:13:09 +00:00
parent 2d78d97ccc
commit fd1b93f5a6

View File

@ -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