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 @@ -978,8 +978,8 @@ let arguments = (ins Optional:$if_expr, Optional:$device, - Variadic:$use_device_ptr, - Variadic:$use_device_addr, + Variadic:$use_device_ptr, + Variadic:$use_device_addr, Variadic:$map_operands, I64ArrayAttr:$map_types); @@ -987,10 +987,10 @@ let assemblyFormat = [{ oilist(`if` `(` $if_expr `:` type($if_expr) `)` - | `device` `(` $device `:` type($device) `)` - | `use_device_ptr` `(` $use_device_ptr `:` type($use_device_ptr) `)` - | `use_device_addr` `(` $use_device_addr `:` type($use_device_addr) `)`) + | `device` `(` $device `:` type($device) `)`) `map` `(` custom($map_operands, type($map_operands), $map_types) `)` + oilist(`use_device_ptr` `(` $use_device_ptr `:` type($use_device_ptr) `)` + | `use_device_addr` `(` $use_device_addr `:` type($use_device_addr) `)`) $region attr-dict }]; 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 @@ -507,8 +507,8 @@ // CHECK: omp.target_data if(%[[VAL_0:.*]] : i1) device(%[[VAL_1:.*]] : si32) map((always, from -> %[[VAL_2:.*]] : memref)) omp.target_data if(%if_cond : i1) device(%device : si32) map((always, from -> %map1 : memref)){} - // CHECK: omp.target_data use_device_ptr(%[[VAL_3:.*]] : memref) use_device_addr(%[[VAL_4:.*]] : memref) map((close, present, to -> %[[VAL_2:.*]] : memref)) - omp.target_data use_device_ptr(%device_ptr : memref) use_device_addr(%device_addr : memref) map((close, present, to -> %map1 : memref)){} + // CHECK: omp.target_data map((close, present, to -> %[[VAL_2:.*]] : memref)) use_device_ptr(%[[VAL_3:.*]] : memref) use_device_addr(%[[VAL_4:.*]] : memref) + omp.target_data map((close, present, to -> %map1 : memref)) use_device_ptr(%device_ptr : memref) use_device_addr(%device_addr : memref) {} // CHECK: omp.target_data map((tofrom -> %[[VAL_2]] : memref), (alloc -> %[[VAL_5:.*]] : memref)) omp.target_data map((tofrom -> %map1 : memref), (alloc -> %map2 : memref)){}