[llvm] [SLP] More OOP to simplify vectorizeStores() (NFC) (PR #134605)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 09:14:27 PDT 2025
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/134605 at github.com>
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 -- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 01a81f037..d3e5d09b2 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -21252,12 +21252,11 @@ bool SLPVectorizerPass::vectorizeStores(
// - Try to vectorize the sequence {1, {1, 0}, {3, 2}}.
auto FillStoresSet = [&](unsigned Idx, StoreInst *SI) {
std::optional<int> PtrDist;
- auto *RelatedStores =
- find_if(SortedStores,
- [&PtrDist, SI, this](const RelatedStoreInsts &StoreSeq) {
- PtrDist = StoreSeq.getPointerDiff(*SI, *DL, *SE);
- return PtrDist.has_value();
- });
+ auto *RelatedStores = find_if(
+ SortedStores, [&PtrDist, SI, this](const RelatedStoreInsts &StoreSeq) {
+ PtrDist = StoreSeq.getPointerDiff(*SI, *DL, *SE);
+ return PtrDist.has_value();
+ });
// We did not find a comparable store, start a new group.
if (RelatedStores == SortedStores.end()) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/134605
More information about the llvm-commits
mailing list