forked from OSchip/llvm-project
[mlir] Reorder shape assuming bufferization.
The previous ordering continued to use the original assuming after replacing it which is not allowed. Now, inline the region from the old into the new before the replacement. Differential Revision: https://reviews.llvm.org/D90375
This commit is contained in:
parent
840737fc82
commit
9dbffe4a28
|
@ -32,10 +32,9 @@ public:
|
|||
|
||||
auto newAssumingOp =
|
||||
rewriter.create<AssumingOp>(op.getLoc(), newResultTypes, op.witness());
|
||||
|
||||
rewriter.replaceOp(op, newAssumingOp.getResults());
|
||||
rewriter.inlineRegionBefore(op.doRegion(), newAssumingOp.doRegion(),
|
||||
newAssumingOp.doRegion().end());
|
||||
rewriter.replaceOp(op, newAssumingOp.getResults());
|
||||
|
||||
return success();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue