-
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
RyuJIT: Don't emit cast helpers for (T)array.Clone() #45311
Conversation
Failures are not related (#45317) |
Nit: should rename to "tree" now? Refers to: src/coreclr/src/jit/importer.cpp:10719 in ce5ac35. [](commit_id = ce5ac357154f11e14ad6d4889ae215e49456b44f, deletion_comment = False) |
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
// Auto-generated message 69e114c which was merged 12/7 removed the intermediate src/coreclr/src/ folder. This PR needs to be updated as it touches files in that directory which causes conflicts. To update your commits you can use this bash script: https://gist.github.com/ViktorHofer/6d24f62abdcddb518b4966ead5ef3783. Feel free to use the comment section of the gist to improve the script for others. |
c2e0dde
to
169ec92
Compare
169ec92
to
723da1e
Compare
@dotnet/jit-contrib can this be merged? |
Perhaps teach |
Are you going to re-run diffs? |
Good point, it looks nicer now
Yeah just finished - the diff is exactly the same. |
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.
Looks good -- just one small comment.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Testing hit another case of the xunit assertion #11063.
am going to rerun these. |
Thanks Egor! |
A random question about this line:
I assume it's ok that objClass might technically be a lie? For example... object[] arr1 = GetArray(); // actually a string[]!
object[] clone1 = (object[])arr1.Clone(); // also actually a string[]!
int[] arr2 = GetArray(); // actually a uint[]!
int[] clone2 = (int[])arr2.Clone(); // also actually a uint[]!
// etc. If I then call |
Could the same logic be applied to |
We're fairly cautious when reasoning about types unless we know the exact type (say from seeing a constructor call or an exact type test). And even when we do know the exact type we're cautious with arrays of primitive types: runtime/src/coreclr/jit/importer.cpp Lines 21629 to 21663 in fcf0b8b
In the above we would not know the exact types for |
1 similar comment
This comment has been minimized.
This comment has been minimized.
Seems like it could, yes. @EgorBo want to follow up on this? |
Closes #45302
Example:
master:
PR:
Jit-diff (
--pmi
):/cc @GrabYourPitchforks @VSadov