[Mlir-commits] [mlir] [OpenMP] Enable simd in non-reduction composite constructs (PR #146097)

Sergio Afonso llvmlistbot at llvm.org
Tue Jul 1 08:15:46 PDT 2025


skatrak wrote:

> Currently not supported clauses are reduction, if, linear, nontemporal and order based on my testing. Of those, with the change I just pushed, both `if` and `reduction` are ignored with a warning.

I think that's a reasonable middle ground. My concern is that this still results in different handling for `!$omp {do, distribute} simd reduction(...)` vs `!$omp simd reduction(...)`. Would it be an issue to only emit warnings for `reduction` and `if` clauses when processing standalone `simd` constructs too?

That should only require small tweaks to the `checkImplementationStatus` function and forwarding reduction variables (our downstream fork [already does it](https://github.com/ROCm/llvm-project/blob/c0e62dd982bc4e46f095e27cec6b6994164f8138/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp#L2696C1-L2703C73), in case it serves as reference).

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


More information about the Mlir-commits mailing list