Skip to content

Conversation

@legrosbuffle
Copy link
Contributor

This reverts commit 2f869c4.

Breaks build on some configurations

@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Clement Courbet (legrosbuffle)

Changes

This reverts commit 2f869c4.

Breaks build on some configurations


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

1 Files Affected:

  • (modified) compiler-rt/lib/nsan/tests/NSanUnitTest.cpp (+8-3)
diff --git a/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp b/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp
index 73b59671fe07a..d121292c36682 100644
--- a/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp
+++ b/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp
@@ -43,8 +43,8 @@ template <typename FT, auto next> void TestFT() {
   ASSERT_EQ(GetULPDiff<FT>(-X, -Y), 3);
 
   // Values with larger differences.
-  static constexpr const __uint128_t MantissaSize =
-      __uint128_t{1} << FTInfo<FT>::kMantissaBits;
+  static constexpr const __sanitizer::u64 MantissaSize =
+      __sanitizer::u64{1} << FTInfo<FT>::kMantissaBits;
   ASSERT_EQ(GetULPDiff<FT>(1.0, next(2.0, 1.0)), MantissaSize - 1);
   ASSERT_EQ(GetULPDiff<FT>(1.0, 2.0), MantissaSize);
   ASSERT_EQ(GetULPDiff<FT>(1.0, next(2.0, 3.0)), MantissaSize + 1);
@@ -57,6 +57,11 @@ TEST(NSanTest, Double) {
   TestFT<double, static_cast<double (*)(double, double)>(nextafter)>();
 }
 
-TEST(NSanTest, Float128) { TestFT<__float128, nextafterf128>(); }
+TEST(NSanTest, Float128) {
+  // Very basic tests. FIXME: improve when we have nextafter<__float128>.
+  ASSERT_EQ(GetULPDiff<__float128>(0.0, 0.0), 0);
+  ASSERT_EQ(GetULPDiff<__float128>(-0.0, 0.0), 0);
+  ASSERT_NE(GetULPDiff<__float128>(-0.01, 0.01), kMaxULPDiff);
+}
 
 } // end namespace __nsan

@legrosbuffle legrosbuffle merged commit cc22c9c into main Oct 28, 2025
8 of 12 checks passed
@legrosbuffle legrosbuffle deleted the revert-165248-nsan-fp128 branch October 28, 2025 13:38
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…65391)

This reverts commit 2f869c4.

Breaks build on some configurations
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…65391)

This reverts commit 2f869c4.

Breaks build on some configurations
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
…65391)

This reverts commit 2f869c4.

Breaks build on some configurations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants