[libc-commits] [libc] [libc][NFC] Unify `FPBits` implementations (PR #76033)
Clement Courbet via libc-commits
libc-commits at lists.llvm.org
Wed Dec 20 09:56:36 PST 2023
================
@@ -84,13 +84,12 @@ struct FPBits<long double>
}
LIBC_INLINE constexpr void set_sign(bool signVal) {
- bits &= ~SIGN_MASK;
- StorageType sign1 = StorageType(signVal) << (TOTAL_LEN - 1);
- bits |= sign1;
+ if (get_sign() != signVal)
----------------
legrosbuffle wrote:
Ah, right. I misread the code. There should probably be documentation for the function :) Or is it elsewhere and did I miss it somehow ? Also the name is misleading (but probably in a separate change ?)
https://github.com/llvm/llvm-project/pull/76033
More information about the libc-commits
mailing list