[llvm] [LV][NFC] Emit remarks when failing to vectorise early exit loops (PR #225078)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 06:03:13 PDT 2026
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 origin/main HEAD --extensions h,cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index f8938bf77..03c9a2000 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -3194,10 +3194,9 @@ static bool handleUncountableExitsWithSideEffects(
VPValue *Cond = getRecipesForUncountableExit(ConditionRecipes, LatchVPBB);
if (!Cond) {
- reportVectorizationFailure(
- "Unable to determine early exit condition for loop with side effects.\n",
- "EarlyExitSideEffectsCond",
- ORE, TheLoop);
+ reportVectorizationFailure("Unable to determine early exit condition for "
+ "loop with side effects.\n",
+ "EarlyExitSideEffectsCond", ORE, TheLoop);
return false;
}
@@ -3236,8 +3235,8 @@ static bool handleUncountableExitsWithSideEffects(
&Predicates)) {
reportVectorizationFailure("Early exit loop with side effects contains "
"critical load that may fault.\n",
- "EarlyExitSideEffectsFaultingLoad",
- ORE, TheLoop);
+ "EarlyExitSideEffectsFaultingLoad", ORE,
+ TheLoop);
return false;
}
}
@@ -3251,10 +3250,10 @@ static bool handleUncountableExitsWithSideEffects(
return false;
if (!match(Ptr, m_VPInstruction<Instruction::GetElementPtr>(
m_LiveIn(), m_Specific(IV)))) {
- reportVectorizationFailure(
- "Early exit loop with side effects contains unsupported critical load.\n",
- "EarlyExitSideEffectsBadCriticalLoad",
- ORE, TheLoop);
+ reportVectorizationFailure("Early exit loop with side effects contains "
+ "unsupported critical load.\n",
+ "EarlyExitSideEffectsBadCriticalLoad", ORE,
+ TheLoop);
return false;
}
@@ -3289,10 +3288,10 @@ static bool handleUncountableExitsWithSideEffects(
if (R.mayReadOrWriteMemory() && &R != Load) {
// TODO: Handle conditional memory operations in the loop.
if (!VPDT.dominates(R.getParent(), LatchVPBB)) {
- reportVectorizationFailure("Early exit loop with side effects "
- "contains unsupported memory operations.\n",
- "EarlyExitSideEffectsUnsupportedMemOps",
- ORE, TheLoop);
+ reportVectorizationFailure(
+ "Early exit loop with side effects "
+ "contains unsupported memory operations.\n",
+ "EarlyExitSideEffectsUnsupportedMemOps", ORE, TheLoop);
return false;
}
cast<VPInstruction>(&R)->addMask(Mask);
@@ -3320,8 +3319,7 @@ static bool handleUncountableExitsWithSideEffects(
if (range_size(Phis) != 1) {
reportVectorizationFailure("Early exit loop with side effects contains "
"unsupported reductions or recurrences.\n",
- "EarlyExitEffectsSideReductions",
- ORE, TheLoop);
+ "EarlyExitEffectsSideReductions", ORE, TheLoop);
return false;
}
VPPhi *ContinueIV = cast<VPPhi>(Phis.begin());
``````````
</details>
https://github.com/llvm/llvm-project/pull/225078
More information about the llvm-commits
mailing list