This increases the likelyhood x is single-use and is typically
easier to analyze.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM. Note that there is a conjugate or fold (same but with -1 instead of 0) that should be implemented for symmetry as well.
Comment Actions
Or better yet (icmp eq/ne (or x, C), x) -> (icmp eq/ne (and x, C), C): https://alive2.llvm.org/ce/z/m2R2jo
Then we get to reuse C instead of creating a new constant (and and is typically the easiest to analyze).
Works generically as well (I actually have it implemented in: D144610).
If you think this is enough motivation for D144610 I can rebase the series, otherwise I'll just implement here along side the current and code. LMK.