[mlir][NFC] Use `BaseMemRefType::isValidElementType` in Parser

Instead of hard-coded check.

Reviewed By: ftynse, rriddle

Differential Revision: https://reviews.llvm.org/D97612
This commit is contained in:
Vladislav Vinogradov 2021-02-27 14:08:43 +03:00
parent b6ac26fce5
commit e3b350ce83
1 changed files with 1 additions and 2 deletions

View File

@ -219,8 +219,7 @@ Type Parser::parseMemRefType() {
return nullptr;
// Check that memref is formed from allowed types.
if (!elementType.isIntOrIndexOrFloat() &&
!elementType.isa<VectorType, ComplexType>())
if (!BaseMemRefType::isValidElementType(elementType))
return emitError(typeLoc, "invalid memref element type"), nullptr;
// Parse semi-affine-map-composition.