diff --git a/mlir/lib/IR/BuiltinTypes.cpp b/mlir/lib/IR/BuiltinTypes.cpp --- a/mlir/lib/IR/BuiltinTypes.cpp +++ b/mlir/lib/IR/BuiltinTypes.cpp @@ -230,9 +230,9 @@ << "vector elements must be int/index/float type but got " << elementType; - if (any_of(shape, [](int64_t i) { return i <= 0; })) + if (any_of(shape, [](int64_t i) { return i < 0; })) return emitError() - << "vector types must have positive constant sizes but got " + << "vector types must have non-negative constant sizes but got " << shape; return success();