[Mlir-commits] [mlir] [MLIR] Fix control-flow sinking through nested regions (PR #217168)
Longsheng Mou
llvmlistbot at llvm.org
Thu Aug 20 02:29:19 PDT 2026
================
@@ -91,12 +91,13 @@ void Sinker::tryToSinkPredecessors(Operation *user, Region *region,
<< OpWithFlags(user, OpPrintingFlags().skipRegions());
for (Value value : user->getOperands()) {
Operation *op = value.getDefiningOp();
- // Ignore block arguments and ops that are already inside the region.
- if (!op || op->getParentRegion() == region)
+ // Ignore block arguments and ops already contained in the target region,
+ // including ops in nested regions.
+ // region.
+ if (!op || region->isAncestor(op->getParentRegion()))
----------------
CoTinker wrote:
Okay, I see.
https://github.com/llvm/llvm-project/pull/217168
More information about the Mlir-commits
mailing list