Note that all subtargets up to GFX10.1 have v_mad_legacy_f32, but GFX8/9
lack v_mac_legacy_f32. GFX10.3 has no mad/mac f32 instructions at all.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
887–888 | But these do have modifiers? |
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
887–888 | Sure, but that's covered by the TODO at line 869. I could repeat the comment here. I assume there was some reason it wasn't totally straightforward (maybe something to do with the tied operands?) else it would've been done already. |
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
887–888 | I think it is straightforward, and just n/nobody bothered to do it |
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
887–888 | Having looked into this some more, I think there is no point selecting v_mac with modifiers, because that would force VOP3 encoding, at which point there is no downside to using v_mad instead:
If this sounds reasonable I'll update the comments but leave the implementation as-is. |
Fix a couple more problems shown up by running the MC tests:
- Update asm/dis special cases for V_MAC_LEGACY_F32 now that it uses the VOP_MAC_F32 profile.
- Fix use of OtherPredicates in VOP2 pseudos.
I'll rebase this after D89000 lands, since it touches some of the same code in VOP2Instructions.td and gfx1030_err.s.
But these do have modifiers?