Adding srcdir arg
[oota-llvm.git] / test / Transforms / GlobalDCE / 2002-08-17-FunctionDGE.ll
1 ; Make sure that functions are removed successfully if they are referred to by
2 ; a global that is dead.  Make sure any globals they refer to die as well.
3
4 ; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep foo
5
6 %b = internal global int ()* %foo   ;; Unused, kills %foo
7
8 %foo = internal global int 7         ;; Should die when function %foo is killed
9
10 implementation
11
12 internal int %foo() {               ;; dies when %b dies.
13         %ret = load int* %foo
14         ret int %ret
15 }
16