aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/GlobalOpt/alias-resolve.ll
blob: ead599896a1b0db3f16f1e3b8bd3cffab52352e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: opt %s -globalopt -S > %t
; RUN: cat %t | grep foo1 | count 1
; RUN: cat %t | grep foo2 | count 4
; RUN: cat %t | grep bar1 | count 1
; RUN: cat %t | grep bar2 | count 4

@foo1 = alias void ()* @foo2
@foo2 = alias weak void()* @bar1
@bar1  = alias void ()* @bar2

declare void @bar2()

define void @baz() {
entry:
        call void @foo1()
        call void @foo2()
        call void @bar1()
        ret void
}