Skip to content

JIT: clear loop iter info after rebuilding loops for opt repeat #95879

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
merged 1 commit into from
Dec 12, 2023

Conversation

AndyAyersMS
Copy link
Member

This info gets computed when finding loops but is not used by the general optimizer (it only cares about loop structure, not iteration details). If we leave it built it can go stale.

Fixes #95843.

This info gets computed when finding loops but is not used by the
general optimizer (it only cares about loop structure, not iteration
details). If we leave it built it can go stale.

Fixes dotnet#95843.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 11, 2023
@ghost ghost assigned AndyAyersMS Dec 11, 2023
@ghost
Copy link

ghost commented Dec 11, 2023

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

Issue Details

This info gets computed when finding loops but is not used by the general optimizer (it only cares about loop structure, not iteration details). If we leave it built it can go stale.

Fixes #95843.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

The issue was exposed because #95705 changed how the stress mode "random" CSEs work, and so the initial round of CSE did not CSE an ARR_LEN that we normally always CSE. The subsequent loop rebuild then set the LP flag based on this, and then the second round of CSE did the ARR_LEN CSE, hence the flag and IR diverged.

@BruceForstall PTAL
cc @dotnet/jit-contrib

Opt repeat issue only, no diffs expected.

@jakobbotsch
Copy link
Member

This is going to conflict with #95854... But feel free to merge this and I'll fix it up tomorrow (I am missing some more handling for JitOptRepeat in that PR anyway).

Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM.

I should really try to get #94250 finished -- I'd fixed this a month or so back...

@AndyAyersMS
Copy link
Member Author

Not sure why build analysis is not clearing this, failure is #95875 and this PR is logged there.

@AndyAyersMS AndyAyersMS merged commit d6437e9 into dotnet:main Dec 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure JIT/Regression/JitBlue/Runtime_56953/Runtime_56953/Runtime_56953.cmd
3 participants