[PATCH] D28675: [DAGCombine] require UnsafeFPMath for re-association of addition

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 16:32:43 PST 2017


hfinkel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8134
+        (Options.UnsafeFPMath || (N->getFlags()->hasUnsafeAlgebra() &&
+         N0.getNode()->getFlags()->hasUnsafeAlgebra()))) {
       return DAG.getNode(PreferredFusedOpcode, SL, VT,
----------------
arsenm wrote:
> I don't think you need the getNode here (and same for the rest
Why are you checking N0->getFlags()->hasUnsafeAlgebra() if N0 is a FMA and the comment says they don't support FMFs?



https://reviews.llvm.org/D28675





More information about the llvm-commits mailing list