Skip to content

Commit b6cb2c7

Browse files
ddubov100joker-eph
andauthored
Update mlir/lib/Dialect/SCF/IR/SCF.cpp
Co-authored-by: Mehdi Amini <[email protected]>
1 parent 33061e4 commit b6cb2c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/Dialect/SCF/IR/SCF.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,8 @@ struct ExecuteRegionForwardingEliminator
351351
bool isValueFromInsideRegion(Value value,
352352
ExecuteRegionOp executeRegionOp) const {
353353
// Check if the value is defined within the execute_region
354-
if (Operation *defOp = value.getDefiningOp()) {
355-
return executeRegionOp.getRegion().isAncestor(defOp->getParentRegion());
356-
}
354+
if (Operation *defOp = value.getDefiningOp())
355+
return executeRegionOp.getRegion() = defOp->getParentRegion();
357356

358357
// If it's a block argument, check if it's from within the region
359358
if (BlockArgument blockArg = dyn_cast<BlockArgument>(value)) {

0 commit comments

Comments
 (0)