blob: 7a4aad03acbba92f56f00be13f0bbcc746f3aba2 [file] [log] [blame]
Anton Korobeynikov8b0a8c82007-04-25 14:27:10 +00001; RUN: llvm-as < %s | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
5@bar = external global i32
6@foo1 = alias i32* @bar
7@foo2 = alias i32* @bar
8
9%FunTy = type i32()
10
11declare i32 @foo_f()
12@bar_f = alias weak %FunTy* @foo_f
13
14@bar_i = alias internal i32* @bar
15
16define i32 @test() {
17entry:
18 %tmp = load i32* @foo1
19 %tmp1 = load i32* @foo2
20 %tmp0 = load i32* @bar_i
21 %tmp2 = call i32 @foo_f()
22 %tmp3 = add i32 %tmp, %tmp2
23 %tmp4 = call %FunTy* @bar_f()
24 %tmp5 = add i32 %tmp3, %tmp4
25 %tmp6 = add i32 %tmp1, %tmp5
26 %tmp7 = add i32 %tmp6, %tmp0
27 ret i32 %tmp7
28}