[Mlir-commits] [mlir] [mlir][bufferization] skip empty tensor elimination if they have different element type (PR #96998)
Matthias Springer
llvmlistbot at llvm.org
Fri Jun 28 00:34:58 PDT 2024
================
@@ -152,6 +152,9 @@ LogicalResult mlir::bufferization::eliminateEmptyTensors(
if (emptyTensorOp == replacement.getDefiningOp())
continue;
if (replacement.getType() != v.getType()) {
+ if (ShapeAdaptor(replacement.getType()).getElementType() !=
----------------
matthias-springer wrote:
We usually write `cast<ShapedType>(replacement.getType()).getElementType()` instead of `ShapeAdaptor`.
https://github.com/llvm/llvm-project/pull/96998
More information about the Mlir-commits
mailing list