[Mlir-commits] [mlir] [mlir][bufferization] Introduce castBufferTypeFn hook and API (PR #205080)

Matthias Springer llvmlistbot at llvm.org
Tue Jun 30 23:50:19 PDT 2026


================
@@ -100,6 +100,20 @@ LogicalResult mlir::bufferization::foldToBufferToTensorPair(
     return success();
   }
 
+  if (!llvm::isa<BaseMemRefType>(srcType) ||
----------------
matthias-springer wrote:

`foldToBufferToTensorPair` is called from a canonicalization pattern. I wouldn't create a new alloc here. The current implementation looks fine: just propagate the error.

https://github.com/llvm/llvm-project/pull/205080


More information about the Mlir-commits mailing list