blob: 31c500756c4ed5cf4970d4b520ed4631004b1ea8 [file] [log] [blame]
Dan Gohmanb7c0b242009-09-11 18:36:27 +00001; RUN: llc < %s -mtriple=arm-linux-gnueabi -o %t
Chris Lattnerc618c8a2010-01-26 21:53:08 +00002; RUN: grep { = } %t | count 5
Dan Gohman43c3db32007-08-15 13:49:33 +00003; RUN: grep globl %t | count 4
4; RUN: grep weak %t | count 1
Lauro Ramos Venancio69642f12007-05-14 18:32:56 +00005
6@bar = external global i32
7@foo1 = alias i32* @bar
8@foo2 = alias i32* @bar
9
10%FunTy = type i32()
11
12declare i32 @foo_f()
13@bar_f = alias weak %FunTy* @foo_f
14
15@bar_i = alias internal i32* @bar
16
17@A = alias bitcast (i32* @bar to i64*)
18
19define i32 @test() {
20entry:
21 %tmp = load i32* @foo1
22 %tmp1 = load i32* @foo2
23 %tmp0 = load i32* @bar_i
24 %tmp2 = call i32 @foo_f()
25 %tmp3 = add i32 %tmp, %tmp2
26 %tmp4 = call %FunTy* @bar_f()
27 %tmp5 = add i32 %tmp3, %tmp4
28 %tmp6 = add i32 %tmp1, %tmp5
29 %tmp7 = add i32 %tmp6, %tmp0
30 ret i32 %tmp7
31}