[llvm] [MemorySSA] Don't create phi nodes in fixupDefs() (PR #156021)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 08:33:36 PDT 2025


antoniofrighetto wrote:

Looking at https://github.com/llvm/llvm-project/issues/117157#issuecomment-3228624082, essentially the core issue is arising from the fact that the new MemoryPhi added during fixup via getPreviousDefRecursive is not accounted for in the initial IDF computation; and later happens not to be properly dominating the defining access (thus breaking the dominance invariant). I'm not clear though, why exactly is `8 = MemoryPhi({loop2.latch,9},{loop1.exit,6})` expected to dominate `2 = MemoryDef(1)`?

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


More information about the llvm-commits mailing list