mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-24 04:32:09 +00:00

On AMDGPU SGPR spills are really spilled to another register. The spiller creates the spills to new frame index objects, which is used as a placeholder. This will eventually be replaced with a reference to a position in a VGPR to write to and the frame index deleted. It is most likely not a real stack location that can be shared with another stack object. This is a problem when StackSlotColoring decides it should combine a frame index used for a normal VGPR spill with a real stack location and a frame index used for an SGPR. Add an ID field so that StackSlotColoring has a way of knowing the different frame index types are incompatible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308673 91177308-0d34-0410-b5e6-96231b3b80d8
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s
|
|
|
|
--- |
|
|
@var = global i64 0
|
|
@local_addr = global i64* null
|
|
|
|
define void @stack_local() {
|
|
entry:
|
|
%local_var = alloca i64
|
|
%val = load i64, i64* @var
|
|
store i64 %val, i64* %local_var
|
|
store i64* %local_var, i64** @local_addr
|
|
ret void
|
|
}
|
|
...
|
|
---
|
|
name: stack_local
|
|
tracksRegLiveness: true
|
|
registers:
|
|
- { id: 0, class: gpr64common }
|
|
- { id: 1, class: gpr64 }
|
|
- { id: 2, class: gpr64common }
|
|
- { id: 3, class: gpr64common }
|
|
frameInfo:
|
|
maxAlignment: 8
|
|
# CHECK-LABEL: stack_local
|
|
# CHECK: stack:
|
|
# CHECK: - { id: 0, name: local_var, type: default, offset: 0, size: 8, alignment: 8,
|
|
# CHECK-NEXT: stack-id: 0, callee-saved-register: '', local-offset: -8, di-variable: '',
|
|
# CHECK-NEXT: di-expression: '', di-location: '' }
|
|
stack:
|
|
- { id: 0,name: local_var,offset: 0,size: 8,alignment: 8, local-offset: -8 }
|
|
body: |
|
|
bb.0.entry:
|
|
%0 = ADRP @var
|
|
%1 = LDRXui killed %0, @var :: (load 8 from @var)
|
|
STRXui killed %1, %stack.0.local_var, 0 :: (store 8 into %ir.local_var)
|
|
%2 = ADRP @local_addr
|
|
%3 = ADDXri %stack.0.local_var, 0, 0
|
|
STRXui killed %3, killed %2, @local_addr :: (store 8 into @local_addr)
|
|
RET_ReallyLR
|
|
...
|