[PATCH] D80542: [DAGCombiner] Require ninf for division estimation

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 15:19:37 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13101
     // Fold into a reciprocal estimate and multiply instead of a real divide.
-    if (SDValue RV = BuildDivEstimate(N0, N1, Flags))
-      return RV;
+    if (Options.NoInfsFPMath || Flags.hasNoInfs())
+      if (SDValue RV = BuildDivEstimate(N0, N1, Flags))
----------------
spatel wrote:
> Do we need to check the target option here? If all tests are updated to use node-level fast-math-flags, then I would prefer not to include legacy/deprecated predicate.
Probably should keep checking the attribute for consistency. Plus the attributes have the nice feature that you can apply them to bitcode functions when linking, but we don't have propagate FMF


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80542/new/

https://reviews.llvm.org/D80542





More information about the llvm-commits mailing list