serge-sans-paille wrote: @fmayer I think I fixed the issue we've been discussing in the previous attempt (there was a typo in the phi node handling), would you mind giving this PR a try? thanks! https://github.com/llvm/llvm-project/pull/117849