[llvm] Draft: [DAGCombiner] Remove all `UnsafeFPMath` references (PR #146295)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 00:17:54 PDT 2025


================
@@ -18861,7 +18856,7 @@ SDValue DAGCombiner::visitFP_ROUND(SDNode *N) {
     // single-step fp_round we want to fold to.
     // In other words, double rounding isn't the same as rounding.
     // Also, this is a value preserving truncation iff both fp_round's are.
-    if (DAG.getTarget().Options.UnsafeFPMath || N0IsTrunc)
+    if (N->getFlags().hasAllowContract() || N0IsTrunc)
----------------
paperchalice wrote:

Is `contract` the proper flag here?

https://github.com/llvm/llvm-project/pull/146295


More information about the llvm-commits mailing list