New testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-08-18 01:27:10 +00:00
parent 41661fdb2e
commit 09540e2cc5

View File

@ -0,0 +1,19 @@
; Make sure that functions are removed successfully if they are referred to by
; a global that is dead. Make sure any globals they refer to die as well.
; RUN: if as < %s | opt -globaldce | dis | grep foo
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%b = internal global int ()* %foo ;; Unused, kills %foo
%foo = internal global int 7 ;; Should die when function %foo is killed
implementation
internal int %foo() { ;; dies when %b dies.
%ret = load int* %foo
ret int %ret
}