New testcase
authorChris Lattner <sabre@nondot.org>
Fri, 8 Oct 2004 17:29:47 +0000 (17:29 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 8 Oct 2004 17:29:47 +0000 (17:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16841 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/GlobalOpt/globalsra.llx [new file with mode: 0644]

diff --git a/test/Transforms/GlobalOpt/globalsra.llx b/test/Transforms/GlobalOpt/globalsra.llx
new file mode 100644 (file)
index 0000000..920abb1
--- /dev/null
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+
+%G = internal global { int, float, {double} } { int 1, float 1.0, {double} {double 17.27} }
+
+void %onlystore() {
+       store int 123, int* getelementptr ({ int, float, {double} }* %G, int 0, uint 0)
+       ret void
+}
+
+float %storeinit() {
+       store float 1.0, float* getelementptr ({ int, float, {double} }* %G, int 0, uint 1)
+       %X = load float* getelementptr ({ int, float, {double} }* %G, int 0, uint 1)
+       ret float %X
+}
+
+double %constantize() {
+       %X = load double* getelementptr ({ int, float, {double} }* %G, int 0, uint 2, uint 0)
+       ret double %X
+}