aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2012-10-19 08:23:06 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2012-10-19 08:23:06 +0000
commit0d3c8d5d16caa4c4f1310699722aa2cbe2844f21 (patch)
treed35a659c6de5b07f62962164e8729fd55f5ac7aa /test/CodeGen/ARM
parent0d7d11d57f81d2318a730d7599bbdaa67a721150 (diff)
ARM:
Removed extra stack frame object for fixed byval arguments, VarArgsStyleRegisters invocation was reworked due to some improper usage in past. PR14099 also demonstrates it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
-rw-r--r--test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll b/test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll
new file mode 100644
index 0000000000..fcc6a7f7e9
--- /dev/null
+++ b/test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll
@@ -0,0 +1,29 @@
+; 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: 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, #16
+; CHECK: push {r11, lr}
+; 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: caller:
+define void @caller() {
+
+; CHECK: ldm r0, {r1, r2, r3}
+ call void @t(i32 0, %struct.s* @v);
+ ret void
+}