Check gtClassProfileCandidateInfo before instrumentation (#66388)
authorEgor Bogatov <egorbo@gmail.com>
Thu, 10 Mar 2022 18:40:34 +0000 (21:40 +0300)
committerGitHub <noreply@github.com>
Thu, 10 Mar 2022 18:40:34 +0000 (21:40 +0300)
src/coreclr/jit/fgprofile.cpp

index e947d6b..25de6f1 100644 (file)
@@ -1448,7 +1448,7 @@ public:
     Compiler::fgWalkResult PreOrderVisit(GenTree** use, GenTree* user)
     {
         GenTree* const node = *use;
-        if (node->IsCall())
+        if (node->IsCall() && (node->AsCall()->gtClassProfileCandidateInfo != nullptr))
         {
             GenTreeCall* const call = node->AsCall();
             if (call->IsVirtual() && (call->gtCallType != CT_INDIRECT))