1 ; RUN: llc -o - %s -mtriple=arm64-apple-ios7.0 | FileCheck %s 2 3 define i8* @rt0(i32 %x) nounwind readnone { 4 entry: 5 ; CHECK-LABEL: rt0: 6 ; CHECK: mov x0, x30 7 %0 = tail call i8* @llvm.returnaddress(i32 0) 8 ret i8* %0 9 } 10 11 define i8* @rt2() nounwind readnone { 12 entry: 13 ; CHECK-LABEL: rt2: 14 ; CHECK: ldr x[[reg:[0-9]+]], [x29] 15 ; CHECK: ldr x[[reg]], [x[[reg]]] 16 ; CHECK: ldr x0, [x[[reg]], #8] 17 %0 = tail call i8* @llvm.returnaddress(i32 2) 18 ret i8* %0 19 } 20 21 declare i8* @llvm.returnaddress(i32) nounwind readnone 22