Dan Gohman | b7c0b24 | 2009-09-11 18:36:27 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=arm-linux-gnueabi -o %t |
Chris Lattner | c618c8a | 2010-01-26 21:53:08 +0000 | [diff] [blame] | 2 | ; RUN: grep { = } %t | count 5 |
Dan Gohman | 43c3db3 | 2007-08-15 13:49:33 +0000 | [diff] [blame] | 3 | ; RUN: grep globl %t | count 4 |
| 4 | ; RUN: grep weak %t | count 1 |
Lauro Ramos Venancio | 69642f1 | 2007-05-14 18:32:56 +0000 | [diff] [blame] | 5 | |
| 6 | @bar = external global i32 |
| 7 | @foo1 = alias i32* @bar |
| 8 | @foo2 = alias i32* @bar |
| 9 | |
| 10 | %FunTy = type i32() |
| 11 | |
| 12 | declare 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 | |
| 19 | define i32 @test() { |
| 20 | entry: |
| 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 | } |