[Mlir-commits] [mlir] [mlir][vector] Add 1:N vector to llvm conversion (PR #174240)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jan 5 12:52:24 PST 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 cpp,h -- mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp mlir/test/lib/Dialect/Vector/TestVectorTransforms.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/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
index 2b69995ff..376802af5 100644
--- a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
+++ b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
@@ -1191,7 +1191,7 @@ public:
 
     SmallVector<int64_t> strides(sourceShape);
     if (extractsScalar && !isZeroRank) {
-      strides[strides.size()-1] = 1;
+      strides[strides.size() - 1] = 1;
     } else {
       strides.push_back(1);
     }
@@ -1358,9 +1358,9 @@ public:
 /// %upd = vector.insert %src, %tgt[0] : vector<2xf32> into vector<2x2xf32>
 /// ```
 ///
-/// Since 1:N conversion is used, src and tgt may now be a collection of vectors.
-/// Update will be replaced into the correct
-/// vectors from src and tgt the collection. Following the example above:
+/// Since 1:N conversion is used, src and tgt may now be a collection of
+/// vectors. Update will be replaced into the correct vectors from src and tgt
+/// the collection. Following the example above:
 ///
 /// %src : {vector<2xf32>}
 /// %tgt : {vector<2x2xf32>, vector<2x2xf32>}
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index 188528f9c..544b9521c 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -51,7 +51,8 @@ struct TestVectorToVectorLowering
   }
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<affine::AffineDialect, arith::ArithDialect, vector::VectorDialect>();
+    registry.insert<affine::AffineDialect, arith::ArithDialect,
+                    vector::VectorDialect>();
   }
 
   Option<bool> unroll{*this, "unroll", llvm::cl::desc("Include unrolling"),

``````````

</details>


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


More information about the Mlir-commits mailing list