JIT: generalize checking for valid IR after a tail call#51903
JIT: generalize checking for valid IR after a tail call#51903AndyAyersMS merged 1 commit intodotnet:mainfrom
Conversation
Allow NOPs and assignments with non-overflowing casts, in addition to the assignments we already allowed. Closes dotnet#51898.
|
@EgorBo PTAL |
|
Is this valid in the view of this comment in the importer? runtime/src/coreclr/jit/importer.cpp Lines 7762 to 7768 in 9a31832 |
Good question. I think perhaps that comment and check is stale. In this case we have inlined a number of bool returning methods in tail position, leaving behind an un-inlined call that we then try to tail call: When we inline we add return value casts, per runtime/src/coreclr/jit/importer.cpp Lines 16991 to 16998 in 6af5918 and those casts are what we're skipping over here. Also note in morph we tolerate a form of this where the casts wrap the call; this is just a different factorization where because of inlining we end up spreading out the cast chain over a series of assignments. runtime/src/coreclr/jit/morph.cpp Lines 7727 to 7768 in 6af5918 |
1 similar comment
This comment has been minimized.
This comment has been minimized.
|
@dotnet/jit-contrib anyone else want to weigh in? Do we normalize small return types in callee or caller? I vaguely recalled we changed our approach sometime back... |
Do you mean if we have So the caller of the |
|
So yes it seems like it is a stale comment. @jakobbotsch perhaps you can look into what happens if we remove that check? |
|
Sure, opened #51957 for it. |
Allow NOPs and assignments with non-overflowing casts, in addition
to the assignments we already allowed.
Closes #51898.