Preserve value numbers when discarding a cast.
authorEugene Rozenfeld <erozen@microsoft.com>
Fri, 12 Feb 2016 00:41:31 +0000 (16:41 -0800)
committerEugene Rozenfeld <erozen@microsoft.com>
Fri, 12 Feb 2016 00:41:31 +0000 (16:41 -0800)
commitcdac5f06ecdd6f742f2fd0e0b0a4574eac6ba317
tree777642b5e5ab8783c05e16d72ca9b55097d294a3
parente683c0b63dcfa2352679661db75a12d1837ba2da
Preserve value numbers when discarding a cast.

This is a fix for an assert during CSE. After processing a CSE definition
the tree got morphed. During morphing a cast was discarded by narrowing
the operand of the cast. The value number of the operand was cleared. Later,
when processing a use of the CSE, the code was attempting to process the side effects
in the tree of the use and was encountering a node with no value number resulting
in an assert. The fix is to transfer the value number from the cast node to the narrowed
operand.
src/jit/compiler.h
src/jit/gentree.h
src/jit/morph.cpp
src/jit/optimizer.cpp
tests/src/JIT/Regression/JitBlue/devdiv_180411/app.config [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/devdiv_180411/devdiv_180411.il [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/devdiv_180411/devdiv_180411.ilproj [new file with mode: 0644]