2013-08-22 08:14:24 +08:00
|
|
|
; RUN: llc < %s -mtriple=thumbv7-apple-ios -mcpu=cortex-m3 | FileCheck %s
|
|
|
|
|
|
|
|
@foo = common global void ()* null, align 4
|
|
|
|
|
|
|
|
; Make sure in the presence of a tail call, r9 doesn't get used to hold
|
|
|
|
; the destination address. It's callee-saved in AAPCS.
|
|
|
|
define arm_aapcscc void @test(i32 %a) nounwind {
|
|
|
|
; CHECK-LABEL: test:
|
2014-01-12 05:06:00 +08:00
|
|
|
; CHECK-NOT: bx r9
|
2013-08-22 08:14:24 +08:00
|
|
|
%tmp = load void ()** @foo, align 4
|
|
|
|
tail call void asm sideeffect "", "~{r0},~{r1},~{r2},~{r3},~{r12}"() nounwind
|
|
|
|
tail call arm_aapcscc void %tmp() nounwind
|
|
|
|
ret void
|
|
|
|
}
|