I find a workaround for llvm38289: https://github.com/WebKit/WebKit/blob/156d59fe06826ce27650093d1abfd566d9b667d4/Source/WTF/wtf/Int128.cpp // 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. static UInt128Impl MakeUInt128FromFloat(long double v) {... The compiler bug is marked as fixed:https://bugs.llvm.org/show_bug.cgi?id=38289 Shall the workarounds be removed?
This code was only added to WebKit 8 months ago. Of course, the minimum Xcode version supported is higher by 1 since then. But I don't know if the current minimum version has the fix.
<rdar://problem/96635267>