[llvm] [SCEV] Preserve divisibility info when creating UMax/SMax expressions. (PR #160012)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 8 03:53:16 PDT 2025


https://github.com/fhahn commented:

> > The benefit of delaying is that we can delay the re-write until we collected information from all loop guards, making the code independent of the order of guards.
> 
> Is this relevant in practice?

I couldn't find a case where it mattered for now. I also updated the patch extend the existing DividesBy logic to use getConstantMultiple and to use that to preserve divisibility info. This also generalizes to work for any constant, not just one

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


More information about the llvm-commits mailing list