[all-commits] [llvm/llvm-project] 5b0101: [ADT] implement countl_zero_constexpr and reuse it...

Max Graey via All-commits all-commits at lists.llvm.org
Tue Mar 31 05:47:10 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b010134abd44bfe7543f89bb636852a5fa09a3b
      https://github.com/llvm/llvm-project/commit/5b010134abd44bfe7543f89bb636852a5fa09a3b
  Author: Max Graey <maxgraey at gmail.com>
  Date:   2026-03-31 (Tue, 31 Mar 2026)

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

  Log Message:
  -----------
  [ADT] implement countl_zero_constexpr and reuse it for countl_zero & bit_width_constexpr (#189111)

Implement constant evaluated `countl_zero_constexpr` similar to
`countr_zero_constexpr` and use it for `countl_zero` and
`bit_width_constexpr`.

Also, `countl_zero` now use fast intrinsic path for `uint8/uint16` types
(use `sizeof(T) <= 4` instead `sizeof(T) == 4`).



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