diff --git a/src/coreclr/jit/fgprofile.cpp b/src/coreclr/jit/fgprofile.cpp index 33f922344cffcd..37a781894b815d 100644 --- a/src/coreclr/jit/fgprofile.cpp +++ b/src/coreclr/jit/fgprofile.cpp @@ -3627,7 +3627,7 @@ void EfficientEdgeCountReconstructor::Propagate() // for the OSR entry block. // // Arguments: -// block - block in question +// block - block in question (OSR entry) // info - model info for the block // nSucc - number of successors of the block in the flow graph // @@ -3666,7 +3666,13 @@ void EfficientEdgeCountReconstructor::PropagateOSREntryEdges(BasicBlock* block, } assert(nEdges == nSucc); - assert(info->m_weight > BB_ZERO_WEIGHT); + + if (info->m_weight == BB_ZERO_WEIGHT) + { + JITDUMP("\nPropagate: OSR entry block weight is zero\n"); + EntryWeightZero(); + return; + } // Transfer model edge weight onto the FlowEdges as likelihoods. //