Fix SBCG in value-numbering constant assertprop
authorChris McKinsey <chrismck@microsoft.com>
Tue, 21 Jun 2016 17:59:32 +0000 (10:59 -0700)
committerChris McKinsey <chrismck@microsoft.com>
Fri, 24 Jun 2016 16:47:29 +0000 (09:47 -0700)
commite3a8078a4b773cfeb367470713af713f34c898a0
tree924e66585f5eace8045ccccb3e34c7b020c99bbf
parentab9e7aae9c6d24d0ecbb5703974cb10407ff7c2f
Fix SBCG in value-numbering constant assertprop

Value-numbering can assign the same value number to nodes
of different type as long as they have the same bit-representation.
However when substituting a constant into a tree node of different
type, we want the bit-exact representation and not the same value.
Assertion prop should reinterpret int/float value changes rather
than coercing them.

Add an il test that exposes a bug in assertionprop when doing
value-numbering based constant propagation. A cpblk can be used
to copy a scalar value between differing types but for which there
is no change in bit representation.

Commit migrated from https://github.com/dotnet/coreclr/commit/9a6a40d9edcc3ea85a005afc3727d4fc0cc2ae7c
src/coreclr/src/jit/assertionprop.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/DevDiv_216571/DevDiv_216571.il [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/DevDiv_216571/DevDiv_216571.ilproj [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/DevDiv_216571/app.config [new file with mode: 0644]