aheejin wrote: @pmatos Yes, replacing the mem2reg with this pass seems to work on all existing LLVM and Emscripten reference type tests. I am planning to upload the that, I mean the replacing, as a follow-up to this PR. https://github.com/llvm/llvm-project/pull/81965