-
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] ARM64 - Fix Assertion failed 'node->OperIs(GT_DIV, GT_UDIV, GT_MOD)' during 'Lowering nodeinfo' #85664
Conversation
… parameter for the next node to lower
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsResolves #85630 DescriptionThere was a case where the node was lowered from Best way to solve this is return a
|
@dotnet/jit-contrib @kunalspathak this is ready - no diffs Current CI failure is unrelated. |
{ | ||
assert((node->OperGet() == GT_DIV) || (node->OperGet() == GT_MOD)); | ||
assert(nextNode != nullptr); |
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.
Should this be initialized *nextNode = nullptr
which should be the case if this method returns 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.
We have a similar TryLowerAndNegativeOne
with an out parameter nextNode
and we do not set that to nullptr
or when we return false
.
{ | ||
return newNode; | ||
return nextNode; |
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.
assert(nextNode != nullptr)
?
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.
The issue is that nextCode
can be a nullptr
even if the transformation was successful.
But, we could add an assert assert(nextNode == nullptr);
if the transformation wasn't successful.
@kunalspathak this is ready again |
Surprisingly the simplified test is still not simple, but don't want to waste your time trying to trim it further. |
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
Merging. CI failure is unrelated. |
Resolves #85630
Description
There was a case where the node was lowered from
LowerModPow2
butnode->gtNext
would returnnullptr
fromLowerConstIntDivOrMod
which indicates the node was not transformed when it actually was.Best way to solve this is return a
bool
indicating if the transformation was successful or not and also provide an out parameter for the next node to lower. So, this renamesLowerConstIntDivOrMod
toTryLowerConstIntDivOrMod
with an out parameter for the next node to lower.