[PATCH] D118539: [InstCombine] try to fold one-demanded-bit-of-multiply

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 29 10:19:51 PST 2022


spatel added a comment.

In D118539#3281894 <https://reviews.llvm.org/D118539#3281894>, @RKSimon wrote:

> I don't suppose this can handle D117995 <https://reviews.llvm.org/D117995>? If we can do this in SimplifyDemandedBits then we can add the knownbits fold with the additional NeverUndefOrPoison check.
>
> Otherwise I think I'll just add a (DemandedMask ==2 && X == Y) -> 0 special case.

Hmm, not sure if I understood the question. I'm not seeing how we'd do it other than a special-case here. The knownbits fold isn't going to work in general because of the potential undef input?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118539/new/

https://reviews.llvm.org/D118539



More information about the llvm-commits mailing list