-
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
JIT: Fixed containment of STOREIND of HW intrinsics ConvertTo* #92396
Conversation
…operations for stores.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsResolves #92349 regarding the truncating CAST DescriptionAs an example, the HW Intrinsic SIMD scalar So, when we have something like this: // pValue is a 'ushort*'
*pValue = (ushort)(uint)Sse2.ConvertToInt32(newMinZ16); We need to keep the cast operation for I tried to see if there was something we could do in codegen, but it is a lot easier to handle in morph where we get rid of these CASTs. The simplest thing to do is check to see if we have a SIMD scalar operation, and if we do, do not remove the CAST. Acceptance Criteria
|
We should fix this in the backend. It looks like a bug in runtime/src/coreclr/jit/lowerxarch.cpp Line 6507 in aba7c43
should be
if |
Your fix works and is a lot simpler than what I had. Thank you. |
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.
Add a test?
@dotnet/jit-contrib @jakobbotsch @tannergooding This is ready, pending CI. |
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6280549647 |
Resolves #92349 regarding the truncating CAST
Description
As an example, the HW Intrinsic SIMD scalar
ConvertToInt32
will emit avmovd
instruction. This instruction can store a scalar value in memory or in a register, but only for 32 and 64 bits.So, when we have something like this:
Acceptance Criteria
Note
We need to backport this to .NET 8.