Skip to content

Commit 1b72f0b

Browse files
committed
Address review comment
1 parent 205e6f2 commit 1b72f0b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8803,9 +8803,8 @@ VPRecipeBuilder::tryToCreateWidenRecipe(Instruction *Instr,
88038803
Phi->getIncomingValueForBlock(OrigLoop->getLoopPreheader()));
88048804

88058805
// If the PHI is used by a partial reduction, set the scale factor.
8806-
std::optional<unsigned> Scale =
8807-
getScalingForReduction(RdxDesc.getLoopExitInstr());
8808-
unsigned ScaleFactor = Scale.value_or(1);
8806+
unsigned ScaleFactor =
8807+
getScalingForReduction(RdxDesc.getLoopExitInstr()).value_or(1);
88098808
PhiRecipe = new VPReductionPHIRecipe(
88108809
Phi, RdxDesc, *StartV, CM.isInLoopReduction(Phi),
88118810
CM.useOrderedReductions(RdxDesc), ScaleFactor);

0 commit comments

Comments
 (0)