-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Sse2 Intrinsics and Vector<T> paths no longer being output at R2R #33544
Comments
@davidwrighton Is this related to your recent change (#33090) ? |
There is a fair bit of confusion here. The SequenceEqual(ref byte, ref byte, nuint) is marked with AggressiveOptimization, which prohibits generation of R2R code, so it should not be expected to be generated. SequenceEqual(ref T, ref T, int) ISN'T marked with AggressiveOptimization, and is generated but without any vectorized logic. This isn't surprising, at it isn't vectorized. IndexOf(ref T, T, int) ISN'T marked with AggressiveOptimization, and is generated but without any vectorized logic. This isn't surprising, at it isn't vectorized. |
So it might be worth removing However, that would also hit arm as it wouldn't have a R2R intrinsic variant (at this stage); so perhaps |
Unfortunately, that won't work either. The vectorized SequenceEqual(ref byte, ref byte, nuint) uses We may consider doing future work involving generation of multiple code bodies to cover that case, but that will require significant further engineering work which isn't planned in the .NET 5.0 timeframe. Alternatively, we may raise the baseline CPU in some scenarios to Avx2 which is technically easier, but has its own set of concerns. I consider #33274 to be a building block upon which we will build tech that actually solves these sorts of problems for our customer base, but for this sort of issue it only can be directly used to solve a narrow subset of intrinsics usage problems in AOT code. |
I have a PR to use intrinsics for SequenceEqual #32371 and it looks to output Sse2 at R2R. I was missing that However, I'm not sure of what define to use to only drop it for x86/x64 and not ARM (else ARM will get the Tier0 for the method; which would be unfortunate). |
Anyway, removing |
Using
jit-diff
to produce the outputSpanHelpers.IndexOf(ref byte searchSpace, byte value, int length)
doesn't look like it gets output at all.The workhorse
SpanHelpers.SequenceEqual(ref byte first, ref byte second, nuint length)
doesn't output any vectorized asmSpanHelpers.IndexOf(ref char searchSpace, char value, int length)
no longer outputs vectorized asm/cc @jkotas @tannergooding
The text was updated successfully, but these errors were encountered: