[llvm-branch-commits] [flang] [mlir] [flang][OpenMP] Lower target in_reduction for host fallback (PR #199967)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 8 06:00:51 PDT 2026
================
@@ -490,7 +490,11 @@ static LogicalResult checkImplementationStatus(Operation &op) {
.Case([&](omp::TargetOp op) {
checkAllocate(op, result);
checkBare(op, result);
- checkInReduction(op, result);
+ // in_reduction(byref(...)) on target is not implemented yet. Other
+ // unsupported in_reduction shapes (cleanup region, two-argument
+ // initializer, missing combiner) and the device-side / offload-entry
+ // cases are diagnosed inline in convertOmpTarget.
+ checkInReductionByref(op, result);
----------------
skatrak wrote:
Nit: The convention here is to have a single lambda for each clause, call it for every op that has some not yet implemented edge case related to that clause, and then in the lambda potentially make different checks based on the operation itself.
I'm not sure when `checkInReductionByref` was introduced, but it should be `checkInReduction`, and base the byref-only check on the operation that called it.
https://github.com/llvm/llvm-project/pull/199967
More information about the llvm-branch-commits
mailing list