abseil / abseil/abseil-cpp

Shall the workaround for llvm.38289 be removed?

未关闭
#1,205 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
C++
星标
18.1k
派生
3.2k
平均合并
20 小时 36 分钟
30 天内合并 PR
1

描述

**Describe the bug**

I notice several workarounds for llvm.38289:

https://github.com/abseil/abseil-cpp/blob/9eff97861b88999428d1254f95c83d94a2e95944/absl/numeric/int128.cc
// 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.
uint128 MakeUint128FromFloat(long double v) {...

https://github.com/abseil/abseil-cpp/blob/1ae9b71c474628d60eb251a3f62967fe64151bb2/absl/strings/internal/str_format/float_conversion.cc
#if defined(__clang__) && !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.
(!std::is_same::value ||
!std::is_same::value) &&
#endif

This compiler bug is already fixed: https://bugs.llvm.org/show_bug.cgi?id=38289
Shall these workarounds be removed?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。