JIT: Fix preheader weight computation (#58454)
authorAndy Ayers <andya@microsoft.com>
Wed, 1 Sep 2021 18:05:53 +0000 (11:05 -0700)
committerGitHub <noreply@github.com>
Wed, 1 Sep 2021 18:05:53 +0000 (11:05 -0700)
commit618abd6b35c72199e710312b9a533e5af8ec16f2
treed8ed1fe0b528e3638436bb1305fd58c1b56c99e1
parentf8f4aebcb92933209e6b2541fa307d9943c289e2
JIT: Fix preheader weight computation (#58454)

In some cases (currently only seen under pgo stress) we may have
edge count data that indicates a loop is not entered, and block count
data that indicates the loop is entered. Trust the block count data.

Fixes #58735.
src/coreclr/jit/optimizer.cpp