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

Marina Taylor via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 08:04:06 PDT 2024


citymarina wrote:

> This is really really specific, if it shows up in realworld code I'm not opposed to getting it in, but is there some generalization of the pattern we can make?

Oh, interesting. I was worried that there would be concern about having overgeneralized already (my original unpublished version just checked for constant 0, with no commutativity, etc.). I've tried to relax as many of the constraints as I could see; do you have anything specific in mind about how to take it further?

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


More information about the llvm-commits mailing list