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

Marc Auberer via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 26 14:55:14 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)
----------------
marcauberer wrote:

Done. To all three files.

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


More information about the libcxx-commits mailing list