Fix dotnet/coreclr#6517
authorBruce Forstall <brucefo@microsoft.com>
Fri, 5 Aug 2016 06:52:25 +0000 (23:52 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Fri, 5 Aug 2016 23:30:56 +0000 (16:30 -0700)
commit75d368f8bcd985676b069bd80f145aa049c24759
tree66255159c9b8d73762f421ff5ce880acf910900f
parentab6f7220b22c3ad489bf8fbd8e7b6914a14eac52
Fix dotnet/coreclr#6517

My previous change dotnet/coreclr#6342 to implement tailcall-via-helper for RyuJIT/x86
also changed non-x86 for Delegate Invoke calls, to avoid creating a
temp where we already had a local. However, this temp is needed if the
local is a field (with an offset). Even if it is not a field, I saw it
needed in a JitStressRegs case. So I'm returning it to the previous logic
for non-x86, non-tailcall cases. It is still required for tailcall cases
to preserve some delicate ordering constraints on the special tailcall
argument values.

Commit migrated from https://github.com/dotnet/coreclr/commit/021a224809af2104a1c488da1d717d9d80f35cc8
src/coreclr/src/jit/lower.cpp