[llvm] [SLP][REVEC] Expand getelementptr into vector form. (PR #103704)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 23:18:37 PDT 2024
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 246f345152e933aa40fd20929b59b5c8ef04ce38 63f1f3766aa1f409823acf96ecc4e1cafe802b76 --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 dec624f17d..86a631836e 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -13772,9 +13772,8 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
"Cannot expand getelementptr.");
unsigned VF = VecTyNumElements / ScalarTyNumElements;
SmallVector<Constant *> Indices(VecTyNumElements);
- transform(seq(ScalarTyNumElements), Indices.begin(), [=](unsigned I) {
- return Builder.getInt64(I);
- });
+ transform(seq(ScalarTyNumElements), Indices.begin(),
+ [=](unsigned I) { return Builder.getInt64(I); });
for (int Pos : createStrideMask(ScalarTyNumElements,
ScalarTyNumElements, VF - 1))
std::copy_n(Indices.begin(), ScalarTyNumElements,
``````````
</details>
https://github.com/llvm/llvm-project/pull/103704
More information about the llvm-commits
mailing list