[Mlir-commits] [mlir] [mlir] Fix crash in dialect conversion for detached root ops (PR #185068)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Mar 13 07:38:08 PDT 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 -- mlir/lib/Conversion/FuncToSPIRV/FuncToSPIRVPass.cpp mlir/lib/Transforms/Utils/DialectConversion.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/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index 9ab21f90d..cf59234de 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -1309,7 +1309,8 @@ void ReplaceOperationRewrite::commit(RewriterBase &rewriter) {
   if (!op->getBlock())
     llvm::reportFatalInternalError(
         "dialect conversion attempted to replace a root operation that has no "
-        "parent block; the pass must ensure its target op is nested in a block");
+        "parent block; the pass must ensure its target op is nested in a "
+        "block");
   op->getBlock()->getOperations().remove(op);
 }
 

``````````

</details>


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


More information about the Mlir-commits mailing list