[llvm] [SCEV] Preserve divisibility info when creating UMax/SMax expressions. (PR #160012)
    Philip Reames via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 23 08:25:11 PDT 2025
    
    
  
preames wrote:
> Yep, I can try to see if this would also trigger in practice at construction, but we would still need the guard-specific logic w/o the != 0 check
Your wording here triggered a thought.  When phrased like this, this sounds *a lot* like SCEV construction under an assumption (or predicate) that x != 0.  We have a bunch of logic of this variety in PredicatedScalarEvolution, and our assumption handling already, is there a possibility for code sharing here?  
(This may not be worth the work to actually do immediately.  Not a blocking comment by any means.)
https://github.com/llvm/llvm-project/pull/160012
    
    
More information about the llvm-commits
mailing list