Free dominance info at the beginning of pass_jump_after_combine
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 12 Nov 2019 14:24:35 +0000 (14:24 +0000)
committerIlya Leoshkevich <iii@gcc.gnu.org>
Tue, 12 Nov 2019 14:24:35 +0000 (14:24 +0000)
commite2d3e85c877af1cdade1dbbb95955c31932caa87
tree1f76b96a09d6c95ae8895c0b4d7a30b5f4d29a43
parent41098a37444b69d7b3b3072fde52e2785bef7012
Free dominance info at the beginning of pass_jump_after_combine

try_forward_edges does not update dominance info, and merge_blocks
relies on it being up-to-date.  In PR92430 stale dominance info makes
merge_blocks produce a loop in the dominator tree, which in turn makes
delete_basic_block loop forever.

Fix by freeing dominance info at the beginning of cleanup_cfg.

gcc/ChangeLog:

2019-11-12  Ilya Leoshkevich  <iii@linux.ibm.com>

PR rtl-optimization/92430
* cfgcleanup.c (pass_jump_after_combine::execute): Free
dominance info at the beginning.

gcc/testsuite/ChangeLog:

2019-11-12  Ilya Leoshkevich  <iii@linux.ibm.com>

PR rtl-optimization/92430
* gcc.dg/pr92430.c: New test (from Arseny Solokha).

From-SVN: r278095
gcc/ChangeLog
gcc/cfgcleanup.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr92430.c [new file with mode: 0644]