[PATCH] D107404: [AMDGPU] Avoid assert for saved FP

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 13 13:28:08 PDT 2021


arsenm added a comment.

In D107404#2923720 <https://reviews.llvm.org/D107404#2923720>, @rampitec wrote:

> In D107404#2923688 <https://reviews.llvm.org/D107404#2923688>, @arsenm wrote:
>
>> We should stop "spilling" to AGPRs entirely. It's not a spill, it's an ordinary copy due to pressure. We just need to start using the combined VGPR+AGPR classes for values @cdevadas was working on this.
>>
>> The same problem exists for SGPRs and we prune the stack objects before this
>
> All of that is not a reason to assert on a valid program. We also cannot prune stack objects where we create FP copy yet, we do not have spills yet. That is that heurtistic in the `determineCalleeSaves` to produce `WillHaveFP` doing that.

This is still just blanket disabling the assert if spill to AGPR happens to be enabled. Can't this be more fine grained?



================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:963
+  // If we allow spilling to AGPRs we may have saved FP but then spill
+  // everythying into AGPRs instead of the stack.
   assert((HasFP || (!FuncInfo->SGPRForFPSaveRestoreCopy &&
----------------
Typo everythying


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107404/new/

https://reviews.llvm.org/D107404



More information about the llvm-commits mailing list