[PATCH] D124763: [InstCombine] Fold A + (B & ~A) to A | B

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 09:46:59 PDT 2022


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

In D124763#3485962 <https://reviews.llvm.org/D124763#3485962>, @nikic wrote:

> Implement as part of `haveNoCommonBitsSet()` instead.
>
> The second pattern (canonical form for constants) doesn't get fully folded in this case, so this will require an additional `or` fold. But that seems like something we'd want to do anyway.

Thanks - LGTM.


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

https://reviews.llvm.org/D124763



More information about the llvm-commits mailing list