[libc-commits] [libc] [libc][stdfix] Implement `countlsfx` functions (PR #114318)
via libc-commits
libc-commits at lists.llvm.org
Tue Nov 5 14:50:42 PST 2024
duncpro wrote:
> For each of the `LIST_COUNTLS_TESTS`, could you also add one for the saturation equivalent of each test? Saturation shouldn't affect the result but it would be nice to assert this is the case.
AFAIK `countlsfx` is not defined for `_Sat` (saturating) types.
<img width="889" alt="Screenshot 2024-11-05 at 5 37 24 PM" src="https://github.com/user-attachments/assets/261d5e16-7270-4ad5-bad9-8411885191da">
#
However, saturating arithmetic can be requested for non-`_Sat` fixed-point types via a `#pragma`.
<img width="888" alt="Screenshot 2024-11-05 at 5 41 09 PM" src="https://github.com/user-attachments/assets/5ee5e654-c328-44c8-b619-31dd2aa94c32">
But it appears `clang` does not support this pragma yet ([feature-tracking issue](https://github.com/llvm/llvm-project/issues/43241)).
<img width="1183" alt="Screenshot 2024-11-05 at 5 38 11 PM" src="https://github.com/user-attachments/assets/208b685f-690d-4dc7-85be-714dc6420a5f">
#
@PiJoules Can you give guidance?
https://github.com/llvm/llvm-project/pull/114318
More information about the libc-commits
mailing list