diff options
author | Copybara-Service <copybara-worker@google.com> | 2023-02-14 11:04:36 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-02-14 11:04:36 -0800 |
commit | ae2f0378dc0e8c10e1e12b6d866568682bde684c (patch) | |
tree | 0ae3255edfc52c7ae67065eebfa481768a4c5ea2 /absl/numeric | |
parent | d6a45e95ab515b55a2437835fdd5873c6572131d (diff) | |
parent | b7a8491fbd90b7de010b5e7f74e09996520f3e61 (diff) |
Merge pull request #1387 from AtariDreams:patch-1
PiperOrigin-RevId: 509581648
Change-Id: Ia60053f1172e0e64569e9555524812fc4788e24f
Diffstat (limited to 'absl/numeric')
-rw-r--r-- | absl/numeric/int128.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/numeric/int128.cc b/absl/numeric/int128.cc index e5526c6f..3f5d26c9 100644 --- a/absl/numeric/int128.cc +++ b/absl/numeric/int128.cc @@ -111,7 +111,7 @@ uint128 MakeUint128FromFloat(T v) { return MakeUint128(0, static_cast<uint64_t>(v)); } -#if defined(__clang__) && !defined(__SSE3__) +#if defined(__clang__) && (__clang_major__ < 9) && !defined(__SSE3__) // Workaround for clang bug: https://bugs.llvm.org/show_bug.cgi?id=38289 // Casting from long double to uint64_t is miscompiled and drops bits. // It is more work, so only use when we need the workaround. @@ -131,7 +131,7 @@ uint128 MakeUint128FromFloat(long double v) { return (static_cast<uint128>(w0) << 100) | (static_cast<uint128>(w1) << 50) | static_cast<uint128>(w2); } -#endif // __clang__ && !__SSE3__ +#endif // __clang__ && (__clang_major__ < 9) && !__SSE3__ } // namespace uint128::uint128(float v) : uint128(MakeUint128FromFloat(v)) {} |