[InstCombine] Add folds for (icmp eq/ne (and (add/sub/xor A, P2), P2), 0/P2)
- `(icmp eq/ne (and (add/sub/xor X, P2), P2), P2)`
-> `(icmp eq/ne (and X, P2), 0)`
- `(icmp eq/ne (and (add/sub/xor X, P2), P2), 0)`
-> `(icmp eq/ne (and X, P2), P2)`
Folds like this come up with reasonable regularity in odd/even loops.
Proofs: https://alive2.llvm.org/ce/z/45pq2x
Closes #67836
parent
731bdcef
Please register or sign in to comment