Fix ARM64 NEON type conversion errors for GCC 13+ compatibility#64
Merged
zkingston merged 4 commits intoKavrakiLab:mainfrom Sep 8, 2025
Merged
Conversation
- Fix vmvnq_s32 usage with explicit uint32 reinterpret cast - Fix vcvtq_s32_f32 to vcvtq_f32_s32 for proper float conversion - Fix vreinterpretq_u32_f32 to vreinterpretq_f32_u32 for sign mask - Add explicit reinterpret cast for sign_mask_sin usage These changes resolve compilation errors on ARM64 with GCC 13+ which enforces stricter type checking for NEON intrinsics.
Remove unnecessary vreinterpretq_u32_s32 cast since vceqq_s32 already returns uint32x4_t which can be directly passed to vmvnq_u32. This resolves the remaining ARM64 compilation error: 'cannot convert uint32x4_t to __Int32x4_t'
zkingston
approved these changes
Sep 8, 2025
Collaborator
zkingston
left a comment
There was a problem hiding this comment.
One minor comment but other than that LGTM.
As pointed out by @zkingston, sign_mask_sin is already float32x4_t and blend() expects float32x4_t, so no conversion is needed. The blend function internally handles the conversion to uint32x4_t for vbslq_f32, making the double cast redundant.
1a5dc68 to
49fa08c
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These changes resolve compilation errors on ARM64 with GCC 13+ which enforces stricter type checking for NEON intrinsics.