[Mlir-commits] [flang] [llvm] [mlir] [flang][mlir][OpenMP] Support iterator modifier in declare mapper map clause (PR #215485)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Aug 23 22:49:00 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 181229 tests passed
* 3636 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Target/LLVMIR/openmp-iterator.mlir</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp
# executed command: split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-translate --mlir-to-llvmir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp/host.mlir | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir --check-prefix=CHECK
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-translate --mlir-to-llvmir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp/host.mlir
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir --check-prefix=CHECK
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-translate --mlir-to-llvmir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp/target.mlir | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir --check-prefix=TARGET
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-translate --mlir-to-llvmir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp/target.mlir
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir --check-prefix=TARGET
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-translate --mlir-to-llvmir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp/mapper.mlir | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir --check-prefix=MAPPER
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-translate --mlir-to-llvmir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp/mapper.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/test/Target/LLVMIR/Output/openmp-iterator.mlir.tmp/mapper.mlir:18:135: error: custom op 'omp.map.info' inherent attribute 'name' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# |       %m = omp.map.info var_ptr(%arg : !llvm.ptr, !llvm.struct<"mapper_type", (i32)>) map_clauses(tofrom) capture(ByRef) -> !llvm.ptr {name = ""}
# |                                                                                                                                       ^
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir --check-prefix=MAPPER
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Target/LLVMIR/openmp-iterator.mlir --check-prefix=MAPPER
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

### Flang
<details>
<summary>Flang.Lower/OpenMP/map-iterator.f90</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/finclude/flang/x86_64-unknown-linux-gnu -emit-hlfir -fopenmp -fopenmp-version=52 -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/map-iterator.f90 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/map-iterator.f90
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/bbc -fintrinsic-modules-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/finclude/flang/x86_64-unknown-linux-gnu -emit-hlfir -fopenmp -fopenmp-version=52 -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/map-iterator.f90
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/map-iterator.f90
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/map-iterator.f90:21:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[MAPINFO:.*]] = omp.map.info var_ptr(%[[COOR]] : !fir.ref<i32>, i32) map_clauses(tofrom) capture(ByRef) -> !fir.ref<i32> {name = "a"}
# |          ^
# | <stdin>:21:104: note: scanning from here
# |  %12 = fir.array_coor %3(%11) %10 : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>, i64) -> !fir.ref<i32>
# |                                                                                                        ^
# | <stdin>:21:104: note: with "COOR" equal to "12"
# |  %12 = fir.array_coor %3(%11) %10 : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>, i64) -> !fir.ref<i32>
# |                                                                                                        ^
# | <stdin>:21:104: note: pattern attempts to capture variables: "MAPINFO"
# |  %12 = fir.array_coor %3(%11) %10 : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>, i64) -> !fir.ref<i32>
# |                                                                                                        ^
# | <stdin>:22:2: note: possible intended match here
# |  %13 = omp.map.info var_ptr(%12 : !fir.ref<i32>, i32) map_clauses(tofrom) capture(ByRef) name("a") -> !fir.ref<i32>
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/map-iterator.f90:50:10: error: CHECK: expected string not found in input
# | ! CHECK: %[[MAPINFO:.*]] = omp.map.info var_ptr(%[[COOR]] : !fir.ref<i32>, i32) map_clauses(tofrom) capture(ByRef) -> !fir.ref<i32> {name = "a"}
# |          ^
# | <stdin>:71:106: note: scanning from here
# |  %15 = fir.array_coor %3#0(%14) %13 : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>, i64) -> !fir.ref<i32>
# |                                                                                                          ^
# | <stdin>:71:106: note: with "COOR" equal to "15"
# |  %15 = fir.array_coor %3#0(%14) %13 : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>, i64) -> !fir.ref<i32>
# |                                                                                                          ^
# | <stdin>:71:106: note: pattern attempts to capture variables: "MAPINFO"
# |  %15 = fir.array_coor %3#0(%14) %13 : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>, i64) -> !fir.ref<i32>
# |                                                                                                          ^
# | <stdin>:72:2: note: possible intended match here
# |  %16 = omp.map.info var_ptr(%15 : !fir.ref<i32>, i32) map_clauses(tofrom) capture(ByRef) name("a") -> !fir.ref<i32>
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/Lower/OpenMP/map-iterator.f90
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            16:  %c1_0 = arith.constant 1 : index 
# |            17:  %9 = fir.load %8#0 : !fir.ref<i32> 
# |            18:  %10 = fir.convert %9 : (i32) -> i64 
# |            19:  %c10 = arith.constant 10 : index 
# |            20:  %11 = fir.shape %c10 : (index) -> !fir.shape<1> 
# |            21:  %12 = fir.array_coor %3(%11) %10 : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>, i64) -> !fir.ref<i32> 
# | check:21'0                                                                                                           {   search range start (exclusive)
# | check:21'1                                                                                                               error: no match found in search range
# | check:21'2                                                                                                               with "COOR" equal to "12"
# | check:21'3                                                                                                               pattern attempts to capture variables: "MAPINFO"
# |            22:  %13 = omp.map.info var_ptr(%12 : !fir.ref<i32>, i32) map_clauses(tofrom) capture(ByRef) name("a") -> !fir.ref<i32> 
# | check:21'4      ?                                                                                                                    possible intended match
# |            23:  omp.yield(%13 : !fir.ref<i32>) 
# |            24:  } -> !omp.iterated<!fir.ref<i32>> 
# |            25:  %5 = omp.map.info var_ptr(%0#1 : !fir.ref<!fir.type<_QFfTs{a:!fir.array<10xi32>}>>, !fir.type<_QFfTs{a:!fir.array<10xi32>}>) map_clauses(storage) capture(ByRef) members( : : ) name("v") partial_map(true) -> !fir.ref<!fir.type<_QFfTs{a:!fir.array<10xi32>}>> 
# |            26:  omp.declare_mapper.info map_entries(%5 : !fir.ref<!fir.type<_QFfTs{a:!fir.array<10xi32>}>>) map_iterated(%4 : !omp.iterated<!fir.ref<i32>>) 
# |            27:  } 
# |             .
# |             .
# |             .
# |            48:  %11:2 = hlfir.declare %9(%10) {fortran_attrs = #fir.var_attrs<target>, uniq_name = "_QFfE.c.s"} : (!fir.ref<!fir.array<1x!fir.type<_QM__fortran_type_infoTcomponent{name:!fir.box<!fir.ptr<!fir.char<1,?>>>,genre:i8,category:i8,kind:i8,rank:i8,memoryspace:i8,__padding0:!fir.array<3xi8>,offset:i64,characterlen:!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.array<7xi8>,value:i64}>,derived:!fir.box<!fir.ptr<!fir.type<_QM__fortran_type_infoTderivedtype{binding:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTbinding{proc:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>,name:!fir.box<!fir.ptr<!fir.char<1,?>>>}>>>>,name:!fir.box<!fir.ptr<!fir.char<1,?>>>,sizeinbytes:i64,uninstantiated:!fir.box<!fir.ptr<!fir.type<_QM__fortran_type_infoTderivedtype>>>,kindparameter:!fir.box<!fir.ptr<!fir.array<?xi64>>>,lenparameterkind:!fir.box<!fir.ptr<!fir.array<?xi8>>>,component:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTcomponent>>>>,procptr:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTprocptrcomponent{name:!fir.box<!fir.ptr<!fir.char<1,?>>>,offset:i64,initialization:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>}>>>>,special:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTspecialbinding{which:i8,isargdescriptorset:i8,istypebound:i8,specialcaseflag:i8,__padding0:!fir.array<4xi8>,proc:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>}>>>>,specialbitset:i32,hasparent:i8,noinitializationneeded:i8,nodestructionneeded:i8,nofinalizationneeded:i8,nodefinedassignment:i8,__padding0:!fir.array<3xi8>}>>>,lenvalue:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.array<7xi8>,value:i64}>>>>,bounds:!fir.box<!fir.ptr<!fir.array<?x?x!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.array<7xi8>,value:i64}>>>>,initialization:!fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>}>>>, !fir.shapeshift<1>) -> (!fir.box<!fir.array<1x!fir.type<_QM__fortran_type_infoTcomponent{name:!fir.box<!fir.ptr<!fir.char<1,?>>>,genre:i8,category:i8,kind:i8,rank:i8,memoryspace:i8,__padding0:!fir.array<3xi8>,offset:i64,characterlen:!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.array<7xi8>,value:i64}>,derived:!fir.box<!fir.ptr<!fir.type<_QM__fortran_type_infoTderivedtype{binding:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTbinding{proc:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>,name:!fir.box<!fir.ptr<!fir.char<1,?>>>}>>>>,name:!fir.box<!fir.ptr<!fir.char<1,?>>>,sizeinbytes:i64,uninstantiated:!fir.box<!fir.ptr<!fir.type<_QM__fortran_type_infoTderivedtype>>>,kindparameter:!fir.box<!fir.ptr<!fir.array<?xi64>>>,lenparameterkind:!fir.box<!fir.ptr<!fir.array<?xi8>>>,component:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTcomponent>>>>,procptr:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTprocptrcomponent{name:!fir.box<!fir.ptr<!fir.char<1,?>>>,offset:i64,initialization:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>}>>>>,special:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTspecialbinding{which:i8,isargdescriptorset:i8,istypebound:i8,specialcaseflag:i8,__padding0:!fir.array<4xi8>,proc:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>}>>>>,specialbitset:i32,hasparent:i8,noinitializationneeded:i8,nodestructionneeded:i8,nofinalizationneeded:i8,nodefinedassignment:i8,__padding0:!fir.array<3xi8>}>>>,lenvalue:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.array<7xi8>,value:i64}>>>>,bounds:!fir.box<!fir.ptr<!fir.array<?x?x!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.array<7xi8>,value:i64}>>>>,initialization:!fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>}>>>, !fir.ref<!fir.array<1x!fir.type<_QM__fortran_type_infoTcomponent{name:!fir.box<!fir.ptr<!fir.char<1,?>>>,genre:i8,category:i8,kind:i8,rank:i8,memoryspace:i8,__padding0:!fir.array<3xi8>,offset:i64,characterlen:!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.array<7xi8>,value:i64}>,derived:!fir.box<!fir.ptr<!fir.type<_QM__fortran_type_infoTderivedtype{binding:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTbinding{proc:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>,name:!fir.box<!fir.ptr<!fir.char<1,?>>>}>>>>,name:!fir.box<!fir.ptr<!fir.char<1,?>>>,sizeinbytes:i64,uninstantiated:!fir.box<!fir.ptr<!fir.type<_QM__fortran_type_infoTderivedtype>>>,kindparameter:!fir.box<!fir.ptr<!fir.array<?xi64>>>,lenparameterkind:!fir.box<!fir.ptr<!fir.array<?xi8>>>,component:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTcomponent>>>>,procptr:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTprocptrcomponent{name:!fir.box<!fir.ptr<!fir.char<1,?>>>,offset:i64,initialization:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>}>>>>,special:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTspecialbinding{which:i8,isargdescriptorset:i8,istypebound:i8,specialcaseflag:i8,__padding0:!fir.array<4xi8>,proc:!fir.type<_QM__fortran_builtinsT__builtin_c_funptr{__address:i64}>}>>>>,specialbitset:i32,hasparent:i8,noinitializationneeded:i8,nodestructionneeded:i8,nofinalizationneeded:i8,nodefinedassignment:i8,__padding0:!fir.array<3xi8>}>>>,lenvalue:!fir.box<!fir.ptr<!fir.array<?x!fir.type<_QM__fortran_type_infoTvalue{genre:i8,__padding0:!fir.arr
# | ...
# `---data was truncated (10240/28495) (change limit with -D output_limit=N)
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the Mlir-commits mailing list