Fix for 15671#15756
Conversation
|
@mikedn PTAL |
|
@AndyAyersMS PTAL |
|
Looks plausible enough at first glance. Let me think about it a while. Any data on the CQ/CS impact? |
|
Make sense I guess, I haven't though about using if (tree->OperIs(GT_ARR_LENGTH) && !tree->AsArrLen()->ArrRef()->gtVNPair.BothEqual())
{
vnlib = tree->GetVN(VNK_Conservative);
}It will be interesting to see jit-diff results, mine resulted in some 2kbytes improvements (!!!) due to CSE no longer being done in some cases. But of course, some range checks were no longer eliminated unfortunately. |
|
Without the check for GTF_GLOB_REF, I saw a lots of methods with large regressions, with the check, there are a mix of gains and losses, with only small method size changes. This is using the Desktop build for my diffs.. |
|
@dotnet/dnceng @jashook ARM64 testing seems to be in a bad way |
The .NET Core build produces this diff: Example diff that shows a range check no longer being eliminated: https://gist.github.com/mikedn/d1f519b534806c4c29bd35e2bcbdcefb It's unfortunate but it doesn't look like there are easy solutions to make the fix less conservative. |
|
@AndyAyersMS should I check this in? |
AndyAyersMS
left a comment
There was a problem hiding this comment.
Yes, looks good.
CQ impact was less than I expected, so that's a pleasant surprise.
If we are fetching an Array Length for an array ref that came from global memory then for CSE safety we must use the conservative value number for both
If we are fetching an Array Length for an array ref that came from global memory
then for CSE safety we must use the conservative value number for both