aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll')
-rw-r--r--test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll b/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll
new file mode 100644
index 000000000000..b6077fd8ee39
--- /dev/null
+++ b/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -functionattrs | llvm-dis | not grep read
+; PR2792
+
+@g = global i32 0 ; <i32*> [#uses=1]
+
+define i32 @f() {
+ %t = volatile load i32* @g ; <i32> [#uses=1]
+ ret i32 %t
+}