[llvm] [DAG] Fold nested add(add(reduce(a), b), add(reduce(c), d)) (PR #115150)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 01:14:57 PDT 2025
================
@@ -17429,12 +17463,15 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
DAG.getConstantFP(4.0, DL, VT));
}
}
+ } // enable-unsafe-fp-math && AllowNewConst
+ if (((Options.UnsafeFPMath && Options.NoSignedZerosFPMath) ||
+ (Flags.hasAllowReassociation() && Flags.hasNoSignedZeros()))) {
----------------
david-arm wrote:
OK that's interesting. Perhaps there is an opportunity to simply remove `AllowNewConst` in a future patch to simplify the code?
https://github.com/llvm/llvm-project/pull/115150
More information about the llvm-commits
mailing list