llvm.org GIT mirror llvm / release_70 test / CodeGen / ARM / 2012-10-18-PR14099-ByvalFrameAddress.ll
release_70

Tree @release_70 (Download .tar.gz)

2012-10-18-PR14099-ByvalFrameAddress.ll @release_70

0d3c8d5
 
 
 
 
 
 
8b2b8a1
0d3c8d5
 
 
 
52f83a9
0d3c8d5
52f83a9
0d3c8d5
 
 
 
 
 
 
 
8b2b8a1
0d3c8d5
 
f41c3c9
0d3c8d5
 
 
; RUN: llc < %s -mtriple=armv7-linux-gnueabi | FileCheck %s

%struct.s = type { [4 x i32] }
@v = constant %struct.s zeroinitializer; 

declare void @f(%struct.s* %p);

; CHECK-LABEL: t:
define void @t(i32 %a, %struct.s* byval %s) nounwind {
entry:

; Here we need to only check proper start address of restored %s argument.
; CHECK:      sub     sp, sp, #12
; CHECK:      push    {r11, lr}
; CHECK:      sub     sp, sp, #4
; CHECK:      add     r0, sp, #12
; CHECK:      stm     r0, {r1, r2, r3}
; CHECK:      add     r0, sp, #12
; CHECK-NEXT: bl f
  call void @f(%struct.s* %s)
  ret void
}

; CHECK-LABEL: caller:
define void @caller() {

; CHECK:      ldm     r{{[0-9]+}}, {r1, r2, r3}
  call void @t(i32 0, %struct.s* @v);
  ret void
}