blob: 33cbd3d37c991ed384611045049989d1d46901f3 [file] [log] [blame]
Jim Grosbach6a7a7272013-08-22 00:14:24 +00001; RUN: llc < %s -mtriple=thumbv7-apple-ios -mcpu=cortex-m3 | FileCheck %s
2
3@foo = common global void ()* null, align 4
4
5; Make sure in the presence of a tail call, r9 doesn't get used to hold
6; the destination address. It's callee-saved in AAPCS.
7define arm_aapcscc void @test(i32 %a) nounwind {
8; CHECK-LABEL: test:
Benjamin Kramerc10563d2014-01-11 21:06:00 +00009; CHECK-NOT: bx r9
David Blaikiea79ac142015-02-27 21:17:42 +000010 %tmp = load void ()*, void ()** @foo, align 4
Jim Grosbach6a7a7272013-08-22 00:14:24 +000011 tail call void asm sideeffect "", "~{r0},~{r1},~{r2},~{r3},~{r12}"() nounwind
12 tail call arm_aapcscc void %tmp() nounwind
13 ret void
14}