gfx908 ignores an mfma if SrcC is a literal.
Details
Diff Detail
Event Timeline
Generally if the operand/register class changes there should be a separate opcode. It avoids needing all this special case checking, and makes folding code work naturally
Anyway, you cannot have two opcodes with the same opcode without introducing a new encoding and a new decoder namespace. This bug will be fixed.
The encoding is the same, and a new decoder namespace shouldn't be an issue
lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
2873–2876 ↗ | (On Diff #216911) | I would expect this to be in RI.opCanUseInlineConstant |
I still think the change will be too massive. Note, that encoding is still valid and legal.
lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
2873–2876 ↗ | (On Diff #216911) | It does not have a subtarget. |
Can these be encoded as a constant literal instead? We would then just need to workaround the encoding rather than disallowing the operand
Moved check into opCanUseInlineConstant().
Captured subtarget in SIRegisterInfo to do this.