[llvm] [SCEV] Check AR's wrap flags when expanding in non-post increment loops. (PR #77827)
    Florian Hahn via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jan 12 05:20:21 PST 2024
    
    
  
fhahn wrote:
> Does this code need to care about post-inc addrecs at all? At this point, we're expanding the (normalized) pre-inc addrec. If we introduce a post-inc use, then we'll explicitly clear the nowrap flags if necessary here (note that it checks S, not Normalized):
Yes I think that should be sufficient. I updated the PR to always check the AddRec flags; to avoid any regressions, I had to do it after the check in the wider type, as the SCEV construction there strengthens flags of some involved AddRecs as unfortunate side effect.
https://github.com/llvm/llvm-project/pull/77827
    
    
More information about the llvm-commits
mailing list