Admit more dest addresses in block assign value-numbering.
authorPat Gavlin <pagavlin@microsoft.com>
Fri, 11 Nov 2016 18:20:59 +0000 (10:20 -0800)
committerPat Gavlin <pagavlin@microsoft.com>
Mon, 14 Nov 2016 23:13:31 +0000 (15:13 -0800)
commitf6eded26022145c80bf6309e59313a85d8a09f8d
treea41763966878a630da9439a74cde45bcd949daf0
parent388b1487baa32d9550c88997ba5d3368aeaba8b3
Admit more dest addresses in block assign value-numbering.

Internal testing revealed an assertion when computing the value number
for block assignments: the VN framework expected any block assignments
to a tracked lclVar to have a destination address of the form
`(addr (lclVar))` or `(addr (lclFld))`. However, the check that it
uses to determine whether or not a block assignment targets a lclVar
also admits addresses formed by some combination of adds of constants
to these patterns (e.g. `(add (const 4) (add (addr lclVar) (const 4)))`.

This fix admits these additional patterns in value numbering by allowing
`ExtendPtrVN(GenTree*, GenTree*)` to supply `NotAField` to
`ExtendPtrVN(GenTree*, FieldSeqNode*)`.
src/jit/valuenum.cpp
tests/src/JIT/Regression/JitBlue/DevDiv_278523/DevDiv_278523.il [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/DevDiv_278523/DevDiv_278523.ilproj [new file with mode: 0644]