-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc][math][c23] Fix totalorderf128 requiring support for 128-bit ints #101229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc][math][c23] Fix totalorderf128 requiring support for 128-bit ints #101229
Conversation
@llvm/pr-subscribers-libc Author: OverMighty (overmighty) ChangesFull diff: https://github.com/llvm/llvm-project/pull/101229.diff 2 Files Affected:
diff --git a/libc/src/__support/FPUtil/BasicOperations.h b/libc/src/__support/FPUtil/BasicOperations.h
index 50f1e19e08d64..d68f3ae6a26bb 100644
--- a/libc/src/__support/FPUtil/BasicOperations.h
+++ b/libc/src/__support/FPUtil/BasicOperations.h
@@ -14,6 +14,7 @@
#include "dyadic_float.h"
#include "src/__support/CPP/type_traits.h"
+#include "src/__support/big_int.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
@@ -320,7 +321,7 @@ totalorder(T x, T y) {
StorageType x_u = x_bits.uintval();
StorageType y_u = y_bits.uintval();
- using signed_t = cpp::make_signed_t<StorageType>;
+ using signed_t = make_integral_or_big_int_signed_t<StorageType>;
signed_t x_signed = static_cast<signed_t>(x_u);
signed_t y_signed = static_cast<signed_t>(y_u);
diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt
index bfdfffb85c255..ea1e0e8b39d10 100644
--- a/libc/src/__support/FPUtil/CMakeLists.txt
+++ b/libc/src/__support/FPUtil/CMakeLists.txt
@@ -189,6 +189,7 @@ add_header_library(
.fp_bits
.fenv_impl
libc.src.__support.CPP.type_traits
+ libc.src.__support.big_int
libc.src.__support.uint128
libc.src.__support.common
libc.src.__support.macros.optimization
|
@@ -320,7 +321,7 @@ totalorder(T x, T y) { | |||
StorageType x_u = x_bits.uintval(); | |||
StorageType y_u = y_bits.uintval(); | |||
|
|||
using signed_t = cpp::make_signed_t<StorageType>; | |||
using signed_t = make_integral_or_big_int_signed_t<StorageType>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason make_integral_or_big_int_signed_t
was not used anywhere in LLVM libc. I'm guessing it used to be referenced by code that was changed.
cc @Jobhdez |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/2963 Here is the relevant piece of the build log for the reference:
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/4721 Here is the relevant piece of the build log for the reference:
|
No description provided.