[llvm-branch-commits] [llvm] [LoopVectorizer] Bundle partial reductions with different extensions (PR #136997)
Gaƫtan Bossu via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 13 01:35:38 PDT 2025
================
@@ -2526,13 +2523,14 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
R->getCondOp(), R->isOrdered(),
WrapFlagsTy(Mul->hasNoUnsignedWrap(), Mul->hasNoSignedWrap()),
R->getDebugLoc()),
- ExtOp(Ext0->getOpcode()), IsNonNeg(Ext0->isNonNeg()),
ResultTy(ResultTy),
IsPartialReduction(isa<VPPartialReductionRecipe>(R)) {
assert(RecurrenceDescriptor::getOpcode(getRecurrenceKind()) ==
Instruction::Add &&
"The reduction instruction in MulAccumulateteReductionRecipe must "
"be Add");
+ VecOpInfo[0] = {Ext0->getOpcode(), Ext0->isNonNeg()};
+ VecOpInfo[1] = {Ext1->getOpcode(), Ext1->isNonNeg()};
----------------
gbossu wrote:
Curious: From the description of the `VPMulAccumulateReductionRecipe` class, it seems that the extending operations are optional. Yet, this code seems to assume `Ext0` and `Ext1` aren't null. Does that mean that these widen recipes are always valid, but sometimes they represent an "identity" transformation?
https://github.com/llvm/llvm-project/pull/136997
More information about the llvm-branch-commits
mailing list