-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve TeddyHelper.RightShift helpers for ARM #96928
Conversation
Tagging subscribers to this area: @dotnet/area-system-buffers Issue Details@tannergooding mentioned on Discord that
|
} | ||
return Ssse3.IsSupported | ||
? Ssse3.AlignRight(right, left, 15) | ||
: AdvSimd.ExtractVector128(left, right, 15); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth noting that...
AlignRight
is exposed as (left, right, mask)
where left
is the upper
128-bits and right
is the lower 128-bits of the concatenated vector, therefore mask 1
picks right[1]-right[15]
and left[0]
as the last element.
AdvSimd.ExtractVector128
is exposed as (upper, lower, mask)
, but it should've been (lower, upper, mask)
, so its inverse from the AlignRight
order. This can be potentially confusing when reviewing the code.
The PR here is doing it correctly, just wanted to call out that its a weird thing if you go look at stuff
@MihuBot -arm |
7cc415b
to
51cd9fb
Compare
@tannergooding mentioned on Discord that
AdvSimd.ExtractVector128
is the comparable ARM instruction toSsse3.AlignRight
.This lets us delete the logic we were using to emulate the behavior via shuffles.