[Mlir-commits] [mlir] [MLIR][ODS] Require the value after oilist keyword (PR #229334)

Arseniy Obolenskiy llvmlistbot at llvm.org
Tue Oct 6 01:33:33 PDT 2026


================
@@ -3002,8 +3002,16 @@ func.func @omp_target_update_invalid_motion_type(%map1 : memref<?xi32>) {
 
 // -----
 
-func.func @omp_target_map_must_specify_both_var_ptr_ptr_args(%arg : memref<?xi32>) {
+func.func @omp_map_var_ptr_ptr_missing_type(%arg : memref<?xi32>) {
+  // expected-error @below {{expected attribute value}}
   %map1 = omp.map.info var_ptr(%arg : memref<?xi32>, tensor<?xi32>) map_clauses(to) capture(ByRef) var_ptr_ptr(%arg : memref<?xi32>, ) name("") -> memref<?xi32>
+  return
+}
+
+// -----
+
+func.func @omp_target_map_must_specify_both_var_ptr_ptr_args(%arg : memref<?xi32>) {
+  %map1 = "omp.map.info"(%arg, %arg) <{map_capture_type = #omp.variable_capture_kind<ByRef>, map_type = #omp.clause_map_flags<to>, operandSegmentSizes = array<i32: 1, 1, 0, 0>, var_ptr_type = tensor<?xi32>}> : (memref<?xi32>, memref<?xi32>) -> memref<?xi32>
----------------
aobolensk wrote:

oilist is not involved here, here I preserve the original test that expects "if varPtrPtr or varPtrPtrType is specified, then both must be present" error. Since after my patch the construction like `var_ptr_ptr(%arg : memref<?xi32>, )` (see in the test above, omp_map_var_ptr_ptr_missing_type) is not valid, using generic form is basically the only way to reproduce this error

Probably, this is a signal that this error should be removed as well (along with the test), but I'm not 100% sure about it

https://github.com/llvm/llvm-project/pull/229334


More information about the Mlir-commits mailing list