[all-commits] [llvm/llvm-project] b563e7: [AArch64] Improve scalar and Neon popcount with SV...

Ricardo Jesus via All-commits all-commits at lists.llvm.org
Mon Jun 30 01:05:08 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b563e763065deb0bb5365a3dbdab283ae852dc7e
      https://github.com/llvm/llvm-project/commit/b563e763065deb0bb5365a3dbdab283ae852dc7e
  Author: Ricardo Jesus <rjj at nvidia.com>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/popcount.ll
    M llvm/test/CodeGen/AArch64/sve-fixed-length-bit-counting.ll

  Log Message:
  -----------
  [AArch64] Improve scalar and Neon popcount with SVE CNT. (#143870)

When available, we can use SVE's CNT instruction to improve the lowering
of scalar and fixed-length popcount (CTPOP) since the SVE instruction
supports types that the Neon variant doesn't.

For the scalar types, I see the following speedups on NVIDIA Grace CPU:
| size (bits) | before (Gibit/s) | after (Gibit/s) | speedup |
|------------:|-----------------:|----------------:|--------:|
|         32  |           75.20  |          86.79  |   1.15  |
|         64  |          149.87  |         173.70  |   1.16  |
|        128  |          158.56  |         164.88  |   1.04  |



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list