New testcase we were not handling before.
authorChris Lattner <sabre@nondot.org>
Sun, 10 Oct 2004 16:46:48 +0000 (16:46 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 10 Oct 2004 16:46:48 +0000 (16:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16875 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/GlobalOpt/deadglobal-2.llx [new file with mode: 0644]

diff --git a/test/Transforms/GlobalOpt/deadglobal-2.llx b/test/Transforms/GlobalOpt/deadglobal-2.llx
new file mode 100644 (file)
index 0000000..d426aff
--- /dev/null
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal
+
+; This is a harder case to delete as the GEP has a variable index.
+
+%G = internal global [4 x int] zeroinitializer
+
+void %foo(int %X) {
+       %Ptr = getelementptr [4 x int]* %G, int 0, int %X
+       store int 1, int* %Ptr
+       ret void
+}