Don't use ShapedType to indicate vector or tensor type

MemRefType may soon subclass ShapedType. ShapedType only guarantees that something has a shape (possibly dynamic), rank (or explicitly unranked), and fixed element type.

--

PiperOrigin-RevId: 250940537
This commit is contained in:
Geoffrey Martin-Noble 2019-05-31 13:01:45 -07:00 committed by Mehdi Amini
parent 37732b1759
commit 8eca4cc30d
1 changed files with 2 additions and 1 deletions

View File

@ -331,7 +331,8 @@ static ValueHandle createBinaryHandle(
return createBinaryHandle<IOp>(lhs, rhs);
} else if (thisType.isa<FloatType>()) {
return createBinaryHandle<FOp>(lhs, rhs);
} else if (auto aggregateType = thisType.dyn_cast<ShapedType>()) {
} else if (thisType.isa<VectorType>() || thisType.isa<TensorType>()) {
auto aggregateType = thisType.cast<ShapedType>();
if (aggregateType.getElementType().isa<IntegerType>())
return createBinaryHandle<IOp>(lhs, rhs);
else if (aggregateType.getElementType().isa<FloatType>())