[Mlir-commits] [mlir] [OpenMP] Enable simd in non-reduction composite constructs (PR #146097)
Kajetan Puchalski
llvmlistbot at llvm.org
Mon Jun 30 04:08:55 PDT 2025
================
@@ -2847,11 +2847,8 @@ convertOmpSimd(Operation &opInst, llvm::IRBuilderBase &builder,
llvm::OpenMPIRBuilder *ompBuilder = moduleTranslation.getOpenMPBuilder();
auto simdOp = cast<omp::SimdOp>(opInst);
- // TODO: Replace this with proper composite translation support.
- // Currently, simd information on composite constructs is ignored, so e.g.
- // 'do/for simd' will be treated the same as a standalone 'do/for'. This is
- // allowed by the spec, since it's equivalent to using a SIMD length of 1.
- if (simdOp.isComposite()) {
+ // TODO: Replace this once simd + reduction is properly supported
+ if (simdOp.isComposite() && simdOp.getReductionByref().has_value()) {
----------------
mrkajetanp wrote:
They _should_ I suppose, but currently the lowering for this is broken so unless we ignore them here, the compiler will crash on any composite construct that has both reduction and simd.
https://github.com/llvm/llvm-project/pull/146097
More information about the Mlir-commits
mailing list