[Mlir-commits] [mlir] [Will be divided up] Vector linearization via strided ops (PR #142672)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Jun 3 14:10:05 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,h -- mlir/include/mlir/Dialect/Vector/Transforms/VectorLinearize.h mlir/test/lib/Dialect/Vector/TestVectorLinearize.cpp mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h mlir/lib/Dialect/Vector/IR/VectorOps.cpp mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp mlir/tools/mlir-opt/mlir-opt.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 359b2ba09..014ca67d6 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -5726,20 +5726,20 @@ OpFoldResult ShapeCastOp::fold(FoldAdaptor adaptor) {
VectorType resultType = getType();
-
- // y = shape_cast(shape_cast(shape_cast(x)))
+ // y = shape_cast(shape_cast(shape_cast(x)))
// -> shape_cast(x) # if x and y different types
// -> x # if x and y same type
// Value newSource = getSource();
ShapeCastOp parent = *this;
- while (auto precedingShapeCast = parent.getSource().getDefiningOp<ShapeCastOp>()) {
+ while (auto precedingShapeCast =
+ parent.getSource().getDefiningOp<ShapeCastOp>()) {
parent = precedingShapeCast;
}
if (parent.getSource().getType() == resultType)
return parent.getSource();
- if (parent != *this){
+ if (parent != *this) {
setOperand(parent.getSource());
return getResult();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/142672
More information about the Mlir-commits
mailing list