[llvm] [VPlan] Create epilogue minimum iteration check in VPlan. (PR #157545)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 21 14:05:48 PDT 2025


================
@@ -9601,16 +9490,20 @@ static void preparePlanForMainVectorLoop(VPlan &MainPlan, VPlan &EpiPlan) {
 }
 
 /// Prepare \p Plan for vectorizing the epilogue loop. That is, re-use expanded
-/// SCEVs from \p ExpandedSCEVs and set resume values for header recipes.
-static void
-preparePlanForEpilogueVectorLoop(VPlan &Plan, Loop *L,
-                                 const SCEV2ValueTy &ExpandedSCEVs,
-                                 EpilogueLoopVectorizationInfo &EPI) {
+/// SCEVs from \p ExpandedSCEVs and set resume values for header recipes. Some
+/// reductions require creating new instructions to compute the resume values.
+/// They are collected in a vector and returned. They must be moved to the
+/// vector preheader.
----------------
ayalz wrote:

```suggestion
/// preheader of the vector epilogue loop, after created by the execution of Plan.
```
?

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


More information about the llvm-commits mailing list