A testcase that globalopt now handles
authorChris Lattner <sabre@nondot.org>
Sat, 9 Oct 2004 21:50:05 +0000 (21:50 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 9 Oct 2004 21:50:05 +0000 (21:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16872 91177308-0d34-0410-b5e6-96231b3b80d8

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

diff --git a/test/Transforms/GlobalOpt/storepointer.llx b/test/Transforms/GlobalOpt/storepointer.llx
new file mode 100644 (file)
index 0000000..c10ee7c
--- /dev/null
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+
+%G = internal global void ()* null
+
+implementation
+
+internal void %Actual() {
+       ret void
+}
+
+void %init() {
+       store void()* %Actual, void()** %G
+       ret void
+}
+
+void %doit() {
+       %FP = load void()** %G
+       call void %FP()
+       ret void
+}