[PATCH] D28675: [DAGCombine] require UnsafeFPMath for re-association of addition
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 11:19:28 PST 2017
arsenm added a comment.
Can you add a few new tests which do the combine just from the FMF flags?
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8128
// fold (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y (fma u, v, z))
+ // FIXME The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF
+ // are currently only supported on binary nodes.
----------------
: after FIXME (same for the other places)
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8134
+ (Options.UnsafeFPMath || (N->getFlags()->hasUnsafeAlgebra() &&
+ N0.getNode()->getFlags()->hasUnsafeAlgebra()))) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
----------------
I don't think you need the getNode here (and same for the rest
https://reviews.llvm.org/D28675
More information about the llvm-commits
mailing list