[llvm] Add `llvm.vector.partial.reduce.fadd` intrinsic (PR #159776)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 19 09:49:48 PDT 2025
================
@@ -13070,22 +13076,26 @@ SDValue DAGCombiner::foldPartialReduceAdd(SDNode *N) {
APInt ConstantOne;
if (!ISD::isConstantSplatVector(Op2.getNode(), ConstantOne) ||
- !ConstantOne.isOne())
+ !(ConstantOne.isOne() ||
+ ConstantOne ==
----------------
sdesmalen-arm wrote:
nit: the casting here looks a bit odd, and I'm not sure this always works. Can you instead separate out the cases for int and FP and use `llvm::isConstOrConstSplatFP` for the latter (you can check the result using `isExactlyValue(1)`).
https://github.com/llvm/llvm-project/pull/159776
More information about the llvm-commits
mailing list