[InstCombine] ctpop(X) + ctpop(Y) => ctpop(X | Y) if X and Y have no common bits (PR48999)
For example: ``` int src(unsigned int a, unsigned int b) { return __builtin_popcount(a << 16) + __builtin_popcount(b >> 16); } int tgt(unsigned int a, unsigned int b) { return __builtin_popcount((a << 16) | (b >> 16)); } ``` Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D101210
Loading
Please sign in to comment