Skip to content

Conversation

lntue
Copy link
Contributor

@lntue lntue commented Sep 17, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Sep 17, 2025

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

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

1 Files Affected:

  • (modified) libc/test/src/math/smoke/rsqrtf16_test.cpp (+6)
diff --git a/libc/test/src/math/smoke/rsqrtf16_test.cpp b/libc/test/src/math/smoke/rsqrtf16_test.cpp
index 5eb3e2fd6692c..2bef034722349 100644
--- a/libc/test/src/math/smoke/rsqrtf16_test.cpp
+++ b/libc/test/src/math/smoke/rsqrtf16_test.cpp
@@ -8,6 +8,7 @@
 
 #include "hdr/errno_macros.h"
 #include "src/__support/FPUtil/cast.h"
+#include "src/__support/macros/properties/architectures.h"
 #include "src/math/rsqrtf16.h"
 #include "test/UnitTest/FPMatcher.h"
 #include "test/UnitTest/Test.h"
@@ -19,7 +20,12 @@ TEST_F(LlvmLibcRsqrtf16Test, SpecialNumbers) {
   EXPECT_FP_EQ(aNaN, LIBC_NAMESPACE::rsqrtf16(aNaN));
   EXPECT_MATH_ERRNO(0);
 
+  // TODO: investigate why the exception is not raised on aarch64 post-build CI.
+#ifdef LIBC_TARGET_ARCH_IS_AARCH64
+  EXPECT_FP_EQ(aNaN, LIBC_NAMESPACE::rsqrtf16(sNaN));
+#else
   EXPECT_FP_IS_NAN_WITH_EXCEPTION(LIBC_NAMESPACE::rsqrtf16(sNaN), FE_INVALID);
+#endif // LIBC_TARGET_ARCH_IS_AARCH64
   EXPECT_MATH_ERRNO(0);
 
   EXPECT_FP_EQ(inf, LIBC_NAMESPACE::rsqrtf16(zero));

Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lntue lntue merged commit e8fd84d into llvm:main Sep 17, 2025
21 checks passed
@lntue lntue deleted the rsqrtf16 branch September 17, 2025 19:01
krishna2803 added a commit that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants