8000 Fix for GCC 15 compiler error on PPC8/PPC9/PPC10 by johnplatts · Pull Request #2445 · google/highway · GitHub
[go: up one dir, main page]

Skip to content

Fix for GCC 15 compiler error on PPC8/PPC9/PPC10 #2445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

johnplatts
Copy link
Contributor

Resolves issue #2443.

This pull request adds detail::VsxXvcvspsxds and detail::VsxXvcvspuxds, which are wrappers around the VSX xvcvspsxds and xvcvspuxds instructions.

__builtin_vsx_xvcvspsxds is replaced with detail::VsxXvcvspsxds in the implementations of F32->I64 PromoteTo, F32->I64 PromoteUpperTo, F32->I64 PromoteOddTo, and F32->I64 PromoteUpperTo on PPC8/PPC9/PPC10.

__builtin_vsx_xvcvspuxds is replaced with detail::VsxXvcvspuxds in the implementations of F32->U64 PromoteTo, F32->U64 PromoteUpperTo, F32->U64 PromoteOddTo, and F32->U64 PromoteUpperTo on PPC8/PPC9/PPC10.

detail::VsxXvcvspsxds takes a Vec128<float, N> vector and returns the result of the VsxXvcvspsxds instruction as a Vec128<int64_t, ((N + 1) / 2)> vector.

detail::VsxXvcvspuxds takes a Vec128<float, N> vector and returns the result of the VsxXvcvspuxds instruction as a Vec128<uint64_t, ((N + 1) / 2)> vector.

The VSX F32->I64 vec_signede, F32->I64 vec_signedo, F32->U64 vec_unsignede, and F32->U64 vec_unsignedo intrinsics are only available with GCC 15 or later and not available with GCC 14 or earlier or Clang 20 or earlier.

detail::VsxXvcvspsxds also includes an inline assembly fallback for Clang 12 or earlier which lack the __builtin_vsx_xvcvspsxds, F32->I64 vec_signede, and F32->I64 vec_signedo intrinsics.

detail::VsxXvcvspuxds also includes an inline assembly fallback for Clang 12 or earlier which lack the __builtin_vsx_xvcvspuxds, F32->U64 vec_unsignede, and F32->U64 vec_unsignedo intrinsics.

Copy link
Member
@jan-wassenberg jan-wassenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@copybara-service copybara-service bot merged commit 6c6b289 into google:master Jan 20, 2025
6 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0