forked from OSchip/llvm-project
[MLIR][SCF] Parenthesize multiple return types in scf.execute_region asm op
Previously, ExecuteRegionOps with multiple return values would fail a round-trip test due to missing parenthesis around the types. Differential Revision: https://reviews.llvm.org/D108402
This commit is contained in:
parent
73323c6eaa
commit
6c1436a9b0
|
@ -115,8 +115,7 @@ static ParseResult parseExecuteRegionOp(OpAsmParser &parser,
|
|||
|
||||
static void print(OpAsmPrinter &p, ExecuteRegionOp op) {
|
||||
p << ExecuteRegionOp::getOperationName();
|
||||
if (op.getNumResults() > 0)
|
||||
p << " -> " << op.getResultTypes();
|
||||
p.printOptionalArrowTypeList(op.getResultTypes());
|
||||
|
||||
p.printRegion(op.region(),
|
||||
/*printEntryBlockArgs=*/false,
|
||||
|
|
|
@ -291,6 +291,12 @@ func @execute_region() -> i64 {
|
|||
scf.yield %c1 : i64
|
||||
}
|
||||
|
||||
// CHECK: scf.execute_region -> (i64, i64) {
|
||||
%res2:2 = scf.execute_region -> (i64, i64) {
|
||||
%c1 = constant 1 : i64
|
||||
scf.yield %c1, %c1 : i64, i64
|
||||
}
|
||||
|
||||
// CHECK: scf.execute_region {
|
||||
// CHECK-NEXT: br ^bb1
|
||||
// CHECK-NEXT: ^bb1:
|
||||
|
|
Loading…
Reference in New Issue