[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
================
@@ -3166,14 +3189,32 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
if (auto refType = mlir::dyn_cast<fir::ReferenceType>(baseOp.getType()))
eleType = refType.getElementType();
+ // `target in_reduction` list items must keep the original variable
----------------
skatrak wrote:
Nit: This is an odd place/way of making this note. Everywhere else in the lambda, we're working in terms of a more generic `forceAddressPreserving` flag, and its correspondence with the particular `in_reduction` case is described in the lambda's global comment.
Talking about `in_reduction` directly in here can be confusing, so I'd probably suggest removing this comment as it echoes what's already described above. If you feel like this clarification is important, I'd suggest at least trying to make it in terms of the flag.
https://github.com/llvm/llvm-project/pull/199967
More information about the flang-commits
mailing list