summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/sched-vis.c2
-rw-r--r--gcc/sel-sched-ir.c3
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.dg/pr46875.c27
5 files changed, 42 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8d03fce20f3..78ca0480a21 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c
index 83c423a9670..d4a5644f6c7 100644
--- a/gcc/sched-vis.c
+++ b/gcc/sched-vis.c
@@ -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;
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index e1c68764184..468dfd7a3e6 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bbf4627780f..33be340e9bb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/gcc.dg/pr46875.c b/gcc/testsuite/gcc.dg/pr46875.c
new file mode 100644
index 00000000000..c601708dc11
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr46875.c
@@ -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;
+}