[PATCH] D45631: [InstCombine] Simplify 'xor'/'add' to 'or' if no common bits are set.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 15 09:23:13 PDT 2018


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

LGTM.

Note that for the value tracking improvement, there are a couple of other passes (that I've never looked at) that use haveNoCommonBitsSet(). If it's possible to show a test improvement from this change for those passes, that would be nice.

Also note that SelectionDAG has a twin for llvm::haveNoCommonBitsSet(), so it would be good to add a 'TODO' there about the potential improvement and referencing the IR version of the code. If you have the C++ template skills to unify any of that code, that would be a great maintenance improvement.


Repository:
  rL LLVM

https://reviews.llvm.org/D45631





More information about the llvm-commits mailing list