Fix loop scaling when removing a block (#72134)
authorBruce Forstall <brucefo@microsoft.com>
Fri, 15 Jul 2022 18:57:25 +0000 (11:57 -0700)
committerGitHub <noreply@github.com>
Fri, 15 Jul 2022 18:57:25 +0000 (11:57 -0700)
commitaa3eddbc3ed83f5dba65b1229e3f5d67aeff4a6c
tree81c6d300aa7ad9aa1b8b8ae3bc1c5cff27a7b318
parent5d8a81ebce66f85240d4ba230c7f5ebf77014260
Fix loop scaling when removing a block (#72134)

Due to very odd, stress-induced flow graph, on x86, the fall-through
predecessor block to an empty (but not unreachable) block was a
"catch" handler that was not reachable from the block's target (since
"catch" blocks don't have predecessors).

However, the code in fgRemoveBlock that was calling optScaleLoopBlocks
didn't make any sense, and removing it causes no diffs. So get rid of it.

Fixes #64764
src/coreclr/jit/fgbasic.cpp
src/coreclr/jit/optimizer.cpp
src/tests/JIT/Regression/JitBlue/Runtime_64764/Runtime_64764.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_64764/Runtime_64764.csproj [new file with mode: 0644]