Maetveis wrote: > Running both mem2reg and sroa is redunant; just run sroa. > > If the undefs are getting introduced by sroa, that's fine; they'll go away when we fix sroa. Okay, thanks. I've updated the PR to remove explicit mem2reg. https://github.com/llvm/llvm-project/pull/131925