[llvm] [SCEV] Try to re-use existing LCSSA phis when expanding SCEVAddRecExpr. (PR #147214)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 06:46:53 PDT 2025


nikic wrote:

Or is the addrec expansion actually in the loop and the problem is that we currently don't support reusing expansions if they require LCSSA phi nodes due to https://github.com/fhahn/llvm-project/blob/8c8c5509e948130432d0b76ce7679a837cfa735c/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp#L1495-L1502 If that's the case, I think we should add support for that. Doesn't make sense to create a new expansion if all we need to do is (maybe) insert LCSSA phi nodes.

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


More information about the llvm-commits mailing list