[llvm] [DAG] Fold nested add(add(reduce(a), b), add(reduce(c), d)) (PR #115150)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 05:07:12 PST 2024
================
@@ -17107,12 +17129,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()))) {
----------------
davemgreen wrote:
Do you mean do it in another later patch? It felt like a relatively small change, and will only allow the transform a little later after legalization. It can be difficult to test that kind of thing in SDAG.
https://github.com/llvm/llvm-project/pull/115150
More information about the llvm-commits
mailing list