summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp')
-rw-r--r--mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp
index 7c9114b284b2..f0f20b433937 100644
--- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp
@@ -77,6 +77,9 @@ struct CastOpInterface
}
// Replace the op with a memref.cast.
+ assert(memref::CastOp::areCastCompatible(resultBuffer->getType(),
+ resultMemRefType) &&
+ "CallOp::bufferize: cast incompatible");
replaceOpWithNewBufferizedOp<memref::CastOp>(rewriter, op, resultMemRefType,
*resultBuffer);