-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Recognize "Span.Length" during physical promotion and set IsNeverNegative flag #113615
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
Recognize "Span.Length" during physical promotion and set IsNeverNegative flag #113615
Conversation
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
@jakobbotsch cc @dotnet/jit-contrib should we merge it as is then? Diffs (seems to be overall PerfScore improvement) The end goal is to force spans being promoted for this snippet (win-x64): static void Test(Span<int> span, int len)
{
for (int i = 0; i < len; i++)
span[i] = 0;
} while currently (thanks to the old promotion) they're not. |
@jakobbotsch Ok, I trust your instincts, how about merging the IsNeverNegative fix only? (changed) Diffs |
That sounds good to me, can you fix the PR title? |
Closes #104573