Fix a few errors in cast decomposition.
authorPat Gavlin <pagavlin@microsoft.com>
Mon, 10 Apr 2017 23:26:17 +0000 (16:26 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Mon, 10 Apr 2017 23:26:17 +0000 (16:26 -0700)
commitfe1fa7391a2cf754aa021ae1089f1521c078ee3f
treebc7e4d888075cb047ef3eb908b0aaf3983c7fb43
parent9e037d996c7f4f61676a18bfe4adb782a5203cf6
Fix a few errors in cast decomposition.

The cursor was not guaranteed to be in the correct location after cast
decomposition due to the location in which the high result was typically
placed. This mispositioning can cause re-decomposition, which can lead
to asserts e.g. when encountering a GT_LONG node that was left behind by
a previously-decomposed node. This change ensures that the high result
immediately follows the cast node so that the cursor will be in the
correct location following decomposition of the cast.

Commit migrated from https://github.com/dotnet/coreclr/commit/ca9ce5fb59540f4a46952a1c807d7d397532c4b8
src/coreclr/src/jit/decomposelongs.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/DevDiv_406156/DevDiv_406156.il [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/DevDiv_406156/DevDiv_406156.ilproj [new file with mode: 0644]