matthias-springer wrote: Feel free to take a took. But I think we're going to have to extend the buffer deallocation pass in some way (to make sure that we pick the correct insertion point for the dealloc op) https://github.com/llvm/llvm-project/pull/137589