Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-DARWIN
      2 ; RUN: llc -mtriple=arm64-linux-gnu -o - %s | FileCheck %s
      3 
      4 ; x18 is reserved as a platform register on Darwin but not on other
      5 ; systems. Create loads of register pressure and make sure this is respected.
      6 
      7 ; Also, fp must always refer to a valid frame record, even if it's not the one
      8 ; of the current function, so it shouldn't be used either.
      9 
     10 @var = global [30 x i64] zeroinitializer
     11 
     12 define void @keep_live() {
     13   %val = load volatile [30 x i64]* @var
     14   store volatile [30 x i64] %val, [30 x i64]* @var
     15 
     16 ; CHECK: ldr x18
     17 ; CHECK: str x18
     18 
     19 ; CHECK-DARWIN-NOT: ldr fp
     20 ; CHECK-DARWIN-NOT: ldr x18
     21 ; CHECK-DARWIN: Spill
     22 ; CHECK-DARWIN-NOT: ldr fp
     23 ; CHECK-DARWIN-NOT: ldr x18
     24 ; CHECK-DARWIN: ret
     25   ret void
     26 }
     27