Move the complex address expression out of DIVariable and into an extra
[oota-llvm.git] / test / CodeGen / ARM / 2012-10-18-PR14099-ByvalFrameAddress.ll
1 ; RUN: llc < %s -mtriple=armv7-linux-gnueabi | FileCheck %s
2
3 %struct.s = type { [4 x i32] }
4 @v = constant %struct.s zeroinitializer; 
5
6 declare void @f(%struct.s* %p);
7
8 ; CHECK-LABEL: t:
9 define void @t(i32 %a, %struct.s* byval %s) nounwind {
10 entry:
11
12 ; Here we need to only check proper start address of restored %s argument.
13 ; CHECK:      sub     sp, sp, #16
14 ; CHECK:      push    {r11, lr}
15 ; CHECK:      add     r0, sp, #12
16 ; CHECK:      stm     r0, {r1, r2, r3}
17 ; CHECK:      add     r0, sp, #12
18 ; CHECK-NEXT: bl f
19   call void @f(%struct.s* %s)
20   ret void
21 }
22
23 ; CHECK-LABEL: caller:
24 define void @caller() {
25
26 ; CHECK:      ldm     r0, {r1, r2, r3}
27   call void @t(i32 0, %struct.s* @v);
28   ret void
29 }