[llvm] [VPlan] Compute induction end values in VPlan. (PR #112145)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 14:00:58 PST 2024


================
@@ -7827,8 +7759,9 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   //===------------------------------------------------===//
 
   // 2. Copy and widen instructions from the old loop into the new loop.
-  BestVPlan.prepareToExecute(ILV.getTripCount(),
-                             ILV.getOrCreateVectorTripCount(nullptr), State);
+  BestVPlan.prepareToExecute(
+      ILV.getTripCount(),
+      ILV.getOrCreateVectorTripCount(ILV.LoopVectorPreHeader), State);
----------------
fhahn wrote:

Previously getOrCreateVectorTripCount would be called by createInductionResumeVPValues, which has now been removed, so we need to pass `ILV.LoopVectorPreHeader` here create the vector trip count IR

https://github.com/llvm/llvm-project/pull/112145


More information about the llvm-commits mailing list