aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-16 18:28:01 +0000
committerChris Lattner <sabre@nondot.org>2004-10-16 18:28:01 +0000
commit6542a46e6f4db4325e87f9d0010059053339cb03 (patch)
treeba0e0a58d08a924bb0c3d564d07e36cd68db0f3b
parent4c554c589ffc081965772f8123a8377a83360062 (diff)
downloadexternal_llvm-6542a46e6f4db4325e87f9d0010059053339cb03.zip
external_llvm-6542a46e6f4db4325e87f9d0010059053339cb03.tar.gz
external_llvm-6542a46e6f4db4325e87f9d0010059053339cb03.tar.bz2
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17061 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/GlobalOpt/undef-init.llx18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/undef-init.llx b/test/Transforms/GlobalOpt/undef-init.llx
new file mode 100644
index 0000000..f4e1101
--- /dev/null
+++ b/test/Transforms/GlobalOpt/undef-init.llx
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep store
+
+%llvm.global_ctors = appending global [1 x { int, void ()* }] [ { int, void ()* } { int 65535, void ()* %_GLOBAL__I__Z3foov } ] ; <[1 x { int, void ()* }]*> [#uses=0]
+%X.0 = internal global int undef ; <int*> [#uses=2]
+
+implementation ; Functions:
+
+int %_Z3foov() {
+entry:
+ %tmp.1 = load int* %X.0 ; <int> [#uses=1]
+ ret int %tmp.1
+}
+
+internal void %_GLOBAL__I__Z3foov() {
+entry:
+ store int 1, int* %X.0
+ ret void
+}