[llvm] [InstCombine] Fold `(X==Z || Y==Z) ? (X==Z && Y==Z) : X==Y --> X==Y` (PR #108619)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 08:16:02 PDT 2024


https://github.com/nikic commented:

It looks like InstCombine canonicalizes this to something like `(X == Z) ? (Y == Z) : !(Y == Z) && X == Y)`, see https://alive2.llvm.org/ce/z/XY_HMX. Shouldn't we be matching that pattern instead?

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


More information about the llvm-commits mailing list