[llvm] [AggressiveInstCombine] POPCNT generation for bit-count pattern (PR #177109)

Rohit Aggarwal via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 02:35:25 PDT 2026


rohitaggarwal007 wrote:

> > > I reran the opt-benchmark on both of the PRs and neither are showing the changes that were originally reported.
> > > Looking back at your original commit, it matched ` x = (x & 0x07070707) + ((x >> 4) & 0x07070707);` instead of `x = (x & 0x0F0F0F0F) + ((x >> 4) & 0x0F0F0F0F);` I'm guessing InstCombine changed 0x0F0F0F0F to 0x07070707 before this pass runs.
> > 
> > 
> > Yes, you are right. InstCombine is changing the constant. What should we do then? Update the PR or create a new PR to handle this case.
> 
> I think we need to update the PR. Committing code that will never match isn't useful.

Sure, will work on it.

https://github.com/llvm/llvm-project/pull/177109


More information about the llvm-commits mailing list