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