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

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Author: segher
Date: Wed Nov 30 14:47:01 2016
New Revision: 243028

URL: https://gcc.gnu.org/viewcvs?rev=243028&root=gcc&view=rev
Log:
ira: Don't substitute into TRAP_IF insns (PR78610)

In the testcase, IRA propagates a constant into a TRAP_IF insn, which
then becomes an unconditional trap.  Unconditional traps are control
flow insns so doing this requires surgery on the cfg.  We cannot do
that here, so instead refuse to do the substitution.


        PR rtl-optimization/78610
        * ira.c (combine_and_move_insns): Don't substitute into TRAP_IF
        instructions.

gcc/testsuite/
        PR rtl-optimization/78610
        * gcc.c-torture/compile/pr78610.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr78610.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to