[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:
Tres Popp 2020-10-29 11:01:05 +01:00
parent 840737fc82
commit 9dbffe4a28
1 changed files with 1 additions and 2 deletions

View File

@ -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();
}