-
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: enhance RBO inference for similar compares to constants #111766
Conversation
Thanks to dotnet#95234, RBO can draw inferences when the same value is compared to different constants, if the initial comparison dominates and was false. Generalize this to also handle cases where the initial comparison dominates and is true. Fixes dotnet#111725.
@EgorBo PTAL Should be a few hundred diffs. |
Seeing some failures, so evidently not quite so simple. |
Egor narrowed this down to
and jump threading makes the wrong inference, because it's not used to seeing inferred relops (apparently)... |
Going to refactor RBO a bit so |
Update clients to rely on `reverseSense` rather than parsing `vnRelation`. Also revised the and/or inference slightly as I found it hard to follow; hopefully it's clearer now. Fixes an issue that came up in testing dotnet#111766.
Waiting on #111803 |
) Update clients to rely on `reverseSense` rather than parsing `vnRelation`. Also revised the and/or inference slightly as I found it hard to follow; hopefully it's clearer now. Fixes an issue that came up in testing #111766.
@EgorBo I fixed the issue, 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.
Nice!
Thanks to #95234, RBO can draw inferences when the same value is compared to different constants, if the initial comparison dominates and was false. Generalize this to also handle cases where the initial comparison dominates and is true.
Fixes #111725.