[libcxx-commits] [libcxx] [libcxx] Use generic builtins for popcount, clz and ctz (PR #86563)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 26 11:29:38 PDT 2024
================
@@ -25,15 +25,27 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int __libcpp_clz(unsigned __x) _NOEXCEPT {
+#if __has_builtin(__builtin_clzg)
----------------
mordante wrote:
Please add comment at the top of the file with a TODO explaining that `__builtin_clzg` is available with
starting clang-19 and gcc-14. That should help is to know when we can enable the new builtins unconditionally.
https://github.com/llvm/llvm-project/pull/86563
More information about the libcxx-commits
mailing list