Skip to content

Commit 4d525f2

Browse files
committed
[VPlan] Remove unneeded InsertPointGuard (NFCI).
getBlockInMask now simply returns an already computed mask, hence there's no need to adjust the builder insert point.
1 parent 139bcda commit 4d525f2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9003,11 +9003,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
90039003

90049004
BasicBlock *BB = CurrentLinkI->getParent();
90059005
VPValue *CondOp = nullptr;
9006-
if (CM.blockNeedsPredicationForAnyReason(BB)) {
9007-
VPBuilder::InsertPointGuard Guard(Builder);
9008-
Builder.setInsertPoint(CurrentLink);
9006+
if (CM.blockNeedsPredicationForAnyReason(BB))
90099007
CondOp = RecipeBuilder.getBlockInMask(BB);
9010-
}
90119008

90129009
VPReductionRecipe *RedRecipe = new VPReductionRecipe(
90139010
RdxDesc, CurrentLinkI, PreviousLink, VecOp, CondOp);

0 commit comments

Comments
 (0)