[llvm] [SLP]Do not vectorize code in EH and non-returning blocks (PR #112221)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 13:33:28 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 1b0fcf1e42e05611ec37aa7956988ae6317ad116 f67a77f1ebc529cfeb82a7bcb343ae4891262b9b --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 7d54be3eb8..715aa8f7ef 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -17693,8 +17693,7 @@ bool SLPVectorizerPass::runImpl(Function &F, ScalarEvolution *SE_,
 
   // Scan the blocks in the function in post order.
   for (auto *BB : post_order(&F.getEntryBlock())) {
-    if (BB->isEHPad() ||
-        isa_and_nonnull<UnreachableInst>(BB->getTerminator()))
+    if (BB->isEHPad() || isa_and_nonnull<UnreachableInst>(BB->getTerminator()))
       continue;
 
     // Start new block - clear the list of reduction roots.

``````````

</details>


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


More information about the llvm-commits mailing list