-
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
Expose helper APIS for GetLower/Upper and WithLower/Upper #83982
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsThis ensures the GetLower, GetUpper, WithLower, and WithUpper APIs are intrinsic and have appropriate helpers carried through to lowering. This should minimally improve codegen as we no longer have to worry about the inliner but it should also make it simpler for certain AVX-512 optimizations to light up, such as
|
WASM failures are #83986 |
3d723a7
to
ed829fc
Compare
CC. @dotnet/jit-contrib, @dotnet/avx512-contrib |
Some small improvement to Arm64 as we're able to optimize the - movi v17.4s, #0
- ext v16.16b, v16.16b, v17.16b, #8
+ ext v16.16b, v16.16b, v16.16b, #8 No real diffs on x64. For both x64 and Arm64 it being 1 node with 1 (Get) or 2 (With) inputs all the way to lowering/codegen allows the JIT to do some minor transformations. In the case of Linux x64, there are a couple places where we get 1 memory read instead of 2. In the case of Arm64 we sometimes see the |
@@ -3168,22 +3162,16 @@ public static Vector128<T> WithLower<T>(this Vector128<T> vector, Vector64<T> va | |||
/// <param name="value">The value of the upper 64-bits as a <see cref="Vector64{T}" />.</param> | |||
/// <returns>A new <see cref="Vector128{T}" /> with the upper 64-bits set to <paramref name="value" /> and the lower 64-bits set to the same value as that in <paramref name="vector" />.</returns> | |||
/// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception> | |||
[Intrinsic] |
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.
The comment above is wrong: with the upper 64-bits set to the specified value and the upper 64-bits set to the same value as that in the given vector
(both parts say "upper")
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.
Will fix these in a follow up PR.
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.
This ensures the GetLower, GetUpper, WithLower, and WithUpper APIs are intrinsic and have appropriate helpers carried through to lowering.
This should minimally improve codegen as we no longer have to worry about the inliner but it should also make it simpler for certain AVX-512 optimizations to light up, such as
vector512.GetLower().GetLower()
.