[Mlir-commits] [mlir] [OpenMP] Enable simd in non-reduction composite constructs (PR #146097)
Sergio Afonso
llvmlistbot at llvm.org
Wed Jul 2 03:25:38 PDT 2025
skatrak wrote:
> The current behaviour is that if we have simd with one of those clauses in a composite construct, then simd gets ignored along with the clauses. Are you saying we should do the same for standalone simd? That would effectively make standalone simd with one of said clauses a no-op.
What I'm suggesting is not making `simd` a no-op in any of these cases. Instead, to warn about missing support for `reduction` and `if` clauses if they are present, but still process the construct. That would be handled by making some slight changes to `checkImplementationStatus` and by forwarding `reduction` arguments, rather than calling `convertIgnoredWrapper` (we would only want to call that one when compiling for the device, at least for now). And we would do this for both standalone and composite `simd`.
I'm fine with something else if this is not the behavior that we want. I'm just thinking that this would remove the current divergence between the handling of standalone and composite `simd` while being flexible enough to not trigger not-yet-implemented errors for constructs like `!$omp do simd reduction(...)` or `!$omp distribute parallel do simd if(...)`, even though that means `!$omp simd if(.false.)` would just result in a warning and always producing vector code.
https://github.com/llvm/llvm-project/pull/146097
More information about the Mlir-commits
mailing list