We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de0abc0 commit afc2639Copy full SHA for afc2639
mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp
@@ -22,9 +22,9 @@ using namespace mlir;
22
static bool isLessThanTargetBitWidth(Operation *op, unsigned targetBitWidth) {
23
auto resultTypes = op->getResultTypes();
24
for (auto resType : resultTypes) {
25
- VectorType vecType = cast<VectorType>(resType);
+ VectorType vecType = dyn_cast<VectorType>(resType);
26
// Reject index since getElementTypeBitWidth will abort for Index types.
27
- if (vecType.getElementType().isIndex())
+ if (!vecType || vecType.getElementType().isIndex())
28
return false;
29
unsigned trailingVecDimBitWidth =
30
vecType.getShape().back() * vecType.getElementTypeBitWidth();
0 commit comments