blob: bd7555a5310b1c569667b985194d32865220c47c [file] [log] [blame]
Lauro Ramos Venancio69642f12007-05-14 18:32:56 +00001; RUN: llvm-as < %s | \
2; RUN: llc -mtriple=arm-linux-gnueabi -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}