[flang-commits] [flang] [llvm] [mlir] [flang][OpenMP] Lower target in_reduction (PR #199967)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Tue Jul 14 05:30:32 PDT 2026


================

----------------
skatrak wrote:

This is a suggestion to better explain the logic of this. Feel free to rewrite it in a different way, but it's important to convey the fact that it is a workaround and not that we intend to generally allow matching different values.
```suggestion
/// result of the same defining op. At this stage, we can only enforce exact value
/// identity for block arguments, which have no defining op, because Flang emits
/// `hlfir.declare`#0 for `in_reduction` operands and `hlfir.declare`#1 for `map` var_ptr.
/// These eventually collapse into the same value when lowered, but we cannot enforce
/// it here.
```

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


More information about the flang-commits mailing list