[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

Jay Foad via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 15 03:52:07 PDT 2026


jayfoad wrote:

InstCombine does this:
```
// C - ctpop(X) => ctpop(~X) if C is bitwidth
```
So shouldn't this selection patch match `(ctpop (not $src0))` instead?

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


More information about the cfe-commits mailing list