-
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: fix issue with assert seen in OSR+PGO tests #69067
Conversation
`IsIconHandle` only works if we know the tree is an integer. Closes dotnet#69032.
Tagging subscribers to this area: @JulieLeeMSFT Issue Details
Closes #69032.
|
@BruceForstall PTAL |
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 there any reason we couldn't just move these functions into GenTreeIntCon
?
src/coreclr/jit/gentree.cpp
Outdated
@@ -16487,7 +16487,7 @@ bool GenTree::IsBlockProfileUpdate() | |||
|
|||
GenTree* const addr = lhs->AsIndir()->Addr(); | |||
|
|||
return addr->IsIconHandle(GTF_ICON_BBC_PTR); | |||
return addr->IsIntegralConst() && addr->IsIconHandle(GTF_ICON_BBC_PTR); |
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 suppose the more technically correct test would be IsCnsIntOrI
as IsIntegralConst
will be true
for CNS_LNG
as well.
You mean the |
Seems like I should also add a test. |
Yes (for all the functions around here that assert Either that or I think |
Ok, let me look into moving those -- depending on what I see for callers I'll either generalize them to work for any tree or move them down off the base class. |
There are about 100 uses so seems like generalizing them to work for any tree would be the least disruptive. |
Ok, I made There is also quite a bit of code that checks for non-handle ints: |
IsIconHandle
only works if we know the tree is an integer.Closes #69032.