[llvm] [VPlan] Unify inner and outer loop paths (NFCI). (PR #192868)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 19 12:45:52 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/LoopVectorizationPlanner.h llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp --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/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index e13acdfa6..7e7c9906b 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7678,10 +7678,10 @@ void LoopVectorizationPlanner::buildVPlans(ElementCount MinVF,
// Create recipes for header phis. For outer loops, reductions, recurrences
// and in-loop reductions are empty since legality doesn't detect them.
- RUN_VPLAN_PASS(VPlanTransforms::createHeaderPhiRecipes,
- *VPlan0, PSE, *OrigLoop, Legal->getInductionVars(),
- Legal->getReductionVars(), Legal->getFixedOrderRecurrences(),
- CM.getInLoopReductions(), Hints.allowReordering());
+ RUN_VPLAN_PASS(VPlanTransforms::createHeaderPhiRecipes, *VPlan0, PSE,
+ *OrigLoop, Legal->getInductionVars(),
+ Legal->getReductionVars(), Legal->getFixedOrderRecurrences(),
+ CM.getInLoopReductions(), Hints.allowReordering());
RUN_VPLAN_PASS(VPlanTransforms::simplifyRecipes, *VPlan0);
// If we're vectorizing a loop with an uncountable exit, make sure that the
@@ -7706,8 +7706,7 @@ void LoopVectorizationPlanner::buildVPlans(ElementCount MinVF,
RUN_VPLAN_PASS(VPlanTransforms::foldTailByMasking, *VPlan0);
// introduceMasksAndLinearize does not support nested loop regions yet.
if (IsInnerLoop)
- RUN_VPLAN_PASS(VPlanTransforms::introduceMasksAndLinearize,
- *VPlan0);
+ RUN_VPLAN_PASS(VPlanTransforms::introduceMasksAndLinearize, *VPlan0);
auto MaxVFTimes2 = MaxVF * 2;
for (ElementCount VF = MinVF; ElementCount::isKnownLT(VF, MaxVFTimes2);) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/192868
More information about the llvm-commits
mailing list