-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc][math][c23] Fix setpayloadsig smoke test on RV32 #102538
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
Conversation
@llvm/pr-subscribers-libc Author: Job Henandez Lara (Jobhdez) ChangesFull diff: https://github.com/llvm/llvm-project/pull/102538.diff 1 Files Affected:
diff --git a/libc/test/src/math/smoke/SetPayloadSigTest.h b/libc/test/src/math/smoke/SetPayloadSigTest.h
index 7ec3ac08a180a..67eb0d0a0bfaf 100644
--- a/libc/test/src/math/smoke/SetPayloadSigTest.h
+++ b/libc/test/src/math/smoke/SetPayloadSigTest.h
@@ -35,7 +35,13 @@ class SetPayloadSigTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
EXPECT_EQ(1, func(&res, T(-1.0)));
EXPECT_EQ(1, func(&res, T(0x42.1p+0)));
EXPECT_EQ(1, func(&res, T(-0x42.1p+0)));
- EXPECT_EQ(1, func(&res, T(StorageType(1) << (FPBits::FRACTION_LEN - 1))));
+
+ FPBits default_snan_payload_bits = FPBits::one();
+ default_snan_payload_bits.set_biased_exponent(FPBits::FRACTION_LEN - 1 +
+ FPBits::EXP_BIAS);
+ T default_snan_payload = default_snan_payload_bits.get_val();
+
+ EXPECT_EQ(1, func(&res, default_snan_payload));
}
void testValidPayloads(SetPayloadSigFunc func) {
|
@mikhailramalho hello, can you please let me know if this pr fixes the rv32 bug that you mentioned earlier today? thanks. regarding this pr #102413 (comment) |
The following is still crashing:
|
Ok I will address it. I’ll tag you when I change it. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the fix!
No problem |
No description provided.