JIT: fix bug in jump threading (#85942)
authorAndy Ayers <andya@microsoft.com>
Tue, 9 May 2023 18:20:32 +0000 (11:20 -0700)
committerGitHub <noreply@github.com>
Tue, 9 May 2023 18:20:32 +0000 (11:20 -0700)
commit66b8aaf5880c4a2ac8532c82d3b79c06b324618d
tree831cf16faf5073e0782f9c3fa98afa353fe949aa
parent8adbca4855b6a12a057c6176d1e909c66cb1f01d
JIT: fix bug in jump threading (#85942)

Verify that the purported dominator of a block to be jump threaded dominates
all of the block's predecessors.

This will initially be true (modulo some odd cases with finally continuations),
but if we've jump threaded through the dominator it may not remain true as
we do not update dominators when optimizing.

Fixes #85892.
src/coreclr/jit/redundantbranchopts.cpp
src/tests/JIT/Regression/JitBlue/Runtime_85892/Runtime_85892.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_85892/Runtime_85892.csproj [new file with mode: 0644]