Skip to content

[libc] Fix asin_test smoke test for DAZ modes due to mis-optimization on newer clang. #141996

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

Merged
merged 2 commits into from
May 29, 2025

Conversation

lntue
Copy link
Contributor

@lntue lntue commented May 29, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented May 29, 2025

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

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

1 Files Affected:

  • (modified) libc/test/src/math/smoke/asin_test.cpp (+3-3)
diff --git a/libc/test/src/math/smoke/asin_test.cpp b/libc/test/src/math/smoke/asin_test.cpp
index f341b928cd055..b89155ca7e3a1 100644
--- a/libc/test/src/math/smoke/asin_test.cpp
+++ b/libc/test/src/math/smoke/asin_test.cpp
@@ -34,19 +34,19 @@ using namespace LIBC_NAMESPACE::testing;
 TEST_F(LlvmLibcAsinTest, FTZMode) {
   ModifyMXCSR mxcsr(FTZ);
 
-  EXPECT_FP_EQ(zero, LIBC_NAMESPACE::asin(min_denormal));
+  EXPECT_TRUE(zero == LIBC_NAMESPACE::asin(min_denormal));
 }
 
 TEST_F(LlvmLibcAsinTest, DAZMode) {
   ModifyMXCSR mxcsr(DAZ);
 
-  EXPECT_FP_EQ(zero, LIBC_NAMESPACE::asin(min_denormal));
+  EXPECT_TRUE(zero == LIBC_NAMESPACE::asin(min_denormal));
 }
 
 TEST_F(LlvmLibcAsinTest, FTZDAZMode) {
   ModifyMXCSR mxcsr(FTZ | DAZ);
 
-  EXPECT_FP_EQ(zero, LIBC_NAMESPACE::asin(min_denormal));
+  EXPECT_TRUE(zero == LIBC_NAMESPACE::asin(min_denormal));
 }
 
 #endif

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, it might be useful to add a comment explaining what's going on in the code

@lntue
Copy link
Contributor Author

lntue commented May 29, 2025

LGTM, it might be useful to add a comment explaining what's going on in the code

Done.

@lntue lntue merged commit 637e92b into llvm:main May 29, 2025
13 of 15 checks passed
svkeerthy pushed a commit that referenced this pull request May 29, 2025
google-yfyang pushed a commit to google-yfyang/llvm-project that referenced this pull request May 29, 2025
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 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.

4 participants