summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2015-07-20 21:42:14 +0000
committerQuentin Colombet <qcolombet@apple.com>2015-07-20 21:42:14 +0000
commit71a71485f40480ee28f257dfd38a29e859679342 (patch)
tree5c1dfc91ddc1817dfb0982daafaaad9884cd5aab /llvm/test/CodeGen/Thumb
parent48a9bdc6aa0385f0773445b9561e12456983c8da (diff)
downloadbcm5719-llvm-71a71485f40480ee28f257dfd38a29e859679342.tar.gz
bcm5719-llvm-71a71485f40480ee28f257dfd38a29e859679342.zip
[ARM] Refactor the prologue/epilogue emission to be more robust.
This is the first step toward supporting shrink-wrapping for this target. The changes could be summarized by these items: - Expand the tail-call return as part of the expand pseudo pass. - Get rid of the assumptions that the epilogue is the exit block: * Do not assume which registers are free in the epilogue. (This indirectly improve the lowering of the code for the segmented stacks, see the test cases.) * Take into account that the basic block can be empty. Related to <rdar://problem/20821730> llvm-svn: 242714
Diffstat (limited to 'llvm/test/CodeGen/Thumb')
-rw-r--r--llvm/test/CodeGen/Thumb/pop.ll4
-rw-r--r--llvm/test/CodeGen/Thumb/vargs.ll6
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/Thumb/pop.ll b/llvm/test/CodeGen/Thumb/pop.ll
index 3c539c69017..851f793e5ee 100644
--- a/llvm/test/CodeGen/Thumb/pop.ll
+++ b/llvm/test/CodeGen/Thumb/pop.ll
@@ -3,9 +3,9 @@
define void @t(i8* %a, ...) nounwind {
; CHECK-LABEL: t:
-; CHECK: pop {r3}
+; CHECK: pop {[[POP_REG:r[0-3]]]}
; CHECK-NEXT: add sp, #12
-; CHECK-NEXT: bx r3
+; CHECK-NEXT: bx [[POP_REG]]
entry:
%a.addr = alloca i8, i32 4
call void @llvm.va_start(i8* %a.addr)
diff --git a/llvm/test/CodeGen/Thumb/vargs.ll b/llvm/test/CodeGen/Thumb/vargs.ll
index 1c7b631741b..45b42125e16 100644
--- a/llvm/test/CodeGen/Thumb/vargs.ll
+++ b/llvm/test/CodeGen/Thumb/vargs.ll
@@ -32,12 +32,12 @@ bb7: ; preds = %bb
call void @llvm.va_end( i8* %va.upgrd.4 )
ret void
-; The return sequence should pop the lr to r3, recover the stack space used to
+; The return sequence should pop the lr to r0-3, recover the stack space used to
; store variadic argument registers, then return via r3. Possibly there is a pop
; before this, but only if the function happened to use callee-saved registers.
-; CHECK: pop {r3}
+; CHECK: pop {[[POP_REG:r[0-3]]]}
; CHECK: add sp, #[[IMM]]
-; CHECK: bx r3
+; CHECK: bx [[POP_REG]]
}
declare void @llvm.va_start(i8*)
OpenPOWER on IntegriCloud