blob: c099cc90802162af7f84a21f2f257407f6c3418f [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
Chris Lattner83f241e2007-04-28 06:02:13 +00005; XFAIL: *
6
Anton Korobeynikov8b0a8c82007-04-25 14:27:10 +00007@bar = external global i32
8@foo1 = alias i32* @bar
9@foo2 = alias i32* @bar
10
11%FunTy = type i32()
12
13declare i32 @foo_f()
14@bar_f = alias weak %FunTy* @foo_f
15
16@bar_i = alias internal i32* @bar
17
18define i32 @test() {
19entry:
20 %tmp = load i32* @foo1
21 %tmp1 = load i32* @foo2
22 %tmp0 = load i32* @bar_i
23 %tmp2 = call i32 @foo_f()
24 %tmp3 = add i32 %tmp, %tmp2
25 %tmp4 = call %FunTy* @bar_f()
26 %tmp5 = add i32 %tmp3, %tmp4
27 %tmp6 = add i32 %tmp1, %tmp5
28 %tmp7 = add i32 %tmp6, %tmp0
29 ret i32 %tmp7
30}