[llvm] [VPlan] Implement VPExtendedReduction, VPMulAccumulateReductionRecipe and corresponding vplan transformations. (PR #137746)
Elvis Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 00:25:27 PDT 2025
================
@@ -2483,15 +2489,11 @@ InstructionCost VPReductionRecipe::computeCost(ElementCount VF,
unsigned Opcode = RecurrenceDescriptor::getOpcode(RdxKind);
FastMathFlags FMFs = getFastMathFlags();
- // TODO: Support any-of and in-loop reductions.
+ // TODO: Support any-of reductions.
assert(
(!RecurrenceDescriptor::isAnyOfRecurrenceKind(RdxKind) ||
ForceTargetInstructionCost.getNumOccurrences() > 0) &&
"Any-of reduction not implemented in VPlan-based cost model currently.");
- assert(
- (!cast<VPReductionPHIRecipe>(getOperand(0))->isInLoop() ||
- ForceTargetInstructionCost.getNumOccurrences() > 0) &&
- "In-loop reduction not implemented in VPlan-based cost model currently.");
----------------
ElvisWang123 wrote:
Yes, need to remove this because need to calculate the pure reduction cost (no extend/mul...) in transformations.
https://github.com/llvm/llvm-project/pull/137746
More information about the llvm-commits
mailing list