Skip to content

Conversation

@PietroGhg
Copy link
Contributor

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.

@PietroGhg PietroGhg requested a review from a team as a code owner October 14, 2024 14:45
@PietroGhg PietroGhg requested a review from jchlanda October 14, 2024 14:45
@PietroGhg
Copy link
Contributor Author

Hi @intel/llvm-gatekeepers, this looks ready to merge, thank you

@sommerlukas sommerlukas merged commit 48a75f4 into intel:sycl Oct 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants