1 ; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s
3 define ptr @rt0(i32 %x) nounwind readnone {
9 %0 = tail call ptr @llvm.returnaddress(i32 0)
13 define ptr @rt2() nounwind readnone {
16 ; CHECK: stp x29, x30, [sp, #-16]!
18 ; CHECK: ldr x[[REG:[0-9]+]], [x29]
19 ; CHECK: ldr x[[REG2:[0-9]+]], [x[[REG]]]
20 ; CHECK: ldr x30, [x[[REG2]], #8]
23 ; CHECK: ldp x29, x30, [sp], #16
25 %0 = tail call ptr @llvm.returnaddress(i32 2)
29 declare ptr @llvm.returnaddress(i32) nounwind readnone