aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/GlobalOpt/basictest.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/GlobalOpt/basictest.ll')
-rw-r--r--test/Transforms/GlobalOpt/basictest.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/basictest.ll b/test/Transforms/GlobalOpt/basictest.ll
new file mode 100644
index 0000000..4332d3d
--- /dev/null
+++ b/test/Transforms/GlobalOpt/basictest.ll
@@ -0,0 +1,9 @@
+; RUN: opt < %s -globalopt -S | not grep global
+
+@X = internal global i32 4 ; <i32*> [#uses=1]
+
+define i32 @foo() {
+ %V = load i32* @X ; <i32> [#uses=1]
+ ret i32 %V
+}
+