re PR rtl-optimization/88347 (ICE in begin_move_insn, at sched-ebb.c:175)

PR rtl-optimization/88347
	PR rtl-optimization/88423
	* sched-deps.c (sched_analyze_insn): Take into account that for
	tablejumps the barrier appears after a label and a jump_table_data.

	* gcc.c-torture/compile/pr88347.c: New test.
	* gcc.c-torture/compile/pr88423.c: New test.

From-SVN: r269928
This commit is contained in:
Jeff Law 2019-03-25 17:33:36 -06:00
parent 0c9992c8b5
commit b9b0386a3e
5 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2019-03-25 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/88347
PR rtl-optimization/88423
* sched-deps.c (sched_analyze_insn): Take into account that for
tablejumps the barrier appears after a label and a jump_table_data.
2019-03-25 Martin Sebor <msebor@redhat.com>
PR c/89812

View File

@ -3005,6 +3005,11 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx_insn *insn)
if (JUMP_P (insn))
{
rtx_insn *next = next_nonnote_nondebug_insn (insn);
/* ??? For tablejumps, the barrier may appear not immediately after
the jump, but after a label and a jump_table_data insn. */
if (next && LABEL_P (next) && NEXT_INSN (next)
&& JUMP_TABLE_DATA_P (NEXT_INSN (next)))
next = NEXT_INSN (NEXT_INSN (next));
if (next && BARRIER_P (next))
reg_pending_barrier = MOVE_BARRIER;
else

View File

@ -1,3 +1,10 @@
2019-03-25 David Malcolm <dmalcolm@redhat.com>
PR rtl-optimization/88347
PR rtl-optimization/88423
* gcc.c-torture/compile/pr88347.c: New test.
* gcc.c-torture/compile/pr88423.c: New test.
2019-03-25 Martin Sebor <msebor@redhat.com>
PR c/89812

View File

@ -0,0 +1,4 @@
/* { dg-do compile { target { powerpc-*-* powerpcle-*-* } } } */
/* { dg-options "-mcpu=603e -fsched-stalled-insns -fsched2-use-superblocks -fschedule-insns2 -fno-dce -fno-guess-branch-probability --param max-cse-insns=4" } */
#include "../../gcc.target/powerpc/ppc-switch-2.c"

View File

@ -0,0 +1,5 @@
/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
/* { dg-options "-march=skylake -fPIC -fsched2-use-superblocks -fno-if-conversion" } */
/* { dg-require-effective-target fpic } */
#include "../../gcc.dg/20030309-1.c"