[Mlir-commits] [mlir] [mlir][linalg] fix indexOp folder to work in genericOp build with createOrFold (PR #137427)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Apr 25 18:37: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 -- mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index ddc0348a4..089ccc668 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -2286,7 +2286,8 @@ LogicalResult IndexOp::verify() {
 OpFoldResult IndexOp::fold(FoldAdaptor adaptor) {
   auto linalgOp = dyn_cast_or_null<LinalgOp>((*this)->getParentOp());
   // Bail out if `linalg.index` does not have a proper parent yet at this
-  // point, e.g., when calling `createOrFold` during IR construction in `genericOp::build`.
+  // point, e.g., when calling `createOrFold` during IR construction in
+  // `genericOp::build`.
   if (!linalgOp)
     return OpFoldResult{};
 

``````````

</details>


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


More information about the Mlir-commits mailing list