1 # RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass=prologepilog %s -o - | FileCheck %s
3 # Ensure references to scavenged stack slots in the CSR area use the
4 # FP as a base when the stack pointer must be aligned to something
5 # larger than required by the target. This is necessary because the
6 # alignment padding area is between the CSR area and the SP, so the SP
7 # cannot be used to reference the CSR area.
9 tracksRegLiveness: true
13 # CHECK: id: 0, name: '', type: default, offset: -64, size: 4, alignment: 64
14 # CHECK-NEXT: stack-id: default
15 # CHECK-NEXT: local-offset: -64
16 # CHECK: id: 1, name: '', type: default, offset: -4, size: 4, alignment: 4
17 # CHECK-NEXT: stack-id: default
18 # CHECK-NEXT: local-offset: -68
20 - { id: 0, size: 4, alignment: 64, local-offset: -64 }
21 - { id: 1, size: 4, alignment: 4, local-offset: -68 }
24 # CHECK: $sp = ANDXri killed ${{x[0-9]+}}, 7865
25 # CHECK: STRSui $s0, $sp, 0
26 # CHECK: STRSui $s0, $fp, 7
31 STRSui $s0, %stack.0, 0
32 STRSui $s0, %stack.1, 0
33 ; Force preserve a CSR to create a hole in the CSR stack region.