diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index c1a5f3c602b8a..34ac6920f482e 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -13527,13 +13527,13 @@ void Compiler::fgComputeBlockAndEdgeWeights() JITDUMP(" -- no profile data, so using default called count\n"); } - if (isOptimizing) + if (usingProfileWeights && isOptimizing) { fgComputeEdgeWeights(); } else { - JITDUMP(" -- not optimizing, so not computing edge weights\n"); + JITDUMP(" -- not optimizing or no profile data, so not computing edge weights\n"); } }