OSDN Git Service

[MachineCombiner] Support for floating-point FMA on ARM64
authorGerolf Hoflehner <ghoflehner@apple.com>
Fri, 22 Apr 2016 02:15:19 +0000 (02:15 +0000)
committerGerolf Hoflehner <ghoflehner@apple.com>
Fri, 22 Apr 2016 02:15:19 +0000 (02:15 +0000)
commit7c23aa2d8ca7a93b301ba9fee0f3db287ff59d9e
tree54eb2dab4734b72e284d5d9e6ea3c0ba40c0f59d
parentacfba51b273bd0299a6264db85e34229e352fb13
[MachineCombiner] Support for floating-point FMA on ARM64

Evaluates fmul+fadd -> fmadd combines and similar code sequences in the
machine combiner. It adds support for float and double similar to the existing
integer implementation. The key features are:

- DAGCombiner checks whether it should combine greedily or let the machine
combiner do the evaluation. This is only supported on ARM64.
- It gives preference to throughput over latency: the heuristic used is
to combine always in loops. The targets decides whether the machine
combiner should optimize for throughput or latency.
- Supports for fmadd, f(n)msub, fmla, fmls patterns
- On by default at O3 ffast-math

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267098 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/CodeGen/MachineCombinerPattern.h
include/llvm/CodeGen/SelectionDAGTargetInfo.h
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/MachineCombiner.cpp
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/TargetInstrInfo.cpp
lib/Target/AArch64/AArch64InstrInfo.cpp
lib/Target/AArch64/AArch64InstrInfo.h
lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
lib/Target/AArch64/AArch64SelectionDAGInfo.h
test/CodeGen/AArch64/arm64-fma-combines.ll [new file with mode: 0644]
test/CodeGen/AArch64/arm64-fml-combines.ll [new file with mode: 0644]