1 ; RUN: llc -mtriple=aarch64-apple-darwin -verify-machineinstrs < %s | FileCheck %s
2 ; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -fast-isel-abort=1 -verify-machineinstrs < %s | FileCheck %s
4 define ptr @test_frameaddress0() nounwind {
6 ; CHECK-LABEL: test_frameaddress0:
7 ; CHECK: stp x29, x30, [sp, #-16]!
10 ; CHECK: ldp x29, x30, [sp], #16
12 %0 = call ptr @llvm.frameaddress(i32 0)
16 define ptr @test_frameaddress2() nounwind {
18 ; CHECK-LABEL: test_frameaddress2:
19 ; CHECK: stp x29, x30, [sp, #-16]!
21 ; CHECK: ldr x[[reg:[0-9]+]], [x29]
22 ; CHECK: ldr x0, [x[[reg]]]
23 ; CHECK: ldp x29, x30, [sp], #16
25 %0 = call ptr @llvm.frameaddress(i32 2)
29 declare ptr @llvm.frameaddress(i32) nounwind readnone