[clang] [llvm] [SROA] Fix assertion failure when promoting self-referential load/store (PR #208826)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 12 13:54:38 PDT 2026


nikic wrote:

> This looks reasonable to me. The real shocker though is I had no idea LLVM will allow IR where a definition doesn't dominate all its uses, if the use is in an unreachable basic block. I guess if there is a use in an unreachable basic block and the definition is outside then this is fine, but I find this really unexpected that if both are in the same basic block we don't validate this. @nikic what do you think?

Definitions always dominate uses -- but unreachable code dominates everything, including itself.

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


More information about the cfe-commits mailing list