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
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,
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: