JIT: update byref null check logic to handle field chains (#23850)
authorAndy Ayers <andya@microsoft.com>
Fri, 12 Apr 2019 07:44:39 +0000 (00:44 -0700)
committerGitHub <noreply@github.com>
Fri, 12 Apr 2019 07:44:39 +0000 (00:44 -0700)
commit72d49127a0c25e4b931c81e621c2411bfb6633a5
treefe079e9ca55688827fd69817b9822b644a711778
parent1660956bca91b93259393419cb169a10df088926
JIT: update byref null check logic to handle field chains (#23850)

The jit was not properly accumulating offsets when figuring out if a byref
should be null checked.

Use a non-null MorphAddressContext as indication that GT_FIELD and GT_IND
nodes are actually part of an ongoing address computation.

During field morphing propagate the current address context to the child node,
instead of starting a new one.

Fixes #23791.
src/jit/morph.cpp
tests/src/JIT/Regression/JitBlue/GitHub_23791/GitHub_23791.cs [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/GitHub_23791/GitHub_23791.csproj [new file with mode: 0644]