Home | History | Annotate | Download | only in AArch64
      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
      3 
      4 define i8* @test_frameaddress0() nounwind {
      5 entry:
      6 ; CHECK-LABEL: test_frameaddress0:
      7 ; CHECK: stp x29, x30, [sp, #-16]!
      8 ; CHECK: mov x29, sp
      9 ; CHECK: mov x0, x29
     10 ; CHECK: ldp x29, x30, [sp], #16
     11 ; CHECK: ret
     12   %0 = call i8* @llvm.frameaddress(i32 0)
     13   ret i8* %0
     14 }
     15 
     16 define i8* @test_frameaddress2() nounwind {
     17 entry:
     18 ; CHECK-LABEL: test_frameaddress2:
     19 ; CHECK: stp x29, x30, [sp, #-16]!
     20 ; CHECK: mov x29, sp
     21 ; CHECK: ldr x[[reg:[0-9]+]], [x29]
     22 ; CHECK: ldr x0, [x[[reg]]]
     23 ; CHECK: ldp x29, x30, [sp], #16
     24 ; CHECK: ret
     25   %0 = call i8* @llvm.frameaddress(i32 2)
     26   ret i8* %0
     27 }
     28 
     29 declare i8* @llvm.frameaddress(i32) nounwind readnone
     30