[PATCH] D140850: [Patch 2/4]: Add optimizations for icmp eq/ne (mul(X, Y), 0)
    Noah Goldstein via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jan  4 09:09:58 PST 2023
    
    
  
goldstein.w.n added a comment.
In D140850#4025580 <https://reviews.llvm.org/D140850#4025580>, @nikic wrote:
> Proofs:
>
> Both odd: https://alive2.llvm.org/ce/z/9qgwMo
> One odd: https://alive2.llvm.org/ce/z/vRqUQO
> Non-zero nuw: https://alive2.llvm.org/ce/z/3Bqx2-
> Non-zero nsw: https://alive2.llvm.org/ce/z/AybG6r
>
> From the test diffs, I don't see any cases where we actually hit the true/false case. Presumably, this get's reliably handled by the "icmp eq isKnownNonZero, 0" fold in InstSimplify. If that's the case, we can omit handling for that.
We start hitting it in: https://reviews.llvm.org/D140851
See: `define i64 @mul_assume_V_oddV_s64_setz(i64 %v, i64 %other)`
Before then the missing cases in analysis was getting in the way. Could probably create a case where
it works at this patch. Would you like to add one?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140850/new/
https://reviews.llvm.org/D140850
    
    
More information about the llvm-commits
mailing list