Skip to content

Commit 6f8274f

Browse files
krishna2803Icohedron
authored andcommitted
[libc][stdfix] Fix buildbot failure because of a typo. (llvm#126291)
Fix build-bot failure caused by llvm#125356
1 parent 7c61a40 commit 6f8274f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

libc/src/__support/fixed_point/fx_bits.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,11 @@ countls(T f) {
187187
constexpr int CONTAIN_LEN = cpp::numeric_limits<BitType>::digits;
188188
constexpr int PADDING_LEN = CONTAIN_LEN - FXRep::TOTAL_LEN;
189189

190-
if constexpr (FXRep::SIGN_LEN != 0) {
191-
if (x < 0)
192-
x = bit_not(x);
193-
}
190+
if constexpr (FXRep::SIGN_LEN != 0)
191+
if (f < 0)
192+
f = bit_not(f);
194193

195-
BitType value_bits = FXBits(x)::get_bits();
194+
BitType value_bits = FXBits(f)::get_bits();
196195
return cpp::countl_zero(value_bits) - PADDING_LEN;
197196
}
198197

0 commit comments

Comments
 (0)