1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-31 07:52:55 +01:00
llvm-mirror/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll
Duncan Sands 897f9579d6 Teach GlobalOpt to delete aliases with internal linkage (after
forwarding any uses).  GlobalDCE can also do this, but is only
run at -O3.

llvm-svn: 90850
2009-12-08 10:10:20 +00:00

25 lines
324 B
LLVM

; RUN: opt < %s -globalopt -S | FileCheck %s
define internal void @f() {
; CHECK-NOT: @f
; CHECK: define void @a
ret void
}
@a = alias void ()* @f
define void @g() {
call void()* @a()
ret void
}
@b = alias internal void ()* @g
; CHECK-NOT: @b
define void @h() {
call void()* @b()
; CHECK: call void @g
ret void
}