-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add more checking to GenTreeArrAddr::ParseArrayAddress()
#100327
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
Add more checking to GenTreeArrAddr::ParseArrayAddress()
#100327
Conversation
|
Extracted from #94250 |
|
There are a few diffs in ILGEN tests that construct array index expressions with negative indices. |
|
With JitOptRepeat we end up with the following situation. We hit the assert: (e.g., We start with: After optimization, this becomes: On the next iteration of JitOptRepeat, the CSE injected COMMA is not parseable by However, it might be harder for the CSE use. In that case, we start with something similar: and, after CSE, have: This would require parsing the CSE value number for Since this is VN iteration #2, I'm not sure we lose anything by assigning the |
f41383c to
c5824f8
Compare
|
@jakobbotsch PTAL |
|
It's interesting that there are diffs on x86, apparently because the offset of data of an array from the base of an array is 8 (it is 16 on 64-bit). This happens to be the same size as a pointer and a The result is that we give the |
If the ARR_ADDR node doesn't make sense, namely if the array offset does not appear to be in the array, then bail.
c5824f8 to
fc5333d
Compare
|
GitHub is confused; all the tests passed. |
If the ARR_ADDR node doesn't make sense, namely if the array offset does not appear to be in the array, then bail.