summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-05-26 17:36:22 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-05-26 17:36:22 +0000
commit7f32420ed520ae6298900e8a50109c265c4dba85 (patch)
tree290bb48234b9f84f2101b6fd8dced8e6e372ec41 /llvm/test/Transforms/FunctionAttrs
parent686c70c3dc951d6f4b9c09197171f10ac25189f6 (diff)
downloadbcm5719-llvm-7f32420ed520ae6298900e8a50109c265c4dba85.tar.gz
bcm5719-llvm-7f32420ed520ae6298900e8a50109c265c4dba85.zip
[CaptureTracking] Volatile operations capture their memory location
The memory location that corresponds to a volatile operation is very special. They are observed by the machine in ways which we cannot reason about. Differential Revision: http://reviews.llvm.org/D20555 llvm-svn: 270879
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/nocapture.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/nocapture.ll b/llvm/test/Transforms/FunctionAttrs/nocapture.ll
index ed29d372bea..020d8bcd4c7 100644
--- a/llvm/test/Transforms/FunctionAttrs/nocapture.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nocapture.ll
@@ -210,3 +210,11 @@ define void @test_atomicrmw(i32* %p) {
atomicrmw add i32* %p, i32 1 seq_cst
ret void
}
+
+; CHECK: define void @test_volatile(i32* %x)
+define void @test_volatile(i32* %x) {
+entry:
+ %gep = getelementptr i32, i32* %x, i64 1
+ store volatile i32 0, i32* %gep, align 4
+ ret void
+}
OpenPOWER on IntegriCloud