summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll b/llvm/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll
new file mode 100644
index 00000000000..8212e8945ec
--- /dev/null
+++ b/llvm/test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll
@@ -0,0 +1,12 @@
+; RUN: opt < %s -functionattrs -S | FileCheck %s
+; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
+; PR2792
+
+@g = global i32 0 ; <i32*> [#uses=1]
+
+define i32 @f() {
+ %t = load volatile i32, i32* @g ; <i32> [#uses=1]
+ ret i32 %t
+}
+
+; CHECK-NOT: attributes #{{.*}} read
OpenPOWER on IntegriCloud