diff --git a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td --- a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td +++ b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td @@ -229,7 +229,7 @@ Variadic:$allocators_vars, UnitAttr:$nowait); - let regions = (region SizedRegion<1>:$region); + let regions = (region AnyRegion:$region); let assemblyFormat = [{ oilist(`allocate` `(` diff --git a/mlir/test/Dialect/OpenMP/ops.mlir b/mlir/test/Dialect/OpenMP/ops.mlir --- a/mlir/test/Dialect/OpenMP/ops.mlir +++ b/mlir/test/Dialect/OpenMP/ops.mlir @@ -1349,6 +1349,18 @@ return } +// CHECK-LABEL: func @omp_single_multiple_blocks +func.func @omp_single_multiple_blocks() { + // CHECK: omp.single { + omp.single { + cf.br ^bb2 + ^bb2: + // CHECK: omp.terminator + omp.terminator + } + return +} + // CHECK-LABEL: @omp_task // CHECK-SAME: (%[[bool_var:.*]]: i1, %[[i64_var:.*]]: i64, %[[i32_var:.*]]: i32, %[[data_var:.*]]: memref) func.func @omp_task(%bool_var: i1, %i64_var: i64, %i32_var: i32, %data_var: memref) {