[all-commits] [llvm/llvm-project] 9e3982: [libc++] Replace __libcpp_{ctz, clz} with __builti...

Peng Liu via All-commits all-commits at lists.llvm.org
Fri Apr 18 17:57:26 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9e3982d9ae8173171cd7247ee505e9c02079c6bf
      https://github.com/llvm/llvm-project/commit/9e3982d9ae8173171cd7247ee505e9c02079c6bf
  Author: Peng Liu <winner245 at hotmail.com>
  Date:   2025-04-18 (Fri, 18 Apr 2025)

  Changed paths:
    M libcxx/include/__algorithm/sort.h
    M libcxx/include/__bit/countl.h
    M libcxx/include/__bit/countr.h
    M libcxx/include/__bit_reference
    M libcxx/include/__charconv/to_chars_integral.h
    M libcxx/include/__charconv/traits.h
    M libcxx/include/__hash_table

  Log Message:
  -----------
  [libc++] Replace __libcpp_{ctz, clz} with __builtin_{ctzg, clzg} (#133920)

`__libcpp_{ctz, clz}` were previously used as fallbacks for `__builtin_{ctzg, clzg}` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_{ctzg, clzg}` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely  replace all instances of `__libcpp_{ctz, clz}` with `__count{l,r}_zero` (which internally call `__builtin_{ctzg, clzg}` and eliminate the fallback logic.

Closes #131179.



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