[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)
commitb32f11fc62ef12de1762adf588de6ee6bd4b2bb0
tree6b86fb22b492753a5a4735482ae05a367c41f92e
parent6fb3f19959b39cb2f5cff276db55698464c59fa4
[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

llvm-svn: 267098
12 files changed:
llvm/include/llvm/CodeGen/MachineCombinerPattern.h
llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h
llvm/include/llvm/Target/TargetInstrInfo.h
llvm/lib/CodeGen/MachineCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/TargetInstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.h
llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h
llvm/test/CodeGen/AArch64/arm64-fma-combines.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/arm64-fml-combines.ll [new file with mode: 0644]