[llvm] [InstCombine] Make the `(icmp eq/ne (and X, Y), X)` canonicalization work for non-const operands (PR #84688)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 00:40:16 PDT 2024


goldsteinn wrote:

> The first two commits LGTM. I don't think we need the last one. The cases it improves look very artificial to me (there's basically an extra-use not hanging around that can get reused -- we could cook up test cases like this for other transforms as well, but I doubt they're relevant). If you do want to have that one, I think it's best to make a separate PR so @dtcxzyw can check whether the problematic patterns occur in the wild. But in the meantime I don't mind regressing them.

Done, see: https://github.com/llvm/llvm-project/pull/93656

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


More information about the llvm-commits mailing list