File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -613,8 +613,12 @@ class SubstitutePlaceholdersAndDevirtualizeWalker : public GenTreeVisitor<Substi
613613 if (tree->OperIs (GT_CALL))
614614 {
615615 GenTreeCall* call = tree->AsCall ();
616- // TODO-CQ: Drop `call->gtCallType == CT_USER_FUNC` once we have GVM devirtualization
617- bool tryLateDevirt = call->IsDevirtualizationCandidate (m_compiler) && (call->gtCallType == CT_USER_FUNC);
616+ bool tryLateDevirt = call->IsDevirtualizationCandidate (m_compiler);
617+ if (tryLateDevirt && call->gtCallType == CT_INDIRECT)
618+ {
619+ // For indirect calls, we can only late devirt if it's a generic virtual method for now.
620+ tryLateDevirt = call->IsGenericVirtual (m_compiler);
621+ }
618622
619623#ifdef DEBUG
620624 tryLateDevirt = tryLateDevirt && (JitConfig.JitEnableLateDevirtualization () == 1 );
You can’t perform that action at this time.
0 commit comments