diff options
author | Christudasan Devadasan <Christudasan.Devadasan@amd.com> | 2022-09-30 08:47:06 +0530 |
---|---|---|
committer | Christudasan Devadasan <Christudasan.Devadasan@amd.com> | 2022-12-17 11:52:36 +0530 |
commit | 29247824f57e5d075dbdc320cf65e7f27fd86401 (patch) | |
tree | f3a350b130310e3ed1feef7fa604f59051bda040 /clang/lib/Lex/ModuleMap.cpp | |
parent | 7a72a93580147c239ae9eb8a8b2c0e3cd38d5322 (diff) | |
download | llvm-29247824f57e5d075dbdc320cf65e7f27fd86401.zip llvm-29247824f57e5d075dbdc320cf65e7f27fd86401.tar.gz llvm-29247824f57e5d075dbdc320cf65e7f27fd86401.tar.bz2 |
[AMDGPU][SIFrameLowering] Use the right frame register in CSR spills
Unlike the callee-saved VGPR spill instructions emitted by
`PEI::spillCalleeSavedRegs`, the CS VGPR spills inserted during
emitPrologue/emitEpilogue require the exec bits flipping to avoid
clobbering the inactive lanes of VGPRs used for SGPR spilling.
Currently, these spill instructions are referenced from the SP at
function entry and when the callee performs a stack realignment,
they ended up getting incorrect stack offsets. Even if we try to
adjust the offsets, the FP-SP becomes a runtime entity with dynamic
stack realignment and the offsets would still be inaccurate.
To fix it, use FP as the frame base in the spill instructions
whenever the function has FP. The offsets obtained for the CS
objects would always be the right values from FP.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D134949
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions