[Mlir-commits] [mlir] [MLIR][ODS] Require the value after oilist keyword (PR #229334)
Mehdi Amini
llvmlistbot at llvm.org
Tue Oct 6 03:20:07 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>
----------------
joker-eph wrote:
Iterating on user is not okay either.
The IR should be verified locally. This is a design problem with `omp.map.info` itself:
1) either this should not be verified, and consider it UB (generate poison values or whatever during lowering)
2) or you can remove this operation and fold it into the users directly. The users could take attributes for whatever is attached to this app and take an extra SSC value operands for the map.info part as well.
https://github.com/llvm/llvm-project/pull/229334
More information about the Mlir-commits
mailing list