[Mlir-commits] [flang] [mlir] [openmp] [MLIR][OpenMP] Add scan reduction lowering to llvm (PR #167031)

Sergio Afonso llvmlistbot at llvm.org
Tue Nov 25 07:21:58 PST 2025


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

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

I think this check is not correct, for the same reason as another comment I made to OpenMP.cpp. When looking at a parent of `omp::WsloopOp` type, we're not making sure that wrapper applies to the same loop. Instead, we'd have to use `loopOp.collectWrappers` and find it there.

However, shouldn't we also allow `omp::SimdOp` as well as `omp::WsloopOp` here, if they have the corresponding `inscan` reduction modifier? Edit: I see that you're triggering a TODO for `simd` with `inscan`, though it appears to be handled in the lowering of `omp.simd`. Is this the only place where it isn't handled?

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


More information about the Mlir-commits mailing list