This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Enable OMod on more VOP3 instructions
ClosedPublic

Authored by Joe_Nash on Dec 6 2022, 2:45 PM.

Details

Summary

OMod was disabled if OpSel was enabled, but that restriction is more
specific than necessary. Any VOP3 with float operands can use OMod.

On GFX11, FMAC_F16_e64 can use op_sel.
Previously, SIFoldOperands and convertToThreeAddress were accidentally correct when
they reinterpreted the zero OMod operand on V_FMAC_F16_e64 as the OpSel operand on
V_FMA_F16_gfx9_e64. Now we explicitly add op_sel if required.

Diff Detail

Event Timeline

Joe_Nash created this revision.Dec 6 2022, 2:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 2:45 PM
Joe_Nash requested review of this revision.Dec 6 2022, 2:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 2:45 PM
arsenm accepted this revision.Dec 6 2022, 2:47 PM
This revision is now accepted and ready to land.Dec 6 2022, 2:47 PM
foad added inline comments.Dec 6 2022, 11:13 PM
llvm/test/CodeGen/AMDGPU/omod.ll
4

Can you precommit this part?

Joe_Nash marked an inline comment as done.Dec 7 2022, 8:46 AM
Joe_Nash added inline comments.
llvm/test/CodeGen/AMDGPU/omod.ll
4
Joe_Nash updated this revision to Diff 480932.Dec 7 2022, 8:46 AM
Joe_Nash marked an inline comment as done.

precommit gfx11 runline and rebase

arsenm accepted this revision.Dec 7 2022, 9:17 AM
This revision was landed with ongoing or failed builds.Dec 7 2022, 10:30 AM
This revision was automatically updated to reflect the committed changes.