Kill RCX when used by shift
authorCarol Eidt <carol.eidt@microsoft.com>
Mon, 16 Jul 2018 18:37:40 +0000 (11:37 -0700)
committerCarol Eidt <carol.eidt@microsoft.com>
Tue, 17 Jul 2018 15:57:02 +0000 (08:57 -0700)
commitcf30649338af0d414842381245f5d5ae7d4fb7db
tree3af7716028afcab2b050a1ec97289279af2994e6
parent4f985c2ae58df83b7fd426fbb85cbba60ba9951b
Kill RCX when used by shift

RCX must be explicitly killed. Otherwise, if there's a case of a def/use conflict - as in this test case where the shift amount is defined by a divide that must go in RAX, it won't be explicitly assigned to RCX,.
Also, the handling of conflicts must not use the register assignment of the def on the use  if it conflicts with the use register requirements, and vice versa.

Fix dotnet/coreclr#18884

Commit migrated from https://github.com/dotnet/coreclr/commit/f48801ea7c1412e228a5230ec6cbeabdf5277ec0
src/coreclr/src/jit/lsra.h
src/coreclr/src/jit/lsrabuild.cpp
src/coreclr/src/jit/lsraxarch.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18884/GitHub_18884.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_18884/GitHub_18884.csproj [new file with mode: 0644]