-
Notifications
You must be signed in to change notification settings - Fork 15k
[nsan] More unit tests for float128.
#165248
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
Conversation
Now that llvm-libc has `nextafterf128`.
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Clement Courbet (legrosbuffle) ChangesNow that llvm-libc has Full diff: https://github.com/llvm/llvm-project/pull/165248.diff 1 Files Affected:
diff --git a/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp b/compiler-rt/lib/nsan/tests/NSanUnitTest.cpp
index d121292c36682..73b59671fe07a 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 __sanitizer::u64 MantissaSize =
- __sanitizer::u64{1} << FTInfo<FT>::kMantissaBits;
+ static constexpr const __uint128_t MantissaSize =
+ __uint128_t{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,11 +57,6 @@ TEST(NSanTest, Double) {
TestFT<double, static_cast<double (*)(double, double)>(nextafter)>();
}
-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);
-}
+TEST(NSanTest, Float128) { TestFT<__float128, nextafterf128>(); }
} // end namespace __nsan
|
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/13515 Here is the relevant piece of the build log for the reference |
|
I'm seeing Can you revert or fix-forward? |
Now that llvm-libc has `nextafterf128`.
Now that llvm-libc has `nextafterf128`.
Now that llvm-libc has
nextafterf128.