Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
      2 ; RUN: grep globl %t | count 6
      3 ; RUN: grep weak %t  | count 1
      4 ; RUN: grep hidden %t | count 1
      5 ; RUN: grep protected %t | count 1
      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 @bar_h = hidden alias i32* @bar
     21 
     22 @bar_p = protected alias i32* @bar
     23 
     24 define i32 @test() {
     25 entry:
     26    %tmp = load i32* @foo1
     27    %tmp1 = load i32* @foo2
     28    %tmp0 = load i32* @bar_i
     29    %tmp2 = call i32 @foo_f()
     30    %tmp3 = add i32 %tmp, %tmp2
     31    %tmp4 = call %FunTy* @bar_f()
     32    %tmp5 = add i32 %tmp3, %tmp4
     33    %tmp6 = add i32 %tmp1, %tmp5
     34    %tmp7 = add i32 %tmp6, %tmp0
     35    ret i32 %tmp7
     36 }
     37