[libcxx-commits] [libcxx] [Ryu, performance] Use _BitScanForward64 more often, by fixing availability detection, avoiding calling _BitScanForward twice (PR #142000)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 11 06:03:57 PDT 2025
================
@@ -479,7 +479,7 @@ struct __floating_decimal_64 {
36893488u, 7378697u, 1475739u, 295147u, 59029u, 11805u, 2361u, 472u, 94u, 18u, 3u };
unsigned long _Trailing_zero_bits;
-#if _LIBCPP_HAS_BITSCAN64
+#if !defined(_MSC_VER) || defined(_M_AMD64) || defined(_M_ARM64) // we have own _BitScanForward64 for non-MSVC
----------------
philnik777 wrote:
Can't we just use `std::countr_zero`? That'd make the code below unnecessary and we can drop this condition altogether.
https://github.com/llvm/llvm-project/pull/142000
More information about the libcxx-commits
mailing list