[PATCH] D81900: Add coverage for inexact constant folding for multiplication in Selection DAG

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 18:46:59 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5139-5140
+          RHS.multiply(LHS, APFloat::rmNearestTiesToEven);
+      if (((status & APFloat::opInexact) == 0) ||
+          getTarget().Options.UnsafeFPMath) {
+        return getConstantFP(RHS, DL, VT);
----------------
I'm not sure I understand why this would depend on unsafe math. Why does it matter if it was inexact? The unconstrained operations have the defined rounding mode


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

https://reviews.llvm.org/D81900





More information about the llvm-commits mailing list