diff --git a/lib/Dialect/mhlo/IR/hlo_ops.cc b/lib/Dialect/mhlo/IR/hlo_ops.cc index 3715c41..e5fc65d 100644 --- a/lib/Dialect/mhlo/IR/hlo_ops.cc +++ b/lib/Dialect/mhlo/IR/hlo_ops.cc @@ -1468,7 +1468,7 @@ static LogicalResult Verify(PadOp op) { static LogicalResult Verify(ReshapeOp op) { // If the operand type is dynamically shaped there is nothing to verify. - auto operand_ty = op.operand().getType().cast(); + auto operand_ty = op.operand().getType().dyn_cast(); if (!operand_ty || !operand_ty.hasStaticShape()) return success(); // If the operand type is statically shaped (not required) the number of