• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -globalopt -S | FileCheck %s
2
3@foo1 = alias void (), void ()* @foo2
4; CHECK: @foo1 = alias void (), void ()* @bar2
5
6@foo2 = alias void(), void()* @bar1
7; CHECK: @foo2 = alias void (), void ()* @bar2
8
9@bar1  = alias void (), void ()* @bar2
10; CHECK: @bar1 = alias void (), void ()* @bar2
11
12@weak1 = weak alias void (), void ()* @bar2
13; CHECK: @weak1 = weak alias void (), void ()* @bar2
14
15@bar4 = private unnamed_addr constant [2 x i8*] zeroinitializer
16@foo4 = weak_odr unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
17; CHECK: @foo4 = weak_odr unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
18
19define void @bar2() {
20  ret void
21}
22; CHECK: define void @bar2()
23
24define void @baz() {
25entry:
26         call void @foo1()
27; CHECK: call void @bar2()
28
29         call void @foo2()
30; CHECK: call void @bar2()
31
32         call void @bar1()
33; CHECK: call void @bar2()
34
35         call void @weak1()
36; CHECK: call void @weak1()
37         ret void
38}
39
40@foo3 = alias void (), void ()* @bar3
41; CHECK-NOT: bar3
42
43define internal void @bar3() {
44  ret void
45}
46;CHECK: define void @foo3
47