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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 10:53:23 PDT 2025


================
@@ -9813,6 +9724,98 @@ static void fixScalarResumeValuesFromBypass(BasicBlock *BypassBlock, Loop *L,
   }
 }
 
+/// Connect the epilogue vector loop generated for \p Plan to the main vector
+/// loop, updating branches from the iteration and runtime checks, as well as
+/// updating various phis. \p InstsToMove contains instructions that need to be
+/// moved to the vector preheader.
+static void connectEpilogueVectorLoop(
+    VPlan &Plan, Loop *L, EpilogueLoopVectorizationInfo &EPI, DominatorTree *DT,
+    LoopVectorizationLegality &LVL,
+    DenseMap<const SCEV *, Value *> &ExpandedSCEVs, GeneratedRTChecks &Checks,
+    ArrayRef<Instruction *> InstsToMove) {
+  BasicBlock *AdditionalBypassBlock =
+      cast<VPIRBasicBlock>(Plan.getEntry())->getIRBasicBlock();
+  BasicBlock *VecEpilogueIterationCountCheck = AdditionalBypassBlock;
----------------
fhahn wrote:

Yep, updated thanks!

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


More information about the llvm-commits mailing list