| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] Make errno asserts noop on gpu targets (#166606) This patch defines errno unit and integration test asserts as noop on GPU targets. Checking for errnos is tests has caused build breakages in previous patches. | 8 个月前 | |
[libc] fix EXPECT_EXIT suspend/timeout for darwin (#166065) Fixes: https://github.com/llvm/llvm-project/issues/166059 --------- Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com> | 8 个月前 | |
| 9 个月前 | ||
[libc][stdlib] Simplify getenv_test by using strcmp instead of custom helper (#163055) [libc][stdlib] Simplify getenv_test by using inline_strcmp instead of custom helper Replace the custom my_streq helper function with LLVM libc's inline_strcmp utility from src/string/memory_utils/inline_strcmp.h. Changes: - Remove 18-line custom my_streq implementation - Use inline_strcmp with a simple comparator lambda for string comparisons - Replace my_streq(..., nullptr) checks with direct == nullptr comparisons - Maintain identical test coverage while reducing code duplication Benefits: - Uses existing, well-tested LLVM libc infrastructure - Clearer test assertions with standard comparison functions - More concise code (reduced from ~48 to ~33 lines) - Consistent with LLVM libc coding practices The test continues to verify: - Empty string handling - Invalid name handling ('=') - Missing environment variable queries - Correct retrieval of existing variables (FRANCE, GERMANY, PATH) - Partial name matching behavior (FRANC vs FRANCE, FRANCE1 vs FRANCE) | 8 个月前 | |
[libc][math] Refactor exp2m1f16 implementation to header-only in src/__support/math folder. (#162019) Part of #147386 in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450 | 8 个月前 | |
[libc][math] Add float-only implementation for atanf. (#167004) Algorithm: 1) atan(x) = sign(x) * atan(|x|) 2) If |x| > 1 + 1/32, atan(|x|) = pi/2 - atan(1/|x|) 3) For 1/16 < |x| < 1 + 1/32, we find k such that: | |x| - k/16 | <= 1/32. Let y = |x| - k/16, then using the angle summation formula, we have: atan(|x|) = atan(k/16) + atan( (|x| - k/16) / (1 + |x| * k/16) ) = atan(k/16) + atan( y / (1 + (y + k/16) * k/16 ) = atan(k/16) + atan( y / ((1 + k^2/256) + y * k/16) ) 4) Let u = y / (1 + k^2/256), then we can rewritten the above as: atan(|x|) = atan(k/16) + atan( u / (1 + u * k/16) ) ~ atan(k/16) + (u - k/16 * u^2 + (k^2/256 - 1/3) * u^3 + + (k/16 - (k/16)^3) * u^4) + O(u^5) With all the computations are done in single precision (float), the total of approximation errors and rounding errors is bounded by 4 ULPs. | 8 个月前 | |
[libc] Correct x86_64 architecture for string(s) tests. (#143150) | 1 年前 | |
| 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 |