Skip to content

Commit 6651bbb

Browse files
committed
Add comment above tryTocreateAbstractPartialReductionRecipe
1 parent 89372f1 commit 6651bbb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,8 @@ class VPPartialReductionRecipe : public VPReductionRecipe {
23452345
FastMathFlags(), ReductionInst,
23462346
ArrayRef<VPValue *>({Op0, Op1}), Cond, false, {}),
23472347
Opcode(Opcode) {
2348-
[[maybe_unused]] auto *AccumulatorRecipe = getChainOp()->getDefiningRecipe();
2348+
[[maybe_unused]] auto *AccumulatorRecipe =
2349+
getChainOp()->getDefiningRecipe();
23492350
assert((isa<VPReductionPHIRecipe>(AccumulatorRecipe) ||
23502351
isa<VPPartialReductionRecipe>(AccumulatorRecipe)) &&
23512352
"Unexpected operand order for partial reduction recipe");

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,6 +2437,8 @@ static void tryToCreateAbstractReductionRecipe(VPReductionRecipe *Red,
24372437
Red->replaceAllUsesWith(AbstractR);
24382438
}
24392439

2440+
/// This function tries to create an abstract recipe from a partial reduction to
2441+
/// hide its mul and extends from cost estimation.
24402442
static void
24412443
tryToCreateAbstractPartialReductionRecipe(VPPartialReductionRecipe *PRed) {
24422444
if (PRed->getOpcode() != Instruction::Add)

0 commit comments

Comments
 (0)