[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:47 PDT 2025
================
@@ -7405,124 +7391,27 @@ BasicBlock *EpilogueVectorizerMainLoop::emitIterationCountCheck(
// EpilogueVectorizerEpilogueLoop
//===--------------------------------------------------------------------===//
-/// This function is partially responsible for generating the control flow
-/// depicted in https://llvm.org/docs/Vectorizers.html#epilogue-vectorization.
+/// This function creates a new scalar preheader, using the previous one as
+/// entry block to the epilogue VPlan. The minimum iteration check is already
+/// created in VPlan.
BasicBlock *EpilogueVectorizerEpilogueLoop::createVectorizedLoopSkeleton() {
+ BasicBlock *OriginalScalarPH = OrigLoop->getLoopPreheader();
BasicBlock *ScalarPH = createScalarPreheader("vec.epilog.");
----------------
ayalz wrote:
```suggestion
BasicBlock *NewScalarPH = createScalarPreheader("vec.epilog.");
BasicBlock *OriginalScalarPH = NewScalarPH->getSinglePredecessor();
```
?
https://github.com/llvm/llvm-project/pull/157545
More information about the llvm-commits
mailing list