aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/GlobalOpt/load-store-global.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-19 22:32:52 +0000
committerChris Lattner <sabre@nondot.org>2008-04-19 22:32:52 +0000
commitcbb94f14067f574e835d25b0492e569b0bb9103a (patch)
treec6eb6b32b7cc36629c9abb53e6974aafe6dbf32f /test/Transforms/GlobalOpt/load-store-global.ll
parent9dfeffd4a5090df1f9c344a7c5e2f2265184acee (diff)
downloadexternal_llvm-cbb94f14067f574e835d25b0492e569b0bb9103a.zip
external_llvm-cbb94f14067f574e835d25b0492e569b0bb9103a.tar.gz
external_llvm-cbb94f14067f574e835d25b0492e569b0bb9103a.tar.bz2
rename *.llx -> *.ll, last batch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GlobalOpt/load-store-global.ll')
-rw-r--r--test/Transforms/GlobalOpt/load-store-global.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/load-store-global.ll b/test/Transforms/GlobalOpt/load-store-global.ll
new file mode 100644
index 0000000..d89d226
--- /dev/null
+++ b/test/Transforms/GlobalOpt/load-store-global.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
+
+@G = internal global i32 17 ; <i32*> [#uses=3]
+
+define void @foo() {
+ %V = load i32* @G ; <i32> [#uses=1]
+ store i32 %V, i32* @G
+ ret void
+}
+
+define i32 @bar() {
+ %X = load i32* @G ; <i32> [#uses=1]
+ ret i32 %X
+}
+