-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix PHI non-null pattern #104493
Fix PHI non-null pattern #104493
Conversation
PTAL @AndyAyersMS @jakobbotsch cc @dotnet/jit-contrib Diffs I tried to fix the TP hit by only inspecting root node for PHI, but there is still 0.1% regression. Can we accept it? |
@@ -1149,16 +1149,14 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1, | |||
} | |||
} | |||
|
|||
if (fgIsBigOffset(offset) || op1->gtOper != GT_LCL_VAR) | |||
if (fgIsBigOffset(offset) || !op1->IsLocal()) |
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.
Is this change ok? LCL_FLD
will create an assertion about the parent local without encoding any information about the offset, which seems odd.
else if (value->TypeGet() == TYP_REF) | ||
{ | ||
// If we have an unsafe IL store of a TYP_REF to a non-ref (typically a TYP_BYREF) | ||
// then don't propagate this ValueNumber to the lhs, instead create a new unique VN. | ||
valueVNPair.SetBoth(vnStore->VNForExpr(compCurBB, store->TypeGet())); | ||
} |
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.
Might be a good idea to see if you can dig up why this was added to verify it won't cause any problems to remove it.
superseded by #108420 |
Closes #104489
Thanks to @AndyAyersMS and @jakobbotsch for ideas how to fix it.
Let's see what CI thinks..