[Mlir-commits] [mlir] [mlir][bufferization] Fix crash when returning an allocation twice (PR #220232)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Sep 1 19:00:07 PDT 2026


================
@@ -168,7 +168,20 @@ updateReturnOps(func::FuncOp func, ArrayRef<BlockArgument> appendedEntryArgs,
     }
     OpBuilder builder(op);
     SmallVector<SmallVector<Value>> dynamicSizes;
+    SetVector<Operation *> toErase;
----------------
AkunCube wrote:

Added a comment explaining why the allocations are erased after processing all return operands.

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


More information about the Mlir-commits mailing list