[mlir] Allow nested regions in inlineRegionAndEmitStore

This is useful for scalar code that uses for/while loops.
This has also been confirmed to work for representing std.pow as an
scf.for loop on gpus.

Differential Revision: https://reviews.llvm.org/D93308
This commit is contained in:
Tres Popp 2020-12-15 17:40:12 +01:00
parent 76edf98b27
commit 922d3d5522
1 changed files with 0 additions and 1 deletions

View File

@ -71,7 +71,6 @@ static void inlineRegionAndEmitStore(OpType op, ArrayRef<Value> indexedValues,
BlockAndValueMapping map;
map.map(block.getArguments(), indexedValues);
for (auto &op : block.without_terminator()) {
assert(op.getNumRegions() == 0 && "expected a non-nested region");
auto *newOp = b.clone(op, map);
map.map(op.getResults(), newOp->getResults());
}