[llvm] [SLP] Create groups before sorting Phis (PR #111174)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 08:41:17 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 6937dbbe51391471f3cf50fe2b8fa2cd14080a3b f969b7322242ee7fb510ad7544c05bca2efc2dd6 --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 f21ff5f882..df5d81a546 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -5529,20 +5529,16 @@ BoUpSLP::getReorderingData(const TreeEntry &TE, bool TopToBottom) {
auto U2 = TE.Scalars[I2]->user_begin();
if (U2.atEnd())
return true;
-
- if (auto *FirstUserOfPhi1 =
- dyn_cast<InsertElementInst>(*(U1))) {
- if (auto *FirstUserOfPhi2 = dyn_cast<InsertElementInst>(
- *(U2))) {
+
+ if (auto *FirstUserOfPhi1 = dyn_cast<InsertElementInst>(*(U1))) {
+ if (auto *FirstUserOfPhi2 = dyn_cast<InsertElementInst>(*(U2))) {
return getElementIndex(FirstUserOfPhi1) <
getElementIndex(FirstUserOfPhi2);
}
}
- if (auto *FirstUserOfPhi1 =
- dyn_cast<ExtractElementInst>(*(U1))) {
- if (auto *FirstUserOfPhi2 = dyn_cast<ExtractElementInst>(
- *(U2))) {
+ if (auto *FirstUserOfPhi1 = dyn_cast<ExtractElementInst>(*(U1))) {
+ if (auto *FirstUserOfPhi2 = dyn_cast<ExtractElementInst>(*(U2))) {
return FirstUserOfPhi1->getIndexOperand() <
FirstUserOfPhi2->getIndexOperand();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/111174
More information about the llvm-commits
mailing list