We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bddd42 commit 24ca4aeCopy full SHA for 24ca4ae
mlir/lib/Dialect/SCF/IR/SCF.cpp
@@ -355,9 +355,8 @@ struct ExecuteRegionForwardingEliminator
355
// results. scf.execute_region must have at least one yield operation.
356
for (auto *yieldOp : yieldOps) {
357
rewriter.setInsertionPoint(yieldOp);
358
- rewriter.eraseOp(yieldOp);
359
- rewriter.create<scf::YieldOp>(yieldOp->getLoc(),
360
- ValueRange(internalValues));
+ rewriter.replaceOpWithNewOp<scf::YieldOp>(yieldOp,
+ ValueRange(internalValues));
361
}
362
363
// Replace the old operation with the external values directly.
0 commit comments