[llvm] [LV] Convert gather loads with invariant stride into strided loads (PR #147297)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 7 06:33:00 PDT 2025
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 HEAD~1 HEAD --extensions cpp,h -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.h llvm/lib/Transforms/Vectorize/VPlanValue.h llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
``````````
</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 c8fad90e7..645183fde 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -2702,7 +2702,7 @@ static std::pair<VPValue *, VPValue *> matchStridedStart(VPValue *CurIndex) {
return {nullptr, nullptr};
unsigned VarIdx = IsLHSUniform ? 1 : 0;
- auto[Start, Stride] = matchStridedStart(WidenR->getOperand(VarIdx));
+ auto [Start, Stride] = matchStridedStart(WidenR->getOperand(VarIdx));
if (!Start)
return {nullptr, nullptr};
@@ -2749,7 +2749,7 @@ determineBaseAndStride(VPWidenGEPRecipe *WidenGEP) {
return {nullptr, nullptr};
VPValue *VarIndex = WidenGEP->getOperand(VarOp);
- auto[Start, Stride] = matchStridedStart(VarIndex);
+ auto [Start, Stride] = matchStridedStart(VarIndex);
if (!Start)
return {nullptr, nullptr};
diff --git a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
index 7c69a43e9..bc9d40834 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
@@ -157,7 +157,7 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
return VerifyEVLUse(*S, S->getNumOperands() - 1);
})
.Case<VPWidenStoreEVLRecipe, VPReductionEVLRecipe,
- VPWidenIntOrFpInductionRecipe,VPWidenStridedLoadRecipe>(
+ VPWidenIntOrFpInductionRecipe, VPWidenStridedLoadRecipe>(
[&](const VPRecipeBase *S) { return VerifyEVLUse(*S, 2); })
.Case<VPScalarIVStepsRecipe>([&](auto *R) {
if (R->getNumOperands() != 3) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/147297
More information about the llvm-commits
mailing list