Home | History | Annotate | Download | only in ARM
      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, #12
     14 ; CHECK:      push    {r11, lr}
     15 ; CHECK:      sub     sp, sp, #4
     16 ; CHECK:      add     r0, sp, #12
     17 ; CHECK:      stm     r0, {r1, r2, r3}
     18 ; CHECK:      add     r0, sp, #12
     19 ; CHECK-NEXT: bl f
     20   call void @f(%struct.s* %s)
     21   ret void
     22 }
     23 
     24 ; CHECK-LABEL: caller:
     25 define void @caller() {
     26 
     27 ; CHECK:      ldm     r0, {r1, r2, r3}
     28   call void @t(i32 0, %struct.s* @v);
     29   ret void
     30 }
     31