[all-commits] [llvm/llvm-project] ecfb5d: [libc][math] fix loose except check in `{EXPECT, AS...
Michael Flanders via All-commits
all-commits at lists.llvm.org
Mon May 6 06:05:44 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ecfb5d9951554d8bdb6a499c958f48cc35f78a88
https://github.com/llvm/llvm-project/commit/ecfb5d9951554d8bdb6a499c958f48cc35f78a88
Author: Michael Flanders <flanders.michaelk at gmail.com>
Date: 2024-05-06 (Mon, 06 May 2024)
Changed paths:
M libc/test/UnitTest/FPMatcher.h
M libc/test/src/math/RoundToIntegerTest.h
M libc/test/src/math/atanf_test.cpp
M libc/test/src/math/atanhf_test.cpp
M libc/test/src/math/smoke/NextAfterTest.h
M libc/test/src/math/smoke/NextTowardTest.h
M libc/test/src/math/smoke/RoundToIntegerTest.h
M libc/test/src/math/smoke/atan2f_test.cpp
M libc/test/src/math/smoke/atanf_test.cpp
M libc/test/src/math/smoke/atanhf_test.cpp
Log Message:
-----------
[libc][math] fix loose except check in `{EXPECT,ASSERT}_FP_EXCEPTION` macros (#88816)
Adds more FP test macros for the upcoming test adds for #61092 and the
issues opened from it: #88768, #88769, #88770, #88771, #88772.
Fix bug in `{EXPECT,ASSERT}_FP_EXCEPTION`. `EXPECT_FP_EXCEPTION(0)`
seems to be used to test that an exception did not happen, but it always
does `EXPECT_GE(... & 0, 0)` which never fails.
Update and refactor tests that break after the above bug fix. An
interesting way things broke after the above change is that
`ForceRoundingMode` and `quick_get_round()` were raising the inexact
exception, breaking a lot of the `atan*` tests.
The changes for all files other than `FPMatcher.h` and
`libc/test/src/math/smoke/RoundToIntegerTest.h` should have the same
semantics as before. For `RoundToIntegerTest.h`, lines 56-58 before the
changes do not always hold since this test is used for functions with
different exception and errno behavior like `lrint` and `lround`. I've
deleted those lines for now, but tests for those cases should be added
for the different nearest int functions to account for this.
Adding @nickdesaulniers for review.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list