================ @@ -1749,10 +1755,18 @@ LogicalResult WsloopOp::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 DO/FOR. if (!isa<SimdOp>(nested)) return emitError() << "only supported nested wrapper is 'omp.simd'"; + + } else if (llvm::cast<ComposableOpInterface>(getOperation()).isComposite()) { ---------------- skatrak wrote:
I think this check doesn't cover all cases. For example, `distribute parallel do` would result in `omp.wsloop` being the last wrapper representing the composite construct. The check in this `else` should be: - If `isComposite()` and the parent op is not a loop wrapper: 'omp.composite' attribute present in non-composite wrapper. - If `!isComposite()` and the parent op is a loop wrapper: 'omp.composite' attribute missing from composite wrapper. 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