[libc-commits] [libc] d249e67 - [libc][math] Disable `FEnvSafeTest.cpp` if AArch64 target has no FP support (#166370)
via libc-commits
libc-commits at lists.llvm.org
Wed Nov 5 03:14:07 PST 2025
Author: Victor Campos
Date: 2025-11-05T11:14:02Z
New Revision: d249e67a6a7c36a2ffcf08839810a8efa4603f18
URL: https://github.com/llvm/llvm-project/commit/d249e67a6a7c36a2ffcf08839810a8efa4603f18
DIFF: https://github.com/llvm/llvm-project/commit/d249e67a6a7c36a2ffcf08839810a8efa4603f18.diff
LOG: [libc][math] Disable `FEnvSafeTest.cpp` if AArch64 target has no FP support (#166370)
The `FEnvSafeTest.cpp` test fails on AArch64 soft nofp configurations
because LLVM libc does not provide a floating-point environment in these
configurations.
This patch adds another preprocessor guard on `__ARM_FP` to disable the
test on those.
Added:
Modified:
libc/test/UnitTest/FEnvSafeTest.cpp
Removed:
################################################################################
diff --git a/libc/test/UnitTest/FEnvSafeTest.cpp b/libc/test/UnitTest/FEnvSafeTest.cpp
index 4393f9d5e5c3b..64f50d7be7fe3 100644
--- a/libc/test/UnitTest/FEnvSafeTest.cpp
+++ b/libc/test/UnitTest/FEnvSafeTest.cpp
@@ -43,7 +43,8 @@ void FEnvSafeTest::set_fenv(const fenv_t &fenv) {
void FEnvSafeTest::expect_fenv_eq(const fenv_t &before_fenv,
const fenv_t &after_fenv) {
-#if defined(LIBC_TARGET_ARCH_IS_AARCH64) && !defined(LIBC_COMPILER_IS_MSVC)
+#if defined(LIBC_TARGET_ARCH_IS_AARCH64) && !defined(LIBC_COMPILER_IS_MSVC) && \
+ defined(__ARM_FP)
using FPState = LIBC_NAMESPACE::fputil::FEnv::FPState;
const FPState &before_state = reinterpret_cast<const FPState &>(before_fenv);
const FPState &after_state = reinterpret_cast<const FPState &>(after_fenv);
More information about the libc-commits
mailing list