https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83962
--- Comment #3 from Andrey Belevantsev <abel at gcc dot gnu.org> --- Here we're trying remove a jump to the next block but fail to adjust the barrier. This is something that tidy_fallthru_edge would do for us, but we don't get to the point we can call it, before that the empty block gets merged to the previous block, so the edge to tidy disappears. I've made a patch to do these actions in a more correct order, i.e. fixup the edge from the empty block first and then dispatch to the code that will do more cleanups.