This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add patterns to replace fsub fmul with fma fneg.
ClosedPublic

Authored by fhahn on Nov 21 2017, 7:51 AM.

Details

Summary

This patch adds MachineCombiner patterns for transforming
(fsub (fmul x y) z) into (fma x y (fneg z)). This has a lower
latency on micro architectures where fneg is cheap.

Patch based on work by George Steed.

Diff Detail

Event Timeline

fhahn created this revision.Nov 21 2017, 7:51 AM
evandro edited edge metadata.Nov 21 2017, 9:40 AM

LGTM

include/llvm/CodeGen/MachineCombinerPattern.h
73

Please, sort the 2 lines above alphabetically.

fhahn updated this revision to Diff 124373.Nov 27 2017, 6:52 AM
fhahn marked an inline comment as done.

Addressed Evandro's comment.

evandro accepted this revision.Nov 27 2017, 8:28 AM
This revision is now accepted and ready to land.Nov 27 2017, 8:28 AM
fhahn closed this revision.Dec 6 2017, 2:49 PM
Allen added a subscriber: Allen.Jun 5 2022, 8:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2022, 8:27 PM