Vector64: Avoid GSCookies in Vector64 software fallback#98293
Merged
tannergooding merged 3 commits intodotnet:mainfrom Mar 19, 2024
Merged
Vector64: Avoid GSCookies in Vector64 software fallback#98293tannergooding merged 3 commits intodotnet:mainfrom
tannergooding merged 3 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics Issue DetailsWe are using On x86_64: var x = Vector64.Create(1, 2);
var y = Vector64.Create(2, 3);
Console.WriteLine(Vector64.Sum(x + y));Before: After:
|
tannergooding
approved these changes
Feb 20, 2024
Member
tannergooding
left a comment
There was a problem hiding this comment.
LGTM. Just noting that this doesn't really benefit anything as the fallbacks aren't used for most platforms nor should the types be used if IsHardwareAccelerated is false.
This was referenced Mar 19, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We are using
stackallocfor Vector64 software fallbacks which results in GSCookies check in the codegen.It's slow as the code is not being hardware accelerated but let's at least initialize Vector64 directly to avoid the unnecessary check and skip the unnecessary zeroing.
As a sequence it also makes the software fallback of
Vector128,Vector256andVector512faster as they all rely onVector64when creating the vector.On x86_64:
Before:
After: