blob: 9bd6140848e1a1e43912c392b1d700e5fee95894 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-as < %s | \
2; RUN: llc -mtriple=i686-pc-linux-gnu -o %t -f
3; RUN: grep -c set %t | grep 5
4; RUN: grep -c globl %t | grep 4
5; RUN: grep -c weak %t | grep 1
6
7@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
18@A = alias bitcast (i32* @bar to i64*)
19
20define i32 @test() {
21entry:
22 %tmp = load i32* @foo1
23 %tmp1 = load i32* @foo2
24 %tmp0 = load i32* @bar_i
25 %tmp2 = call i32 @foo_f()
26 %tmp3 = add i32 %tmp, %tmp2
27 %tmp4 = call %FunTy* @bar_f()
28 %tmp5 = add i32 %tmp3, %tmp4
29 %tmp6 = add i32 %tmp1, %tmp5
30 %tmp7 = add i32 %tmp6, %tmp0
31 ret i32 %tmp7
32}