Only vectors or tensors can be constant splats (or element attrs). This is in preparation for making MemRef subclass ShapedType
--
PiperOrigin-RevId:
250586281
if (type.isa<IntegerType>()) {
return attr_value_binder<IntegerAttr>(bind_value).match(attr);
}
- if (type.isa<ShapedType>()) {
+ if (type.isa<VectorType>() || type.isa<RankedTensorType>()) {
if (auto splatAttr = attr.dyn_cast<SplatElementsAttr>()) {
return attr_value_binder<IntegerAttr>(bind_value)
.match(splatAttr.getValue());