1 ; RUN: llc < %s -mtriple=arm-apple-darwin -regalloc=linearscan | FileCheck %s
2 ; RUN: llc < %s -mtriple=thumbv6-apple-darwin -regalloc=linearscan | FileCheck %s
6 ; This test needs the reserved register r7 to be coalesced into the ldr.
7 ; So far, only linear scan can do that.
9 define i8* @rt0(i32 %x) nounwind readnone {
14 %0 = tail call i8* @llvm.returnaddress(i32 0)
18 define i8* @rt2() nounwind readnone {
22 ; CHECK: ldr r[[R0:[0-9]+]], [r7]
24 ; CHECK: ldr r0, [r0, #4]
25 %0 = tail call i8* @llvm.returnaddress(i32 2)
29 declare i8* @llvm.returnaddress(i32) nounwind readnone