blob: 70b2c4d4195bf8dada82b09d8117b4aeef668c5a [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
Dan Gohman43c3db32007-08-15 13:49:33 +00003; RUN: grep set %t | count 5
4; RUN: grep globl %t | count 4
5; RUN: grep weak %t | count 1
Lauro Ramos Venancio69642f12007-05-14 18:32:56 +00006
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}