-
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
[ARM64] - IsValidCompareChain
should return false
if both operands are not integral types
#74853
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details** Description ** The assert was this in // No float support or swapping op1 and op2 to generate cmp reg, imm.
assert(!varTypeIsFloating(op2Type)); Seems like float types are not supported on conditional compares, Compare chains will generate conditional compares, but the checks to see if an op is a valid compare chain did not include any type checks. This PR adds the checks; if the operands are integral types, op is a valid compare chain. ** Acceptance Criteria **
|
@kunalspathak @BruceForstall This is ready. |
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.
ContainCheckCompareChain
needs this check too. IsValidCompareChain
is only used for the AND path because it wants to ensure both children can be converted before converting either of them.
Yea, looks like we need to do that as well. Though, we do not have a test case that is failing as a result of not adding those checks there. |
Indeed, that code won't be exercised until after #73472 is merged. |
Change looks good to me. Thanks for fixing this! (and apologies for introducing it :) ) |
@a74nh No need to apologize, not a problem at all! I mentioned that PR so we a history trail. I mean, @jakobbotsch has fixed bugs introduced by my PRs before, so it happens to everyone :) |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2980890529 |
@TIHan an error occurred while backporting to release/7.0, please check the run log for details! Error: @TIHan is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=TIHan |
@dotnet/jit-contrib Can someone run the backport release7.0? It says I'm not a collaborator at the moment. |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2981385893 |
Description
Should resolve this assert: #74172
The assert was this in
genCodeForConditionalCompare
:Seems like float types are not supported on conditional compares,
ccmp
.The PR, #71705, introduced compare chains.
Compare chains will generate conditional compares, but the checks to see if an op is a valid compare chain did not include any type checks. This PR adds the checks; if the operands are integral types, op is a valid compare chain.
Acceptance Criteria