diff --git a/src/coreclr/jit/fgprofile.cpp b/src/coreclr/jit/fgprofile.cpp index ef614baca4815f..33f922344cffcd 100644 --- a/src/coreclr/jit/fgprofile.cpp +++ b/src/coreclr/jit/fgprofile.cpp @@ -3297,6 +3297,15 @@ void EfficientEdgeCountReconstructor::Prepare() // void EfficientEdgeCountReconstructor::Solve() { + // If we have dynamic PGO data, we don't expect to see any mismatches, + // since the schema we got from the runtime should have come from the + // exact same JIT and IL, created in an earlier tier. + // + if (m_comp->fgPgoSource == ICorJitInfo::PgoSource::Dynamic) + { + assert(!m_mismatch); + } + // If issues arose earlier, then don't try solving. // if (m_badcode || m_mismatch || m_allWeightsZero)