Disable NEON intrinsics on big-endian ARM#1485
Merged
Amanieu merged 1 commit intorust-lang:masterfrom Oct 21, 2023
Merged
Conversation
Collaborator
|
@Amanieu: no appropriate reviewer found, use r? to override |
Member
Author
|
@rust-lang/libs-api @rust-lang/libs This is a breaking change, but a necessary one in my opinion until the intrinsics are fixed. They currently silently produce the wrong results, which has led to a bug in hashbrown on big-endian ARM: rust-lang/rust#116880 |
These are currently broken because the order of elements inside vectors is reversed on big-endian systems: the ARM ABI requires that element 0 is located at the highest address of the vector type. However LLVM intrinsics expect element 0 to be located at the lowest address. See https://llvm.org/docs/BigEndianNEON.html and `arm_neon.h` in Clang for more details. Although this is a breaking change, this is acceptable for 2 reasons: - big endian ARM targets are only tier 3. - it is preferable to stop existing code from compiling than to let it run and produce incorrect results.
0a3aea9 to
f91abb5
Compare
Member
Author
|
@rustbot ping arm |
Collaborator
Member
Author
Contributor
|
Fixing this is not likely to be quick or easy, so I agree that disabling them for BE targets is probably the best approach for now. |
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 are currently broken because the order of elements inside vectors is reversed on big-endian systems: the ARM ABI requires that element 0 is located at the highest address of the vector type. However LLVM intrinsics expect element 0 to be located at the lowest address.
See https://llvm.org/docs/BigEndianNEON.html and
arm_neon.hin Clang for more details.This is tracked in #1484.
Although this is a breaking change, this is acceptable for 2 reasons: