[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 11:04:22 PDT 2024


goldsteinn wrote:

> Given how the test cases show variables and not just constants, can this fold apply to variables too?

I don't think the fold is profitable if we can't constant fold the `xor`.

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


More information about the llvm-commits mailing list