Do not devirtualize indirect calls (dotnet/coreclr#13561)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 25 Aug 2017 16:28:21 +0000 (09:28 -0700)
committerGitHub <noreply@github.com>
Fri, 25 Aug 2017 16:28:21 +0000 (09:28 -0700)
commitad8f70ae7b45e82aaa2a1837397ac5d71c018455
tree1767979f2cdc5256fb0ac6f1bd0c056eb5ea75f6
parent5aa061c2d9193dd8e0471cfef854eb4b0d0dcc11
Do not devirtualize indirect calls (dotnet/coreclr#13561)

I'm seeing the affected code take the `impDevirtualizeCall` code path
with `CT_INDIRECT` calls. `gtCallMethHnd` is a `GenTreePtr` in that case
(it's a union) and passing that as as `CORINFO_METHOD_HANDLE` leads
to bad things.

Commit migrated from https://github.com/dotnet/coreclr/commit/06fc72a6205ce5c25631782c543a5e2f5e45b809
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_13561/GitHub_13561.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_13561/GitHub_13561.csproj [new file with mode: 0644]