Skip to content
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] Fix fpbits test running 80bit ld everywhere #115937

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

michaelrj-google
Copy link
Contributor

After #115084 the 80 bit long double tests error if sizeof(long double)
isn't 96 or 128 bits. This caused failures in long double is double
systems (since long double is 64 bits) so I've disabled the 80 bit long
double tests on systems that don't use them.

After llvm#115084 the 80 bit long double tests error if sizeof(long double)
isn't 96 or 128 bits. This caused failures in long double is double
systems (since long double is 64 bits) so I've disabled the 80 bit long
double tests on systems that don't use them.
@llvmbot
Copy link
Member

llvmbot commented Nov 12, 2024

@llvm/pr-subscribers-libc

Author: Michael Jones (michaelrj-google)

Changes

After #115084 the 80 bit long double tests error if sizeof(long double)
isn't 96 or 128 bits. This caused failures in long double is double
systems (since long double is 64 bits) so I've disabled the 80 bit long
double tests on systems that don't use them.


Full diff: https://github.com/llvm/llvm-project/pull/115937.diff

1 Files Affected:

  • (modified) libc/test/src/__support/FPUtil/fpbits_test.cpp (+2)
diff --git a/libc/test/src/__support/FPUtil/fpbits_test.cpp b/libc/test/src/__support/FPUtil/fpbits_test.cpp
index edb04c24ae3876..6953d3aace58f3 100644
--- a/libc/test/src/__support/FPUtil/fpbits_test.cpp
+++ b/libc/test/src/__support/FPUtil/fpbits_test.cpp
@@ -124,6 +124,7 @@ TEST(LlvmLibcFPBitsTest, FPType_IEEE754_Binary128) {
       UInt128(Rep::quiet_nan()));
 }
 
+#ifdef LIBC_TYPES_LONG_DOUBLE_IS_X86_FLOAT80
 TEST(LlvmLibcFPBitsTest, FPType_X86_Binary80) {
   using Rep = FPRep<FPType::X86_Binary80>;
 
@@ -269,6 +270,7 @@ TEST(LlvmLibcFPBitsTest, FPType_X86_Binary80_IsNan) {
 #error "unhandled long double type"
 #endif
 }
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_X86_FLOAT80
 
 enum class FP {
   ZERO,

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Nov 12, 2024 via email

@michaelrj-google michaelrj-google merged commit 6aa7403 into llvm:main Nov 12, 2024
7 of 8 checks passed
@michaelrj-google michaelrj-google deleted the libcGuardFPBits branch November 12, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants