diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-20 21:03:45 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-20 21:03:45 +0000 |
| commit | db78273b6ea5cdce18c768fce5a1bdf55d61d91d (patch) | |
| tree | d4669ed5cfc8ff241e204644a9380ab6c68ccdab /llvm/test/CodeGen/MIR/AMDGPU | |
| parent | eac8e7c08abbe4c8adefcceb429bd073ef172622 (diff) | |
| download | bcm5719-llvm-db78273b6ea5cdce18c768fce5a1bdf55d61d91d.tar.gz bcm5719-llvm-db78273b6ea5cdce18c768fce5a1bdf55d61d91d.zip | |
Add an ID field to StackObjects
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.
llvm-svn: 308673
Diffstat (limited to 'llvm/test/CodeGen/MIR/AMDGPU')
| -rw-r--r-- | llvm/test/CodeGen/MIR/AMDGPU/stack-id.mir | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MIR/AMDGPU/stack-id.mir b/llvm/test/CodeGen/MIR/AMDGPU/stack-id.mir new file mode 100644 index 00000000000..c07c0790a1e --- /dev/null +++ b/llvm/test/CodeGen/MIR/AMDGPU/stack-id.mir @@ -0,0 +1,35 @@ +# RUN: llc -march=amdgcn -run-pass none -o - %s | FileCheck %s +... +--- + +# CHECK-LABEL: name: spill_slot_stack_id +# CHECK: {{^}}fixedStack: +# CHECK: - { id: 0, type: spill-slot, offset: 0, size: 4, alignment: 4, stack-id: 0, +# CHECK: - { id: 1, type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: 0, +# CHECK: - { id: 2, type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: 9, + +# CHECK: {{^}}stack: +# CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 16, +# CHECK-NEXT: stack-id: 3, + +# CHECK: - { id: 1, name: '', type: spill-slot, offset: 0, size: 8, +# CHECK-NEXT: stack-id: 0, + +# CHECK: - { id: 2, name: '', type: spill-slot, offset: 0, size: 4, +# CHECK-NEXT: stack-id: 0, + + +name: spill_slot_stack_id +fixedStack: + - { id: 0, type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: 9 } + - { id: 1, type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: 0 } + - { id: 2, type: spill-slot, offset: 0, size: 4, alignment: 4 } +stack: + - { id: 0, name: '', type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: 3 } + - { id: 1, name: '', type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: 0 } + - { id: 2, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4 } + +body: | + bb.0: + S_ENDPGM +... |

