You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add cross-class spill tests and guard unimplemented spill directions
Tests added:
- no-spill-needed: verify no spill ops when VGPRs fit within limit
- no-tied: verify tied values are never eviction candidates
- exhausted: verify proper error when both VGPR and AGPR are full
- multi-reg: verify size > 1 values are not eviction candidates
- multiple: verify multiple values can be spilled to different AGPRs
- sgpr-unsupported: verify SGPR overflow gives a clean error
Also:
- Disable SGPR and AGPR cross-class eviction paths in allocate()
(pass nullptr as altPool) since the spill insertion only handles
VGPR -> AGPR. Previously these paths would silently corrupt the
allocation by evicting without inserting spill/reload ops.
- Add explicit validation in insertSpillReloads() that rejects
non-VGPR->AGPR spill records with a diagnostic.
- Simplify spill/reload insertion to not branch on direction
(only VGPR->AGPR is supported).
Known limitation: if two spilled values feed the same instruction,
both reload into the single scratch v14, corrupting the first reload.
This does not occur in practice (spilled values are rare and unlikely
to be consumed by the same op).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
0 commit comments