[llvm] [IPSCCP] Do not attempt `tryToReplaceWithConstant` if may break invariants (PR #102820)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 09:04:13 PDT 2024


nikic wrote:

> > Propagating the constant isn't useful only for DCE, it can also enable other optimizations that now work on a global variable instead of on an opaque value.
> 
> Is this also the case when the called function may abort? From #102791, this looks idiosyncratic to me.

Of course, the effects of the function are not important in this context.

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


More information about the llvm-commits mailing list