[libc-commits] [PATCH] D149767: [libc] Revert rounding mode changes for hermetic tests
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed May 3 09:51:56 PDT 2023
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9e6946c2522a: [libc] Revert rounding mode changes for hermetic tests (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149767/new/
https://reviews.llvm.org/D149767
Files:
libc/test/UnitTest/RoundingModeUtils.cpp
Index: libc/test/UnitTest/RoundingModeUtils.cpp
===================================================================
--- libc/test/UnitTest/RoundingModeUtils.cpp
+++ libc/test/UnitTest/RoundingModeUtils.cpp
@@ -8,7 +8,7 @@
#include "RoundingModeUtils.h"
-#include "src/__support/FPUtil/FEnvImpl.h"
+#include <fenv.h>
namespace __llvm_libc {
namespace fputil {
@@ -34,15 +34,15 @@
}
ForceRoundingMode::ForceRoundingMode(RoundingMode mode) {
- old_rounding_mode = fputil::get_round();
+ old_rounding_mode = fegetround();
rounding_mode = get_fe_rounding(mode);
if (old_rounding_mode != rounding_mode)
- fputil::set_round(rounding_mode);
+ fesetround(rounding_mode);
}
ForceRoundingMode::~ForceRoundingMode() {
if (old_rounding_mode != rounding_mode)
- fputil::set_round(old_rounding_mode);
+ fesetround(old_rounding_mode);
}
} // namespace testing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149767.519137.patch
Type: text/x-patch
Size: 888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230503/9849b8c3/attachment.bin>
More information about the libc-commits
mailing list