Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s
      2 
      3 ; CHECK: .globl	test
      4 
      5 ; CHECK: .Lstructvar:
      6 ; CHECK: .size .Lstructvar, 8
      7 
      8 ; CHECK: .globl	foo1
      9 ; CHECK: foo1 = bar
     10 ; CHECK-NOT: .size foo1
     11 
     12 ; CHECK: .globl	foo2
     13 ; CHECK: foo2 = bar
     14 ; CHECK-NOT: .size foo2
     15 
     16 ; CHECK: .weak	bar_f
     17 ; CHECK: bar_f = foo_f
     18 ; CHECK-NOT: .size bar_f
     19 
     20 ; CHECK: bar_i = bar
     21 ; CHECK-NOT: .size bar_i
     22 
     23 ; CHECK: .globl	A
     24 ; CHECK: A = bar
     25 ; CHECK-NOT: .size A
     26 
     27 ; CHECK: .globl elem0
     28 ; CHECK: elem0 = .Lstructvar
     29 ; CHECK: .size elem0, 4
     30 
     31 ; CHECK: .globl elem1
     32 ; CHECK: elem1 = .Lstructvar+4
     33 ; CHECK: .size elem1, 4
     34 
     35 @bar = global i32 42
     36 @foo1 = alias i32, i32* @bar
     37 @foo2 = alias i32, i32* @bar
     38 
     39 %FunTy = type i32()
     40 
     41 define i32 @foo_f() {
     42   ret i32 0
     43 }
     44 @bar_f = weak alias %FunTy, %FunTy* @foo_f
     45 
     46 @bar_i = internal alias i32, i32* @bar
     47 
     48 @A = alias i64, bitcast (i32* @bar to i64*)
     49 
     50 @structvar = private global {i32, i32} {i32 1, i32 2}
     51 @elem0 = alias i32, getelementptr({i32, i32}, {i32, i32}*  @structvar, i32 0, i32 0)
     52 @elem1 = alias i32, getelementptr({i32, i32}, {i32, i32}*  @structvar, i32 0, i32 1)
     53 
     54 define i32 @test() {
     55 entry:
     56    %tmp = load i32, i32* @foo1
     57    %tmp1 = load i32, i32* @foo2
     58    %tmp0 = load i32, i32* @bar_i
     59    %tmp2 = call i32 @foo_f()
     60    %tmp3 = add i32 %tmp, %tmp2
     61    %tmp4 = call i32 @bar_f()
     62    %tmp5 = add i32 %tmp3, %tmp4
     63    %tmp6 = add i32 %tmp1, %tmp5
     64    %tmp7 = add i32 %tmp6, %tmp0
     65    ret i32 %tmp7
     66 }
     67