[release/8.0-staging] JIT: Track sideness of arrOp in GetCheckedBoundArithInfo#100968
Merged
EgorBo merged 2 commits intodotnet:release/8.0-stagingfrom May 2, 2024
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
jakobbotsch
reviewed
Apr 13, 2024
| @@ -3066,8 +3066,11 @@ class CSE_Heuristic | |||
|
|
|||
| assert(vnStore->IsVNCompareCheckedBoundArith(oldCmpVN)); | |||
| vnStore->GetCompareCheckedBoundArithInfo(oldCmpVN, &info); | |||
Member
There was a problem hiding this comment.
What about the other uses of this function? Do they need to be changed too?
Member
Author
There was a problem hiding this comment.
@jakobbotsch I've inspected all uses and didn't find places where we might make wrong decisions due to order of operands (the only use of arrOp is this CSE where we compose a new VN and in rangecheck)
Member
Author
|
PTAL @AndyAyersMS @jakobbotsch (backport of #100848) |
jakobbotsch
approved these changes
May 2, 2024
jeffschwMSFT
approved these changes
May 2, 2024
Member
jeffschwMSFT
left a comment
There was a problem hiding this comment.
lgtm. we will take for consideration in 8.0.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #100809
Backport of #100848 to release/8.0-staging
Customer Impact
Reported in #100809, there is a very specific pattern that is incorrectly lowered by JIT into an invalid code. Unfortunately, there is no good workaround for it we can recommend + the pattern in question lives in the BCL so users can't change it. The minimal repro to hit the bug is:
Prints
Truein Release andFalsein Debug. The actual bug was introduced many releases ago, but it started to manifest only since .NET 8.0 because of an unrelated optimization (#81998) that exposed it.Regression
Regressed in .NET 8.0
Testing
Added a test
Risk
Low: it requires a very specific code pattern to hit