-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][LIBCLC][NATIVECPU] Fix ldexp and popcount on Native CPU (#15687)
`ldexp` in `generic` (for `half`) and `popcount` in `native_cpu` are implemented using clang builtins. This PR makes it so we call the correct "overload" of the builtin: * `__builtin_ldexpf16` for `half` * `__builtin_popcountg` for unsigned integer types * for signed integer types the implicit cast to `int` performed by calling `__builtin_popcount` doesn't work due to sign extension, so we explicitly cast to `unsigned char` or `unsigned short`, and use `__builtin_popcountg`.
- Loading branch information
Showing
3 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters