Skip to content

Commit 155bf09

Browse files
committed
Fix the suggestion code
1 parent 0821107 commit 155bf09

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9285,7 +9285,6 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
92859285
continue;
92869286

92879287
const RecurrenceDescriptor &RdxDesc = PhiR->getRecurrenceDescriptor();
9288-
StoreInst *IntermediateStore = RdxDesc.IntermediateStore;
92899288
// Adjust AnyOf reductions; replace the reduction phi for the selected value
92909289
// with a boolean reduction phi node to check if the condition is true in
92919290
// any iteration. The final value is selected by the final
@@ -9387,13 +9386,10 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
93879386
// also modeled in VPlan.
93889387
auto *FinalReductionResult = new VPInstruction(
93899388
VPInstruction::ComputeReductionResult, {PhiR, NewExitingVPV}, ExitDL);
9390-
FinalReductionResult->insertBefore(*MiddleVPBB, IP);
9391-
auto *FinalReductionResult = new VPInstruction(
9392-
VPInstruction::ComputeReductionResult, {PhiR, NewExitingVPV}, ExitDL);
93939389
// Update all users outside the vector region.
93949390
OrigExitingVPV->replaceUsesWithIf(
93959391
FinalReductionResult, [](VPUser &User, unsigned) {
9396-
auto *Parent = cast<VPRecipeBase>(&User)->getParent();
9392+
auto *Parent = cast<VPRecipeBase>(&User)->getParent();
93979393
return Parent && !Parent->getParent();
93989394
});
93999395
FinalReductionResult->insertBefore(*MiddleVPBB, IP);

0 commit comments

Comments
 (0)