[llvm] [VPlan] Connect Entry to scalar preheader during initial construction. (PR #140132)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 02:18:35 PDT 2025
================
@@ -7876,7 +7870,10 @@ EpilogueVectorizerMainLoop::emitIterationCountCheck(BasicBlock *Bypass,
setBranchWeights(BI, MinItersBypassWeights, /*IsExpected=*/false);
ReplaceInstWithInst(TCCheckBlock->getTerminator(), &BI);
- introduceCheckBlockInVPlan(TCCheckBlock);
+ // Only generate add a new block for the trip-count check for the main loop.
+ // The epilogue will use the already existing VPlan entry block.
----------------
ayalz wrote:
```suggestion
// When vectorizing the main loop, its trip-count check is placed in a new block, whereas the overall trip-count check is placed in the VPlan entry block.
// When vectorizing the epilogue loop, its trip-count check is placed in the VPlan entry block.
```
sounds clearer? Referring to https://llvm.org/docs/Vectorizers.html#epilogue-vectorization
https://github.com/llvm/llvm-project/pull/140132
More information about the llvm-commits
mailing list