diff --git a/mlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp b/mlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp --- a/mlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp +++ b/mlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp @@ -175,6 +175,10 @@ Value arg = transformed.arg(); Type argTy = arg.getType(); + // For now, this lowering supports only error-free arguments. + if (argTy.isa()) + return failure(); + // For ranked tensors `shape_of` lowers to `std` and the pattern can be // found in the corresponding pass. if (argTy.isa())