[llvm] [InstCombine] Fold `(icmp pred (trunc nuw/nsw X), C)` -> `(icmp pred X, (zext/sext C))` (PR #87935)
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr  9 01:57:52 PDT 2024
    
    
  
nikic wrote:
Generally fine, but before we start using trunc nuw/nsw in optimizations we need to perform some due diligence. Based on past experience, we very likely have folds that incorrectly preserve the nuw/nsw flag now.
Approach is basically 1. replace "trunc" with "trunc nuw" in existing tests, 2. check whether there are failures with alive2, 3. repeat with trunc nsw. Let me know if you would be interested in doing that...
https://github.com/llvm/llvm-project/pull/87935
    
    
More information about the llvm-commits
mailing list