Fix value numbering when selecting a constant (dotnet/coreclr#18627)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Tue, 26 Jun 2018 14:57:47 +0000 (16:57 +0200)
committerAndy Ayers <andya@microsoft.com>
Tue, 26 Jun 2018 14:57:47 +0000 (07:57 -0700)
commita019f994f6ce2ec09ac7b3abd1e05ba75d64c350
tree43fd1ea8fa8d053cf98713cdc0cc6a199c04daec
parent174627ed845b1c1265ba8066562dd1a6e2393d3c
Fix value numbering when selecting a constant (dotnet/coreclr#18627)

When applying selectors, constants were special-cased to not require any
type casts. However this is wrong if a narrowing needs to be performed.

Fix dotnet/coreclr#18235

Commit migrated from https://github.com/dotnet/coreclr/commit/4e237f058b12403f7ee69d62fd24053081d5fe13
src/coreclr/src/jit/valuenum.cpp
src/coreclr/tests/arm/Tests.lst
src/coreclr/tests/arm64/Tests.lst
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18235/GitHub_18235_1.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18235/GitHub_18235_1.csproj [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18235/GitHub_18235_2.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18235/GitHub_18235_2.csproj [new file with mode: 0644]