[llvm] [LV] Add epilogue minimum iteration check in VPlan as well. (PR #189372)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 12:46:26 PDT 2026


================
@@ -7477,10 +7373,13 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   // making any changes to the CFG.
   DenseMap<const SCEV *, Value *> ExpandedSCEVs =
       VPlanTransforms::expandSCEVs(BestVPlan, *PSE.getSE());
+  // Check if the epilogue VPlan is executed (where the trip count was already
+  // set when executing the main plan).
+  bool VectroizingEpilogue = IsEpilogueVectorization && ILV.getTripCount();
----------------
artagnon wrote:

```suggestion
  bool VectorizingEpilogue = IsEpilogueVectorization && ILV.getTripCount();
```

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


More information about the llvm-commits mailing list