Since https://reviews.llvm.org/D98319, determineCalleeSavesSGPR() needs
to consider caller save VGPR spills as well while anticipating if we
require FP.
Fixes: SWDEV-295978
Paths
| Differential D106758
[AMDGPU] We would need FP if there is call and caller save VGPR spills ClosedPublic Authored by RamNalamothu on Jul 24 2021, 2:11 PM.
Details Summary Since https://reviews.llvm.org/D98319, determineCalleeSavesSGPR() needs Fixes: SWDEV-295978
Diff Detail
Unit TestsFailed Event TimelineHerald added subscribers: foad, kerbowa, hiraditya and 7 others. · View Herald TranscriptJul 24 2021, 2:11 PM Comment Actions LGTM except the test is using dead code. I also think we ought to be able to remove VGPRReservedForSGPRSpill now that SGPR and VGPR allocation are split
Comment Actions
I think that's out of the scope for this review. Comment Actions
Yes, but would be a good follow up change. This test looks nearly identical to test/CodeGen/AMDGPU/need-fp-from-csr-vgpr-spill.ll. Can the two be merged? I don't actually see why the existing test didn't catch this and isn't changed Comment Actions
Because test/CodeGen/AMDGPU/need-fp-from-csr-vgpr-spill.ll covers the path where we have only CSR VGPR spills and llvm/test/CodeGen/AMDGPU/need-fp-from-caller-save-vgpr-spill.ll covers the other scenario where we might reserve a caller save VGPR for SGPR spill. Will merge both tests/files into test/CodeGen/AMDGPU/need-fp-from-vgpr-spills.ll. Comment Actions Merged test/CodeGen/AMDGPU/need-fp-from-csr-vgpr-spill.ll and llvm/test/CodeGen/AMDGPU/need-fp-from-caller-save-vgpr-spill.ll into test/CodeGen/AMDGPU/need-fp-from-vgpr-spills.ll.
OK, will try that. This revision is now accepted and ready to land.Jul 27 2021, 7:23 PM This revision was landed with ongoing or failed builds.Jul 27 2021, 10:43 PM Closed by commit rG1a8c57179a12: [AMDGPU] We would need FP if there is call and caller save VGPR spills (authored by RamNalamothu). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 361478 llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
llvm/test/CodeGen/AMDGPU/gfx-callable-preserved-registers.ll
llvm/test/CodeGen/AMDGPU/need-fp-from-caller-save-vgpr-spill.ll
|
Checking TRI->spillSGPRToVGPR() should be redundant