[llvm] 418dedc - [VPlan] Remove redundant setting of insert point in ::executePlan (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 13:46:12 PST 2025


Author: Florian Hahn
Date: 2025-01-01T21:44:22Z
New Revision: 418dedc2341e807fe7501ad95526b0d7c2f167c4

URL: https://github.com/llvm/llvm-project/commit/418dedc2341e807fe7501ad95526b0d7c2f167c4
DIFF: https://github.com/llvm/llvm-project/commit/418dedc2341e807fe7501ad95526b0d7c2f167c4.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 4282f815849a83..bf1cde52f0a6fc 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -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


        


More information about the llvm-commits mailing list