https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72749

--- Comment #14 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Author: segher
Date: Sun Jan 15 17:06:00 2017
New Revision: 244477

URL: https://gcc.gnu.org/viewcvs?rev=244477&root=gcc&view=rev
Log:
Make rtl_split_edge work for jumps that fall through (PR72749)

If a jump always falls through but that cannot be optimised away, like
is the case with the PowerPC bdnz insn if its jump target is the same as
the fallthrough, sched gets confused if it schedules some instructions
from before that jump instruction to behind it: it splits the
fallthrough branch, but the jump target isn't updated, and things fall
apart as in the PR.  This patch fixes it.

The second patch fragment makes -fsched-verbose=N work for N>=4; the
currently scheduled fragment can now contain a label.  Everything else
seems to work fine with that.


        PR target/72749
        * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
        fallthrough.
        * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
        in the currently scheduled RTL fragment.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgrtl.c
    trunk/gcc/haifa-sched.c

Reply via email to