diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2020-09-14 18:19:47 +0000 |
---|---|---|
committer | Segher Boessenkool <segher@kernel.crashing.org> | 2020-09-15 13:18:04 +0000 |
commit | bab581381681813ab3ccd007195777c1f816e656 (patch) | |
tree | 81a05638cc76bb2b90ca1781584dd1fc9b0ea8a7 /gcc | |
parent | c9de716a59c873859df3b3e1fbb993200fce5a73 (diff) | |
download | gcc-bab581381681813ab3ccd007195777c1f816e656.zip gcc-bab581381681813ab3ccd007195777c1f816e656.tar.gz gcc-bab581381681813ab3ccd007195777c1f816e656.tar.bz2 |
bb-reorder: Fix for ICEs caused by 69ca5f3a9882
After the previous patch we are left with an unreachable BB. This will
ICE if either we have -fschedule-fusion, or we do not have peephole2.
2020-09-15 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/96475
* bb-reorder.c (duplicate_computed_gotos): If we did anything, run
cleanup_cfg.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/bb-reorder.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 76e56b5..2ad5197 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -2760,6 +2760,10 @@ duplicate_computed_gotos (function *fun) if (computed_jump_p (BB_END (bb)) && can_duplicate_block_p (bb)) changed |= maybe_duplicate_computed_goto (bb, max_size); + /* Some blocks may have become unreachable. */ + if (changed) + cleanup_cfg (0); + /* Duplicating blocks will redirect edges and may cause hot blocks previously reached by both hot and cold blocks to become dominated only by cold blocks. */ |