-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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: don't clone loops where init or limit is a cast local #57602
Conversation
The loop cloner assumes all computations it introduces are compatible with TYP_INT, so don't allow cloning when the initial or final value are variables with incompatible types. Fixes dotnet#57535.
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsThe loop cloner assumes all computations it introduces are compatible Fixes #57535.
|
cc @dotnet/jit-contrib @SingleAccretion No SPMI diffs. We will want to port this to .NET 6. |
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.
LGTM. I am surprised that none of our test had this scenario.
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.
Question: do we think this is a cloning-exclusive issue? In relation to not setting the relevant loop flags in the first place (somewhere around optRecordLoop
).
I suppose literally nothing but cloning uses this information today so it does not matter either way.
Probably best to keep the fix surgical for .NET 6. But we should look and see if anything else might be tripped up. |
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Linux failures seems like some sort of test issue with crossgen2 testing:
@trylek seen anything like this recently? |
@AndyAyersMS yes, it's been reported in a few cases. Issue: #57620 |
Mono interpreter failure looks real but is unrelated.
Does not seem to be a known issue? cc @BrzVlad |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1144484614 |
/backport to release/6.0-rc1 |
Started backporting to release/6.0-rc1: https://github.com/dotnet/runtime/actions/runs/1144633915 |
The loop cloner assumes all computations it introduces are compatible
with TYP_INT, so don't allow cloning when the initial or final value
are variables with incompatible types.
Fixes #57535.