-
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
[JIT] X64/ARM64 - Fold 'x & 255' and 'x & 65535' to a cast #79630
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsDescription Fixes #8833 Acceptance Criteria
|
@dotnet/jit-contrib @EgorBo This is ready |
@TIHan the diffs seem to be expired - do you have the most recent ones maybe? |
@EgorBo I will re-run CI to get new diffs. |
assert(varTypeIsUnsigned(castToType)); | ||
|
||
GenTreeCast* cast = gtNewCastNode(TYP_INT, op1, false, castToType); | ||
if (fgGlobalMorph) |
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.
can you educate me on why fgMorphTreeDone
is needed here (I don't see it in other morph cases) and does it decrease jit-diffs if you just do this opt in GlobalMorph case only?
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.
I'm following the precedent that was set. Right above NewZeroExtendNode
, you see:
// Helper function that creates a new IntCon node and morphs it, if required
auto NewMorphedIntConNode = [&](int value) -> GenTreeIntCon* {
GenTreeIntCon* icon = gtNewIconNode(value);
if (fgGlobalMorph)
{
fgMorphTreeDone(icon);
}
return icon;
};
Also, gtFoldExprSpecial
has a comment that says:
// Return value:
// Tree (possibly modified at root or below), or a new tree
// Any new tree is fully morphed, if necessary
Merging, the failed CI for Mono_LLVMFullAot is unrelated to this change. |
Description
Fixes #8833
Acceptance Criteria