Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/coreclr/jit/importercalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,17 @@ var_types Compiler::impImportCall(OPCODE opcode,
// complex expression. As it is evaluated after the args,
// it may cause registered args to be spilled. Simply spill it.
//
unsigned const lclNum = lvaGrabTemp(true DEBUGARG("VirtualCall with runtime lookup"));
if (compDonotInline())
if (!stubAddr->OperIs(GT_LCL_VAR))
{
return TYP_UNDEF;
}
unsigned const lclNum = lvaGrabTemp(true DEBUGARG("VirtualCall with runtime lookup"));
if (compDonotInline())
{
return TYP_UNDEF;
}

impStoreToTemp(lclNum, stubAddr, CHECK_SPILL_NONE);
stubAddr = gtNewLclvNode(lclNum, TYP_I_IMPL);
impStoreToTemp(lclNum, stubAddr, CHECK_SPILL_NONE);
stubAddr = gtNewLclvNode(lclNum, TYP_I_IMPL);
}

// Create the actual call node

Expand Down
Loading