[PATCH] D89346: [SelectionDAG][X86] Enable SimplifySetCC CTPOP transforms for vector splats

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 06:03:46 PDT 2020


spatel added reviewers: fhahn, pengfei.
spatel added a comment.

In D89346#2334399 <https://reviews.llvm.org/D89346#2334399>, @bkramer wrote:

> I have no memory of adding that transformation 9 years ago. `dec` + `test` should be better than `popcnt` + `cmp` even on modern x86, but with no data to back that up it might not matter at all.

Similar to discussion in D89479 <https://reviews.llvm.org/D89479> - I think characterization of x86 BMI perf is not universal. Slow bit-manipulation instructions seem to be limited to Intel CPUs now; AMD has had full-speed popcnt/lzcnt for multiple generations according to Agner's docs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89346/new/

https://reviews.llvm.org/D89346



More information about the llvm-commits mailing list