Details
- Reviewers
arsenm - Group Reviewers
Restricted Project - Commits
- rG62e4f81c6793: [AMDGPU] Simplify widenScalar condition for BigTy for G_(UN)MERGE_VALUES
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is NFC. The condition was "not a power of two and not a multiple of 16". But this was already clamped to at least S32 on line 1616, so the condition simplifies to "not a multiple of 16".
However, I am sceptical that this condition is what was intended, since it doesn't seem to match the widening rule of "Pick the next power of 2, or a multiple of 64 over 128".
AMDGPUInstructionSelector::selectG_UNMERGE_VALUES seems to assume that the source type has a corresponding register class. We certainly don't have register classes for every multiple of 32 up to MaxScalar (currently 1024). How should this work? Should the legalization be guided by exactly which register classes exist?
The point of the legalizer is to match the register classes, which would imply rounding up in the non-existent cases. I was thinking we would eventually just have every multiple of 32 register classes