Fix for GCC 15 compiler error on PPC8/PPC9/PPC10 #2445
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 aVec128<int64_t, ((N + 1) / 2)>
vector.detail::VsxXvcvspuxds takes a
Vec128<float, N>
vector and returns the result of the VsxXvcvspuxds instruction as aVec128<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.