[llvm] [SLP]Initial support for copyable elements (non-schedulable only) (PR #140279)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 09:41:23 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 -- 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 51459fe9a..e1def6670 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -10154,8 +10154,8 @@ public:
         SmallVector<std::pair<Value *, Value *>, 4> Candidates1, Candidates2;
         Candidates1.emplace_back(Operands[0][0], Operands[0][1]);
         Candidates2.emplace_back(Operands[1][0], Operands[1][1]);
-        bool Res = R.findBestRootPair(Candidates1) &&
-                   R.findBestRootPair(Candidates2);
+        bool Res =
+            R.findBestRootPair(Candidates1) && R.findBestRootPair(Candidates2);
         if (!Res && isCommutative(MainOp)) {
           Candidates1.clear();
           Candidates2.clear();
@@ -16587,9 +16587,10 @@ Value *BoUpSLP::gather(
           UserOp = InsElt;
         }
         if (UserOp) {
-          if (const auto *It = find_if_not(
-                  Entries,
-                  [&](const TreeEntry *TE) { return TE->isCopyableElement(V); });
+          if (const auto *It = find_if_not(Entries,
+                                           [&](const TreeEntry *TE) {
+                                             return TE->isCopyableElement(V);
+                                           });
               It != Entries.end()) {
             unsigned FoundLane = Entries.front()->findLaneForValue(V);
             ExternalUses.emplace_back(V, UserOp, *Entries.front(), FoundLane);

``````````

</details>


https://github.com/llvm/llvm-project/pull/140279


More information about the llvm-commits mailing list