Files
llvm/libcxx/include/__bit
Alcaro 274a4c0c03 [libc++] Optimize std::has_single_bit (#133063)
Clang translates most implementations of has_single_bit to `(v ^ (v-1))
> v-1` - except the one definition libc++ actually uses.

Proof of correctness: https://godbolt.org/z/d61bxW4r1

(Could also be fixed by teaching Clang to optimize better, but making
source match output feels clearer to me. And it improves unoptimized
performance.)
2025-11-21 13:59:38 +01:00
..