[PATCH] D95946: [AMDGPU] Save all lanes for reserved VGPRs
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 05:30:59 PST 2021
sebastian-ne created this revision.
sebastian-ne added reviewers: arsenm, kerbowa.
Herald added subscribers: hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, qcolombet.
sebastian-ne requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
When SGPRs are spilled to VGPRs, they can overwrite any lane. We need
to preserve the value of inactive lanes in function calls, so we save
the register even if it is marked as caller saved.
Also, teach buildPrologSpill to work when no registers are free like in
CodeGen/AMDGPU/pei-scavenge-vgpr-spill.mir and update the comment on
findScratchNonCalleeSaveRegister as it is not used anymore to realign
the stack pointer since D95865 <https://reviews.llvm.org/D95865>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95946
Files:
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
llvm/test/CodeGen/AMDGPU/callee-frame-setup.ll
llvm/test/CodeGen/AMDGPU/fold-reload-into-exec.mir
llvm/test/CodeGen/AMDGPU/fold-reload-into-m0.mir
llvm/test/CodeGen/AMDGPU/gfx-callable-preserved-registers.ll
llvm/test/CodeGen/AMDGPU/need-fp-from-csr-vgpr-spill.ll
llvm/test/CodeGen/AMDGPU/pei-scavenge-vgpr-spill.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95946.321070.patch
Type: text/x-patch
Size: 32263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210203/976b57b4/attachment-0001.bin>
More information about the llvm-commits
mailing list