re PR rtl-optimization/46875 (ICE: verify_flow_info failed: too many outgoing branch edges from bb 3 with -Os -fselective-scheduling2)

PR rtl-optimization/46875
	* sched-vis.c (print_pattern): Dump "sequence" for ADDR_VECs.
	* sel-sched-ir.c (bb_has_removable_jump_to_p): Forbid table jumps.

testsuite:
	* gcc.dg/pr46875.c: New.

From-SVN: r167794
This commit is contained in:
Alexander Monakov 2010-12-14 15:43:47 +03:00
parent 02826ae997
commit b4550bf7ad
5 changed files with 42 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2010-12-14 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/46875
* sched-vis.c (print_pattern): Dump "sequence" for ADDR_VECs.
* sel-sched-ir.c (bb_has_removable_jump_to_p): Forbid table jumps.
2010-12-14 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
* config/h8300/h8300.md (define_split) : Add condition for

View file

@ -604,7 +604,7 @@ print_pattern (char *buf, const_rtx x, int verbose)
sprintf (buf, "asm {%s}", XSTR (x, 0));
break;
case ADDR_VEC:
break;
/* Fall through. */
case ADDR_DIFF_VEC:
print_value (buf, XEXP (x, 0), verbose);
break;

View file

@ -6148,7 +6148,8 @@ sel_is_loop_preheader_p (basic_block bb)
static bool
bb_has_removable_jump_to_p (basic_block jump_bb, basic_block dest_bb)
{
if (!onlyjump_p (BB_END (jump_bb)))
if (!onlyjump_p (BB_END (jump_bb))
|| tablejump_p (BB_END (jump_bb), NULL, NULL))
return false;
/* Several outgoing edges, abnormal edge or destination of jump is

View file

@ -1,4 +1,9 @@
2010-12-04 Jan Hubicka <jh@suse.cz>
2010-12-14 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/46875
* gcc.dg/pr46875.c: New.
2010-12-14 Jan Hubicka <jh@suse.cz>
* g++.dg/other/first-global.C: Update regexp to match new
names of ctors.

View file

@ -0,0 +1,27 @@
/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
/* { dg-options "-Os -fselective-scheduling2" } */
long
foo (int x, long *y)
{
long a = 0;
switch (x)
{
case 0:
a = *y;
break;
case 1:
a = *y;
break;
case 2:
a = *y;
break;
case 3:
a = *y;
break;
case 4:
a = *y;
break;
}
return a;
}