mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
50e8682f28
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6965 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
463 B
LLVM
17 lines
463 B
LLVM
; 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: as < %s | opt -globaldce | dis | not grep foo
|
|
|
|
%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
|
|
}
|
|
|