[llvm] Add vector reduction instructions (PR #82786)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 08:30:26 PST 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 f01719afaae9a208ac272d99760d18e4c16d9241 df1312ce79e3b44bb76f628fb55a05ca522c7032 -- llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp llvm/lib/Target/SPIRV/SPIRV.h llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp b/llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
index b6fd4fd2d8..c3f75463df 100644
--- a/llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
@@ -113,12 +113,10 @@ SPIRVLegalizerInfo::SPIRVLegalizerInfo(const SPIRVSubtarget &ST) {
       v3s32, v3s64, v4s1,  v4s8,  v4s16,  v4s32,  v4s64, v8s1, v8s8, v8s16,
       v8s32, v8s64, v16s1, v16s8, v16s16, v16s32, v16s64};
 
-  auto allVectors = {
-       v2s1,  v2s8,  v2s16,  v2s32,  v2s64,
-       v3s1,  v3s8,  v3s16,  v3s32,  v3s64,
-       v4s1,  v4s8,  v4s16,  v4s32,  v4s64,
-       v8s1,  v8s8,  v8s16,  v8s32,  v8s64,
-      v16s1, v16s8, v16s16, v16s32, v16s64};
+  auto allVectors = {v2s1,  v2s8,   v2s16,  v2s32, v2s64, v3s1,  v3s8,
+                     v3s16, v3s32,  v3s64,  v4s1,  v4s8,  v4s16, v4s32,
+                     v4s64, v8s1,   v8s8,   v8s16, v8s32, v8s64, v16s1,
+                     v16s8, v16s16, v16s32, v16s64};
 
   auto allScalarsAndVectors = {
       s1,   s8,   s16,   s32,   s64,   v2s1,  v2s8,  v2s16,  v2s32,  v2s64,

``````````

</details>


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


More information about the llvm-commits mailing list