67de589de39e013f48f7a71de8da425c814389c5
[oota-llvm.git] / test / Analysis / DSGraph / constant_globals.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=A:SM
2 ; Constant globals should not mark stuff incomplete.  This should allow the 
3 ; bu pass to resolve the indirect call immediately in "test", allowing %A to
4 ; be marked complete and the store to happen.
5
6 ; This is the common case for handling vtables aggressively.
7
8 %G = constant void (int*)* %foo 
9
10 implementation
11
12 void %foo(int *%X) {
13   store int 0, int* %X
14   ret void
15 }
16
17 void %test() {
18   %Fp = load void (int*)** %G
19   %A = alloca int
20   call void %Fp(int* %A)
21   ret void
22 }