With spilling into AGPRs enabled we cannot reliably predict
if we need to save FP or not. We may finally spill everything
into AGPRs and never touch stack. In this case we still may
save FP. This is deficiency but not an error, so avoid the
assert.
Details
- Reviewers
arsenm - Commits
- rG11b7ee974a69: [AMDGPU] Avoid assert for saved FP
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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.
Note, if spilling is replaced with the copying then the option itself will be removed and the assert updated as a result. In the meanwhile we should not assert.
This is still just blanket disabling the assert if spill to AGPR happens to be enabled. Can't this be more fine grained?
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | ||
---|---|---|
963 | Typo everythying |
It is too early here to say if that will happen or not. The code itself tries to predict if there will be FP.
I don't like just disabling the assert but @cdevadas is working on fixing this special case already
Typo everythying