[libc-commits] [libc] [libc] Fix sqrtf128 smoke test for riscv32. (PR #129094)
via libc-commits
libc-commits at lists.llvm.org
Thu Feb 27 10:17:53 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (lntue)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/129094.diff
1 Files Affected:
- (modified) libc/test/src/math/smoke/sqrtf128_test.cpp (+2-2)
``````````diff
diff --git a/libc/test/src/math/smoke/sqrtf128_test.cpp b/libc/test/src/math/smoke/sqrtf128_test.cpp
index 3b9686c4ea477..2fca74842d313 100644
--- a/libc/test/src/math/smoke/sqrtf128_test.cpp
+++ b/libc/test/src/math/smoke/sqrtf128_test.cpp
@@ -129,8 +129,8 @@ TEST_F(LlvmLibcSqrtTest, HardToRound) {
// Then from the largest number.
uint64_t k0 = 101904826760412362ULL;
for (uint64_t k = k0; k > k0 - 10000; --k) {
- UInt128 k2 = static_cast<UInt128>(k) * static_cast<UInt128>(k);
- float128 x = static_cast<float128>(k2);
+ float128 k_f128 = static_cast<float128>(k);
+ float128 x = k_f128 * k_f128;
float128 y = static_cast<float128>(k);
EXPECT_FP_EQ_ALL_ROUNDING(y, LIBC_NAMESPACE::sqrtf128(x));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/129094
More information about the libc-commits
mailing list