[all-commits] [llvm/llvm-project] 3dabee: [ADT] Simplify popcount with constexpr if (NFC) (#...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sun Jun 8 22:38:13 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3dabeed837c20b0664f7772247a08d4fddab8737
      https://github.com/llvm/llvm-project/commit/3dabeed837c20b0664f7772247a08d4fddab8737
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-06-08 (Sun, 08 Jun 2025)

  Changed paths:
    M llvm/include/llvm/ADT/bit.h

  Log Message:
  -----------
  [ADT] Simplify popcount with constexpr if (NFC) (#143339)

Without this patch, we implement 4-byte and 8-byte popcount as
structs.

This patch replaces the template trick with constexpr if, putting the
entire logic in the body of popcount.



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