aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-25 23:34:04 +0000
committerChris Lattner <sabre@nondot.org>2004-02-25 23:34:04 +0000
commit26b6dac640907dd79fc88b366ef53110309a2201 (patch)
treede692dbdabc30bc768a126940e727adf03dd315f
parentc420ab6c252ff8e552080d1055ddd82002b81e83 (diff)
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11851 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/DSGraph/constant_globals.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Analysis/DSGraph/constant_globals.ll b/test/Analysis/DSGraph/constant_globals.ll
new file mode 100644
index 0000000000..82cfb96832
--- /dev/null
+++ b/test/Analysis/DSGraph/constant_globals.ll
@@ -0,0 +1,22 @@
+; RUN: analyze %s -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=A:SM
+; Constant globals should not mark stuff incomplete. This should allow the
+; bu pass to resolve the indirect call immediately in "test", allowing %A to
+; be marked complete and the store to happen.
+
+; This is the common case for handling vtables aggressively.
+
+%G = constant void (int*)* %foo
+
+implementation
+
+void %foo(int *%X) {
+ store int 0, int* %X
+ ret void
+}
+
+void %test() {
+ %Fp = load void (int*)** %G
+ %A = alloca int
+ call void %Fp(int* %A)
+ ret void
+}