[PATCH] D40306: [AArch64] Add patterns to replace fsub fmul with fma fneg.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 07:51:22 PST 2017


fhahn created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

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.


https://reviews.llvm.org/D40306

Files:
  include/llvm/CodeGen/MachineCombinerPattern.h
  lib/Target/AArch64/AArch64InstrInfo.cpp
  test/CodeGen/AArch64/aarch64-combine-fmul-fsub.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40306.123803.patch
Type: text/x-patch
Size: 10298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171121/2a66bd0d/attachment-0001.bin>


More information about the llvm-commits mailing list