Skip to content
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

Fix UQSHL to match hardware. Add extensive test vectors. #1256

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

Syonyk
Copy link
Contributor

@Syonyk Syonyk commented Jan 3, 2025

UQSHL was wrong in a variety of ways. Most importantly, it did not trim off the low byte for the shift as per the instruction spec: "... shifts the element by a value from the least significant byte of the corresponding element of the second source register..." This was not detected in the tests, as the test vectors were limited to small shift values that did not demonstrate the fault.

Behavior is fixed to be correct, per hardware. Test vectors are dramatically expanded, using both the previous small-range values as well as additional full-range values. Vectors generated on an ARMv9 system (Google Compute Engine C4A).

UQSHL was wrong in a variety of ways.  Most importantly, it did not
trim off the low byte for the shift as per the instruction spec:
"... shifts the element by a value from the least significant byte
of the corresponding element of the second source register..."
This was not detected in the tests, as the test vectors were limited
to small shift values that did not demonstrate the fault.

Behavior is fixed to be correct, per hardware.  Test vectors are
dramatically expanded, using both the previous small-range values as
well as additional full-range values.  Vectors generated on an ARMv9
system (Google Compute Engine C4A).
@mr-c mr-c merged commit e5d5064 into simd-everywhere:master Jan 3, 2025
95 of 96 checks passed
@mr-c
Copy link
Collaborator

mr-c commented Jan 3, 2025

These are great, thank you @Syonyk !

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.

2 participants