[llvm] [VectorCombine] New folding pattern for extract/binop/shuffle chains (PR #145232)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 28 04:04:28 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Vectorize/VectorCombine.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index 8129ab23d..435d1cd9c 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -3091,11 +3091,11 @@ bool VectorCombine::foldShuffleChainsToReduce(Instruction &I) {
         return false;
 
       switch (CI->getOpcode()) {
-        case BinaryOperator::Add:
-        case BinaryOperator::Mul:
-        case BinaryOperator::Or:
-        case BinaryOperator::And:
-        case BinaryOperator::Xor: {
+      case BinaryOperator::Add:
+      case BinaryOperator::Mul:
+      case BinaryOperator::Or:
+      case BinaryOperator::And:
+      case BinaryOperator::Xor: {
         auto *Op0 = BinOp->getOperand(0);
         auto *Op1 = BinOp->getOperand(1);
         PrevVecV[0] = Op0;

``````````

</details>


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


More information about the llvm-commits mailing list