Apply redundant branch optimizations in post-order of dominators (#57074)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Tue, 10 Aug 2021 09:48:28 +0000 (11:48 +0200)
committerGitHub <noreply@github.com>
Tue, 10 Aug 2021 09:48:28 +0000 (11:48 +0200)
commite6e7ef94b78bd73e84fc4c58138535d6e5b39911
tree8e9e56b6aa0e8872a1920ec64ca193d5ffbdad61
parentf03c9951118970766a781b5bcc49764e4eab6439
Apply redundant branch optimizations in post-order of dominators (#57074)

In #56979 we end up with outdated dominators and make a wrong decision
based on it. To avoid this situation, visit basic blocks in post-order
of the dominator tree to ensure that we have up-to-date dominators for
each basic block.

Fix #56979
src/coreclr/jit/redundantbranchopts.cpp
src/tests/JIT/Regression/JitBlue/Runtime_57074/Runtime_57074.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_57074/Runtime_57074.csproj [new file with mode: 0644]