[libc-commits] [libc] [libc][support][UInt] implement 128b math helpers (PR #86531)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Mar 25 10:39:47 PDT 2024


================
@@ -242,6 +242,14 @@ LIBC_INLINE constexpr To bit_or_static_cast(const From &from) {
 /// Count number of 1's aka population count or Hamming weight.
 ///
 /// Only unsigned integral types are allowed.
+// clang-19+, gcc-14+
+#if __has_builtin(__builtin_popcountg)
----------------
nickdesaulniers wrote:

Ah, should this be using `LIBC_HAS_BUILTIN`?

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


More information about the libc-commits mailing list