[PATCH] D34244: [InstCombine] Fold (!iszero(A & K1) & !iszero(A & K2)) -> (A & (K1 | K2)) == (K1 | K2) if K1 and K2 are a 1-bit mask

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 11:52:17 PDT 2017


spatel added a comment.

In https://reviews.llvm.org/D34244#781501, @craig.topper wrote:

> Will do.
>
> Can I change foldOrOfIcmps to take CxtI by reference so we discourage anyone from passing nullptr.


I have no objections. I'd go full-strength and fix all of the params to be refs in all of the related functions, so everything is uniform. :)
I'd really like to refactor (And/Or)OfICmps, so we have the deMorgan'd versions of each fold together or adjacent. That way, we'll more easily know what's missing from either side.


https://reviews.llvm.org/D34244





More information about the llvm-commits mailing list