[llvm] d4ec8ea - [InstCombine] ctpop(X) + ctpop(Y) => ctpop(X | Y) if X and Y have no common bits (PR48999)
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 24 11:48:14 PDT 2021
On Sat, Apr 24, 2021 at 08:52:20AM -0700, Dávid Bolvanský via llvm-commits wrote:
>
> Author: Dávid Bolvanský
> Date: 2021-04-24T17:52:10+02:00
> New Revision: d4ec8ea19cb1c944f70b584b2bdb8a12ea875261
>
> URL: https://github.com/llvm/llvm-project/commit/d4ec8ea19cb1c944f70b584b2bdb8a12ea875261
> DIFF: https://github.com/llvm/llvm-project/commit/d4ec8ea19cb1c944f70b584b2bdb8a12ea875261.diff
>
> LOG: [InstCombine] ctpop(X) + ctpop(Y) => ctpop(X | Y) if X and Y have no common bits (PR48999)
Would it make sense to slightly generalize this into:
ctpop(X) + ctpop(Y) => ctpop(X|Y) - ctpop(X&Y)
if X&Y is known to be constant?
Joerg
More information about the llvm-commits
mailing list