abseil / abseil/abseil-cpp

Shall the workaround for llvm.38289 be removed?

Open
#1,205 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
18.1k
Forks
3.2k
Avg merge
20h 36m
Merged PRs (30d)
1

Description

**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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.