On 04/07/2011 01:45 PM, Alexander Monakov wrote:
Hello,

This patch fixes a couple of places where code motion machinery wrongly
attempts to re-use a pointer to the last insn in a BB after control flow
following that BB has been changed (so the last jump might have been removed
or replaced).  This is not too frequent, so the solution is to simply
recompute the last instruction if we notice the CFG change.

Bootstrapped and regtested on x86_64-linux together with other recently
submitted sel-sched fixes; OK for trunk?  (I forgot to mention this in two
other e-mails; sorry).


2011-04-07  Dmitry Melnik<d...@ispras.ru>

        PR rtl-optimization/48235
        * sel-sched.c (code_motion_process_successors): Recompute the last
        insn in basic block if control flow changed.
        (code_motion_path_driver): Ditto.  Recompute the first insn as well.
        Update condition for ilist_remove.

testsuite:
        gcc.dg/pr48235.c: New.

Ok, thanks.

Reply via email to