This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][MachineCombine] Fold FNMUL+FSUB -> FNMADD
ClosedPublic

Authored by mcrosier on May 11 2017, 7:11 AM.

Details

Summary

This patch extends support in the machine combiner for forming more FNMADD instructions.

I saw a minor, but measurable above noise, improvement in spec2000/eon on Kryo.

PTAL,
Chad

Diff Detail

Event Timeline

mcrosier created this revision.May 11 2017, 7:11 AM
gberry added inline comments.May 11 2017, 8:45 AM
lib/Target/AArch64/AArch64InstrInfo.cpp
3170

Can you just rename canCombineWithFMUL instead of having two identical copies?

test/CodeGen/AArch64/arm64-fml-combines.ll
1–3

It might be a good idea to add a second run line with -fp-contract=fast instead of -enable-unsafe-fp-math and get rid of the 'contract' bits on the instructions in the new test.

mcrosier updated this revision to Diff 98641.May 11 2017, 9:19 AM
mcrosier marked 2 inline comments as done.

-Address Geoff's comments.

mcrosier updated this revision to Diff 98645.May 11 2017, 9:23 AM

-Drop contract bits from tests, per Geoff's comments.

mcrosier accepted this revision.May 11 2017, 12:44 PM

Approved, per Gerolf.

This revision is now accepted and ready to land.May 11 2017, 12:44 PM
mcrosier closed this revision.May 11 2017, 1:29 PM

r302822.