[llvm] [LoopVectorize] Enable more early exit vectorisation tests (PR #117008)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 09:00:02 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 3097c60928c773d8c7f97432491c0e4367b6215c 482614329c62cb834caba2c472d1775a2462e0a8 --extensions cpp,h -- llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanCFG.h llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 80818a162d..8f0d0765f8 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2954,7 +2954,8 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State) {
VPBasicBlock *MiddleVPBB = State.Plan->getMiddleBlock();
VPBlockBase *PredVPBB = MiddleVPBB->getSinglePredecessor();
while (PredVPBB && PredVPBB != VectorRegion) {
- BasicBlock *MiddleSplitBB = State.CFG.VPBB2IRBB[cast<VPBasicBlock>(PredVPBB)];
+ BasicBlock *MiddleSplitBB =
+ State.CFG.VPBB2IRBB[cast<VPBasicBlock>(PredVPBB)];
OuterLoop->addBasicBlockToLoop(MiddleSplitBB, *LI);
PredVPBB = PredVPBB->getSinglePredecessor();
}
@@ -10015,8 +10016,7 @@ bool LoopVectorizePass::processLoop(Loop *L) {
"early exit is disabled",
"Auto-vectorization of loops with uncountable "
"early exit is disabled",
- "UncountableEarlyExitLoopsDisabled", ORE,
- L);
+ "UncountableEarlyExitLoopsDisabled", ORE, L);
return false;
}
for (BasicBlock *BB : L->blocks()) {
@@ -10054,15 +10054,13 @@ bool LoopVectorizePass::processLoop(Loop *L) {
if (LVL.hasUncountableEarlyExit()) {
BasicBlock *LoopLatch = L->getLoopLatch();
if (IAI.requiresScalarEpilogue() ||
- llvm::any_of(LVL.getCountableExitingBlocks(), [LoopLatch](BasicBlock *BB) {
- return BB != LoopLatch;
- })) {
+ llvm::any_of(LVL.getCountableExitingBlocks(),
+ [LoopLatch](BasicBlock *BB) { return BB != LoopLatch; })) {
reportVectorizationFailure("Auto-vectorization of early exit loops "
"requiring a scalar epilogue is unsupported",
"Auto-vectorization of early exit loops "
"requiring a scalar epilogue is unsupported",
- "UncountableEarlyExitUnsupported", ORE,
- L);
+ "UncountableEarlyExitUnsupported", ORE, L);
return false;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/117008
More information about the llvm-commits
mailing list