diff --git a/mlir/include/mlir/IR/StandardTypes.h b/mlir/include/mlir/IR/StandardTypes.h --- a/mlir/include/mlir/IR/StandardTypes.h +++ b/mlir/include/mlir/IR/StandardTypes.h @@ -330,7 +330,7 @@ // element type within that dialect. return type.isa() || type.isa() || type.isa() || type.isa() || - type.isa() || + type.isa() || type.isa() || (type.getKind() > Type::Kind::LAST_STANDARD_TYPE); } @@ -342,8 +342,8 @@ }; /// Ranked tensor types represent multi-dimensional arrays that have a shape -/// with a fixed number of dimensions. Each shape element can be a non-negative -/// integer or unknown (represented by -1). +/// with a fixed number of dimensions. Each shape element can be a positive +/// integer or unknown (represented -1). class RankedTensorType : public Type::TypeBase { @@ -416,8 +416,8 @@ /// MemRef types represent a region of memory that have a shape with a fixed /// number of dimensions. Each shape element can be a non-negative integer or -/// unknown (represented by -1). MemRef types also have an affine map -/// composition, represented as an array AffineMap pointers. +/// unknown (represented by any negative integer). MemRef types also have an +/// affine map composition, represented as an array AffineMap pointers. class MemRefType : public Type::TypeBase { public: diff --git a/mlir/test/IR/invalid.mlir b/mlir/test/IR/invalid.mlir --- a/mlir/test/IR/invalid.mlir +++ b/mlir/test/IR/invalid.mlir @@ -23,10 +23,6 @@ func @indexmemref(memref) -> () // expected-error {{invalid memref element type}} -// ----- - -func @indextensor(tensor<4 x index>) -> () // expected-error {{invalid tensor element type}} - // ----- // Test no map in memref type. func @memrefs(memref<2x4xi8, >) // expected-error {{expected list element}}