OSDN Git Service

PR rtl-optimization/33648
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Nov 2007 23:27:23 +0000 (23:27 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Nov 2007 23:27:23 +0000 (23:27 +0000)
* cfgrtl.c (cfg_layout_split_edge): Initialize BB_PARTITION of
the newly created basic block.

* gcc.dg/pr33648.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129837 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfgrtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr33648.c [new file with mode: 0644]

index 72c1021..d164186 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/33648
+       * cfgrtl.c (cfg_layout_split_edge): Initialize BB_PARTITION of
+       the newly created basic block.
+
 2007-11-01  Richard Guenther  <rguenther@suse.de>
 
        * ggc-page.c (extra_order_size_tab): Add bitmap_head size.
index d261b03..b5a432e 100644 (file)
@@ -2696,6 +2696,10 @@ cfg_layout_split_edge (edge e)
                        ? NEXT_INSN (BB_END (e->src)) : get_insns (),
                        NULL_RTX, e->src);
 
+  if (e->dest == EXIT_BLOCK_PTR)
+    BB_COPY_PARTITION (new_bb, e->src);
+  else
+    BB_COPY_PARTITION (new_bb, e->dest);
   make_edge (new_bb, e->dest, EDGE_FALLTHRU);
   redirect_edge_and_branch_force (e, new_bb);
 
index 849f07e..dc4591b 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/33648
+       * gcc.dg/pr33648.c: New test.
+
 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/32384
diff --git a/gcc/testsuite/gcc.dg/pr33648.c b/gcc/testsuite/gcc.dg/pr33648.c
new file mode 100644 (file)
index 0000000..b5d46b7
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR rtl-optimization/33648 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fmodulo-sched -freorder-blocks-and-partition" } */
+
+unsigned res;
+
+void
+foo (unsigned code, int len)
+{
+  int i;
+  for (i = 0; i < len; i++)
+    res |= code & 1;
+}