[flang-commits] [flang] [mlir] [flang][OpenMP] Lower target in_reduction for host fallback (PR #199967)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Tue Jun 23 06:55:11 PDT 2026


================
@@ -436,7 +436,7 @@ module attributes {omp.is_target_device = true} {
     omp.target allocate(%ref : !fir.ref<i32> -> %ref : !fir.ref<i32>)
                depend(taskdependin -> %ref : !fir.ref<i32>)
                device(%int : i32) if(%bool) thread_limit(%int : i32)
-               in_reduction(@reduction %ref -> %arg0 : !fir.ref<i32>)
+               in_reduction(@reduction %ref : !fir.ref<i32>)
----------------
skatrak wrote:

Shouldn't there be a `map_entries(%ref...)` to match the `in_reduction`? If a byref map is a requirement for an `in_reduction` operand, then that should be ensured by the `TargetOp` verifier.

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


More information about the flang-commits mailing list