[libcxx-commits] [libcxx] [libcxx] Use generic builtins for popcount, clz and ctz (PR #86563)

Nick Desaulniers via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 25 13:47:35 PDT 2024


https://github.com/nickdesaulniers commented:

Consider that if the compiler has support for that builtin, `__countl_zero` itself could be implemented almost entirely in terms of a call to `__builtin_clzg`.

Same for `__countr_zero` / `__builtin_ctzg`, and `popcount`/ `__builtin_popcountg`.

https://github.com/llvm/llvm-project/pull/86563


More information about the libcxx-commits mailing list