Skip to content

Commit 2f8f6e7

Browse files
JIT: Skip extra SPMI queries when we don't know the exact type (#115637)
Fixes #114934.
1 parent dcf79a4 commit 2f8f6e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/coreclr/jit/importer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9936,9 +9936,10 @@ void Compiler::impImportBlockCode(BasicBlock* block)
99369936
impPushOnStack(gtNewLclvNode(lclNum, TYP_REF), tiRetVal);
99379937

99389938
#ifdef DEBUG
9939-
// Under SPMI, look up info we might ask for if we stack allocate this array
9939+
// Under SPMI, look up info we might ask for if we stack allocate this array,
9940+
// but only if we know the precise type
99409941
//
9941-
if (JitConfig.EnableExtraSuperPmiQueries())
9942+
if (JitConfig.EnableExtraSuperPmiQueries() && !eeIsSharedInst(resolvedToken.hClass))
99429943
{
99439944
void* pEmbedClsHnd;
99449945
info.compCompHnd->embedClassHandle(resolvedToken.hClass, &pEmbedClsHnd);

0 commit comments

Comments
 (0)