[libc-commits] [libc] [libc][stdfix] Implement `countlsfx` functions (PR #114318)

via libc-commits libc-commits at lists.llvm.org
Mon Nov 4 12:20:51 PST 2024


https://github.com/PiJoules commented:

Just a few nits/requests then I'd be happy to give an LGTM after:

1. 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.
2. Clang also has a mode `-fpadding-on-unsigned-fixed-point` which makes the number of fractional bits for each unsigned fixed point type the same as the number of fractional bits for each corresponding signed type, effectively adding a byte of padding for unsigned types. This is an optional feature that allows us to omit a shift when converting between equivalent signed + unsigned types. Would it also be possible to have a run through each of the tests that enables this flag? I imagine in cmake we could do something like `check_cxx_compiler_flag(-fpadding-on-unsigned-fixed-point)` to first check if we can build a variant of tests with this flag.

https://github.com/llvm/llvm-project/pull/114318


More information about the libc-commits mailing list