]> granicus.if.org Git - llvm/commit
[AArch64] Add patterns to replace fsub fmul with fma fneg.
authorFlorian Hahn <florian.hahn@arm.com>
Wed, 6 Dec 2017 22:48:36 +0000 (22:48 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Wed, 6 Dec 2017 22:48:36 +0000 (22:48 +0000)
commitf42965e37eedda03623bf9df15b5f2894c173f1f
tree3c38e3ce11c2daa0da56704ab5a400cd07fd705c
parentd62c5bdaf9003c3a927cc561562dcaf9f3872fcd
[AArch64] Add patterns to replace fsub fmul with fma fneg.

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.

Reviewers: rengolin, joelkevinjones, joel_k_jones, evandro, efriedma

Reviewed By: evandro

Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls

Differential Revision: https://reviews.llvm.org/D40306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319980 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineCombinerPattern.h
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/AArch64/aarch64-combine-fmul-fsub.mir [new file with mode: 0644]