Skip to content
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

[release/8.0] JIT: Fixed containment of STOREIND of HW intrinsics ConvertTo*/Extract* #92513

Merged
merged 10 commits into from
Sep 27, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 23, 2023

Backport of #92396 to release/8.0

/cc @TIHan

Customer Impact

The customer has a custom-built software rasterizer and is using SSE2 hw-intrinsics to improve performance. In .NET 8, they were getting incorrect results compared to .NET 7 when using the Sse2.ConvertToInt32 API.

Specifically, when storing the result of Sse2.ConvertToInt32 or vector indexing in memory, the JIT would in certain cases store either too many bytes or too few bytes when applying its containment optimization. The fix is to ensure the proper sizes and otherwise give up on containment.

.NET 7 (correct)
image

.NET 8 (incorrect)
image

This change will fix that.

Original issues: #92349, #92590

Testing

Added regression tests of the hw-intrinsics Sse2.ConvertToInt32 and Extract to ensure that this will not happen again.

Risk

Very low risk. Only two lines were changed and will not regress performance.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 23, 2023
@ghost
Copy link

ghost commented Sep 23, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #92396 to release/8.0

/cc @TIHan

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@TIHan
Copy link
Member

TIHan commented Sep 23, 2023

cc @jeffschwMSFT @JulieLeeMSFT

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. we will take for consideration in 8.0.x

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Sep 25, 2023
@jeffschwMSFT jeffschwMSFT added this to the 8.0.0 milestone Sep 25, 2023
@jakobbotsch jakobbotsch changed the title [release/8.0] JIT: Fixed containment of STOREIND of HW intrinsics ConvertTo* [release/8.0] JIT: Fixed containment of STOREIND of HW intrinsics ConvertTo*/Extract* Sep 26, 2023
@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 27, 2023
@carlossanlop
Copy link
Member

Approved by Tactics via email.

@carlossanlop carlossanlop merged commit 8c68206 into release/8.0 Sep 27, 2023
121 of 124 checks passed
@carlossanlop carlossanlop deleted the backport/pr-92396-to-release/8.0 branch September 27, 2023 10:13
@ghost ghost locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants