[llvm] [InstCombine] fold `(icmp eq/ne (or disjoint x, C0), C1)` -> `(icmp eq/ne x, C0^C1)` (PR #87734)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 7 09:59:32 PDT 2024


https://github.com/XChy commented:

If we phrase `(or disjoint x, C0) == C1` as `x + C0 == C1`, this fold is just like `x + C0 == C1`  -> `X == C1 - C0`: https://alive2.llvm.org/ce/z/aRk27g
Or we should put it in https://github.com/llvm/llvm-project/blob/c91254db1dcace869f4d3f1ac659bdd7700a1459/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp#L3441, so that we could handle it easier?

https://github.com/llvm/llvm-project/pull/87734


More information about the llvm-commits mailing list