]> granicus.if.org Git - llvm/commit
[DAGCombiner] Initial support for the fast-math flag contract
authorAdam Nemet <anemet@apple.com>
Thu, 30 Mar 2017 18:53:04 +0000 (18:53 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 30 Mar 2017 18:53:04 +0000 (18:53 +0000)
commit1042cb40de32bc7e662a31b3eed667cd543bd547
tree6feae0725da2c2c259489e28851e9a5e2048ddcb
parent04dea7e0881ae280e77decce78081b08748009d8
[DAGCombiner] Initial support for the fast-math flag contract

Now alternatively to the TargetOption.AllowFPOpFusion global flag, FMUL->FADD
can also use the per operation FMF to allow fusion.

The idea here is not to port everything to the new scheme (e.g. fused
multiply-and-sub will be ported later) but that this work all the way from
clang.

The transformation is conditionalized on *both* the FADD and the FMUL having
the FMF contract flag.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299096 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AArch64/neon-fma-FMF.ll [new file with mode: 0644]
test/CodeGen/PowerPC/fma-aggr-FMF.ll [new file with mode: 0644]