[libc-commits] [libc] [libc] Make `BigInt` bitwise shift consistent with regular integral semantics. (PR #87762)

via libc-commits libc-commits at lists.llvm.org
Fri Apr 5 09:41:01 PDT 2024


================
@@ -122,15 +122,17 @@ template <size_t Bits> struct DyadicFloat {
 
     int exp_lo = exp_hi - static_cast<int>(PRECISION) - 1;
 
-    MantissaType m_hi(mantissa >> shift);
+    MantissaType m_hi =
+        shift >= MantissaType::BITS ? MantissaType(0) : mantissa >> shift;
----------------
lntue wrote:

Thanks, I'll take a look.

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


More information about the libc-commits mailing list