This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Handle v_fmac_legacy_f32 in SIFoldOperands
ClosedPublic

Authored by foad on Jan 4 2021, 3:04 AM.

Details

Summary

Convert it to v_fma_legacy_f32 if it is profitable to do so, just like
other mac instructions that are converted to their mad equivalents.

Diff Detail

Event Timeline

foad created this revision.Jan 4 2021, 3:04 AM
foad requested review of this revision.Jan 4 2021, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2021, 3:04 AM

The point of this patch is to remove some unnecessary movs around the v_fma(c)_legacy_f32 instructions. I can pre-commit the new test case to make this clearer if you're happy with it.

arsenm accepted this revision.Jan 4 2021, 10:41 AM

LGTM but another MIR test wouldn't hurt

This revision is now accepted and ready to land.Jan 4 2021, 10:41 AM
rampitec accepted this revision.Jan 4 2021, 10:53 AM