From 8eca4cc30dee9b31321cae9f577c957d279818b2 Mon Sep 17 00:00:00 2001 From: Geoffrey Martin-Noble Date: Fri, 31 May 2019 13:01:45 -0700 Subject: [PATCH] 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 --- mlir/lib/EDSC/Builders.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlir/lib/EDSC/Builders.cpp b/mlir/lib/EDSC/Builders.cpp index 5c17454f..22f91399 100644 --- a/mlir/lib/EDSC/Builders.cpp +++ b/mlir/lib/EDSC/Builders.cpp @@ -331,7 +331,8 @@ static ValueHandle createBinaryHandle( return createBinaryHandle(lhs, rhs); } else if (thisType.isa()) { return createBinaryHandle(lhs, rhs); - } else if (auto aggregateType = thisType.dyn_cast()) { + } else if (thisType.isa() || thisType.isa()) { + auto aggregateType = thisType.cast(); if (aggregateType.getElementType().isa()) return createBinaryHandle(lhs, rhs); else if (aggregateType.getElementType().isa()) -- 2.7.4