Skip to content

Commit

Permalink
[VPlan] Remove redundant setting of insert point in ::executePlan (NFC).
Browse files Browse the repository at this point in the history
The entry block is a VPIRBasicBkock wrapping the original loop's
preheader, so the insert point doesn't need to be set.
  • Loading branch information
fhahn committed Jan 1, 2025
1 parent bd154e8 commit 418dedc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7709,11 +7709,9 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(

// 0. Generate SCEV-dependent code in the entry, including TripCount, before
// making any changes to the CFG.
if (!BestVPlan.getEntry()->empty()) {
State.CFG.PrevBB = OrigLoop->getLoopPreheader();
State.Builder.SetInsertPoint(OrigLoop->getLoopPreheader()->getTerminator());
if (!BestVPlan.getEntry()->empty())
BestVPlan.getEntry()->execute(&State);
}

if (!ILV.getTripCount())
ILV.setTripCount(State.get(BestVPlan.getTripCount(), VPLane(0)));
else
Expand Down

0 comments on commit 418dedc

Please sign in to comment.