Add more checking to GenTreeArrAddr::ParseArrayAddress()#100327
Add more checking to GenTreeArrAddr::ParseArrayAddress()#100327BruceForstall merged 1 commit intodotnet:mainfrom
GenTreeArrAddr::ParseArrayAddress()#100327Conversation
|
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.