================ @@ -1825,11 +1843,17 @@ LogicalResult DistributeOp::verify() { return emitOpError() << "must be a loop wrapper"; if (LoopWrapperInterface nested = getNestedWrapper()) { + if (!llvm::cast<ComposableOpInterface>(getOperation()).isComposite()) + return emitError() + << "'omp.composite' attribute missing from composite wrapper"; // Check for the allowed leaf constructs that may appear in a composite // construct directly after DISTRIBUTE. if (!isa<ParallelOp, SimdOp>(nested)) return emitError() << "only supported nested wrappers are 'omp.parallel' " "and 'omp.simd'"; + } else if (llvm::cast<ComposableOpInterface>(getOperation()).isComposite()) { ---------------- skatrak wrote:
This is fine, because when `distribute` is part of a composite construct it always has other leaf constructs after it (we don't have to consider the case of it being the last leaf). Same situation with `taskloop`. https://github.com/llvm/llvm-project/pull/102341 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits