comparison test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll @ 0:95c75e76d11b

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900
parents
children afa8332a0e37
comparison
equal deleted inserted replaced
-1:000000000000 0:95c75e76d11b
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 }