Skip to content

[release/8.0 staging] Port fix for 103477 to 8.0 #103918

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

Merged

Conversation

AndyAyersMS
Copy link
Member

@AndyAyersMS AndyAyersMS commented Jun 24, 2024

"Port" the changes from #103788 to .NET 8.

We don't have the DFS tree, so enhance the topological sort that SSA uses to detect cycles and backedges.

Use this info to stop searching for redundant zero inits once flow from entry has entered a cycle.

Fixes #103477 (for .NET 8).


Customer Impact

  • Customer reported
  • Found internally

In #103477 the customer reported silent bad code where a necessary zero initialization was removed via JIT optimization.

Regression

  • Yes
  • No

The issue was introduced in .NET 8

Testing

Verified repro (with jitted code) now passes; added test case. SPMI runs show we now keep a small number of other zero initializations that were previously (correctly) deemed redundant.

Risk

Low. This is making an optimization more conservative.

"Port" the changes from dotnet#103788 to .NET 8.

We don't have the DFS tree, so enhance the topological sort that SSA uses
to detect cycles and backedges.

Use this info to stop searching for redundant zero inits once flow from
entry has entered a cycle.

Fixes dotnet#103477 (for .NET 8).
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 24, 2024
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member Author

@dotnet/jit-contrib PTAL
@JulieLeeMSFT @jeffschwMSFT request porting this fix to 8.0.

@AndyAyersMS
Copy link
Member Author

@mangod9 since Jeff is OOF perhaps you and Julie can co-approve?

@AndyAyersMS AndyAyersMS requested a review from jakobbotsch June 24, 2024 22:31
@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Jun 26, 2024
@jeffschwMSFT jeffschwMSFT added this to the 8.0.x milestone Jun 26, 2024
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.

lgtm. please send email to tactics for approval

@AndyAyersMS AndyAyersMS changed the title Port fix for 103477 to 8.0 [release/8.0 staging] Port fix for 103477 to 8.0 Jun 26, 2024
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jun 27, 2024
@rbhanda rbhanda modified the milestones: 8.0.x, 8.0.8 Jun 27, 2024
@carlossanlop
Copy link
Contributor

@AndyAyersMS friendly reminder that code complete for the August Release is July 15th. If you want this fix to be included in that release, please merge this PR before that date.

@carlossanlop
Copy link
Contributor

Friendly reminder that Monday July 15th is Code Complete day, that's the deadline to get this included in the August Release.

@AndyAyersMS
Copy link
Member Author

Friendly reminder that Monday July 15th is Code Complete day, that's the deadline to get this included in the August Release.

Thanks for the remainders!

@AndyAyersMS AndyAyersMS merged commit 524fdcf into dotnet:release/8.0-staging Jul 12, 2024
122 of 127 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2024
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.

6 participants