[llvm] [InstCombine] fold `(a == 1 && b != 0) || (a != 0 && b == 0))` to `(a ==0) != (b == 0)` (PR #94915)

Pavel Skripkin via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 9 14:43:51 PDT 2024


pskrgag wrote:

Hello, @dtcxzyw!

I noticed that pattern during core review on my job and was curios if it can be optimized. IIRC the check was about `buffer == NULL` and `size == 0`.

I believe, it can be generalized. 

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


More information about the llvm-commits mailing list