[llvm] [SCEV] Simplify SCEVExpr for PHI to SCEV for operand if operands are identical (PR #115945)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 02:20:49 PST 2024


https://github.com/nikic commented:

This looks somewhat iffy -- SCEV really shouldn't be going this kind of instruction comparison, that's the job of instruction hoisting. Of course, we have some weaknesses that prevent it from working in your example. I believe https://github.com/llvm/llvm-project/pull/78615 would fix it, but it's a tricky change. If this is common/important in practice, working around the issue in SCEV is an option.

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


More information about the llvm-commits mailing list