[Mlir-commits] [mlir] [mlir] Extend moveValueDefinitions/moveOperationDependencies with cross-region support (PR #176343)
Jorn Tuyls
llvmlistbot at llvm.org
Thu Jan 22 03:05:20 PST 2026
================
@@ -1167,13 +1260,29 @@ LogicalResult mlir::moveValueDefinitions(RewriterBase &rewriter,
insertionPoint,
"unsupported case of moving block argument before insertion point");
}
- // Check for currently unsupported case if the insertion point is in a
- // different block.
- if (value.getDefiningOp()->getBlock() != insertionPoint->getBlock()) {
- return rewriter.notifyMatchFailure(
- insertionPoint,
- "unsupported case of moving definition of value before an insertion "
- "point in a different basic block");
+
+ Block *insertionBlock = insertionPoint->getBlock();
+ Operation *definingOp = value.getDefiningOp();
+ Block *definingBlock = definingOp->getBlock();
+
+ // Check if the value is defined in a different block.
+ if (definingBlock != insertionBlock) {
----------------
jtuyls wrote:
Thanks, removed it!
https://github.com/llvm/llvm-project/pull/176343
More information about the Mlir-commits
mailing list