Skip to content

Commit 418dedc

Browse files
committed
[VPlan] Remove redundant setting of insert point in ::executePlan (NFC).
The entry block is a VPIRBasicBkock wrapping the original loop's preheader, so the insert point doesn't need to be set.
1 parent bd154e8 commit 418dedc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7709,11 +7709,9 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
77097709

77107710
// 0. Generate SCEV-dependent code in the entry, including TripCount, before
77117711
// making any changes to the CFG.
7712-
if (!BestVPlan.getEntry()->empty()) {
7713-
State.CFG.PrevBB = OrigLoop->getLoopPreheader();
7714-
State.Builder.SetInsertPoint(OrigLoop->getLoopPreheader()->getTerminator());
7712+
if (!BestVPlan.getEntry()->empty())
77157713
BestVPlan.getEntry()->execute(&State);
7716-
}
7714+
77177715
if (!ILV.getTripCount())
77187716
ILV.setTripCount(State.get(BestVPlan.getTripCount(), VPLane(0)));
77197717
else

0 commit comments

Comments
 (0)