[llvm] [SCEV][LV] Invalidate LCSSA exit phis more thoroughly (PR #69909)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 12:32:14 PST 2023


nikic wrote:

> Yep, addrecs where the main thing I was thinking about.
> 
> In theory, I think there may also be issues with constants (e.g. a lcssa phi with a constant value) where we would need to invalidate those uses once we add an incoming value. This may be mostly theoretical as those would be simplified elsewhere. Mostly curious how expensive invalidating addrecs and/or all roots would be

I don't think constants or similar are relevant here, because the change of the phi node still has to preserve its value. If it previously evaluated to a constant, it has to evaluate to the same constant afterwards as well. The value doesn't change, but the old representation of the value may no longer be valid.

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


More information about the llvm-commits mailing list