Convert more tests to avoid llvm-as.
[oota-llvm.git] / test / CodeGen / X86 / aliases.ll
1 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
2 ; RUN: grep set %t   | count 7
3 ; RUN: grep globl %t | count 6
4 ; RUN: grep weak %t  | count 1
5 ; RUN: grep hidden %t | count 1
6 ; RUN: grep protected %t | count 1
7
8 @bar = external global i32
9 @foo1 = alias i32* @bar
10 @foo2 = alias i32* @bar
11
12 %FunTy = type i32()
13
14 declare i32 @foo_f()
15 @bar_f = alias weak %FunTy* @foo_f
16
17 @bar_i = alias internal i32* @bar
18
19 @A = alias bitcast (i32* @bar to i64*)
20
21 @bar_h = hidden alias i32* @bar
22
23 @bar_p = protected alias i32* @bar
24
25 define i32 @test() {
26 entry:
27    %tmp = load i32* @foo1
28    %tmp1 = load i32* @foo2
29    %tmp0 = load i32* @bar_i
30    %tmp2 = call i32 @foo_f()
31    %tmp3 = add i32 %tmp, %tmp2
32    %tmp4 = call %FunTy* @bar_f()
33    %tmp5 = add i32 %tmp3, %tmp4
34    %tmp6 = add i32 %tmp1, %tmp5
35    %tmp7 = add i32 %tmp6, %tmp0
36    ret i32 %tmp7
37 }