Skip to content

Commit e3b350c

Browse files
author
Vladislav Vinogradov
committed
[mlir][NFC] Use BaseMemRefType::isValidElementType in Parser
Instead of hard-coded check. Reviewed By: ftynse, rriddle Differential Revision: https://reviews.llvm.org/D97612
1 parent b6ac26f commit e3b350c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/lib/Parser/TypeParser.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ Type Parser::parseMemRefType() {
219219
return nullptr;
220220

221221
// Check that memref is formed from allowed types.
222-
if (!elementType.isIntOrIndexOrFloat() &&
223-
!elementType.isa<VectorType, ComplexType>())
222+
if (!BaseMemRefType::isValidElementType(elementType))
224223
return emitError(typeLoc, "invalid memref element type"), nullptr;
225224

226225
// Parse semi-affine-map-composition.

0 commit comments

Comments
 (0)