[llvm] [SLP][TTI][WebAssembly] Model nonzero i8x16 OR reductions in TTI (PR #205119)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 08:32:35 PDT 2026


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 origin/main HEAD --extensions h,cpp -- llvm/include/llvm/Analysis/TargetTransformInfo.h llvm/include/llvm/Analysis/TargetTransformInfoImpl.h llvm/lib/Analysis/TargetTransformInfo.cpp llvm/lib/Target/WebAssembly/WebAssemblyReduceToAnyAllTrue.cpp llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</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 785b2fa6c..f85ef1be9 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -28749,8 +28749,7 @@ class HorizontalReduction {
     const auto *Cmp = dyn_cast<ICmpInst>(*ReductionRoot->user_begin());
     CmpPredicate Pred;
     if (!Cmp ||
-        !match(Cmp,
-               m_c_ICmp(Pred, m_Specific(ReductionRoot), m_Zero())) ||
+        !match(Cmp, m_c_ICmp(Pred, m_Specific(ReductionRoot), m_Zero())) ||
         Pred != ICmpInst::ICMP_NE)
       return TTI::ReductionUseKind::None;
 

``````````

</details>


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


More information about the llvm-commits mailing list