PR 24049
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Oct 2005 08:41:47 +0000 (08:41 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Oct 2005 08:41:47 +0000 (08:41 +0000)
        * passes.c (init_optimization_passes): Move pass_lower_vector_ssa
        under pass_vectorize.  Clear TODO_ggc_collect from the dce pass
        under pass_vectorize.

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

gcc/ChangeLog
gcc/passes.c
gcc/testsuite/gcc.dg/vect/pr24049.c [new file with mode: 0644]

index 1ef72bc..30d4aff 100644 (file)
@@ -1,3 +1,10 @@
+2005-10-06  Richard Henderson  <rth@redhat.com>
+
+       PR 24049
+       * passes.c (init_optimization_passes): Move pass_lower_vector_ssa
+       under pass_vectorize.  Clear TODO_ggc_collect from the dce pass
+       under pass_vectorize.
+
 2005-10-05  Devang Patel  <dpatel@apple.com>
 
        PR Debug/23205
index b03eae3..daa752e 100644 (file)
@@ -588,14 +588,19 @@ init_optimization_passes (void)
   /* NEXT_PASS (pass_may_alias) cannot be done again because the
      vectorizer creates alias relations that are not supported by
      pass_may_alias.  */
-  NEXT_PASS (pass_lower_vector_ssa);
   NEXT_PASS (pass_complete_unroll);
   NEXT_PASS (pass_iv_optimize);
   NEXT_PASS (pass_tree_loop_done);
   *p = NULL;
 
   p = &pass_vectorize.sub;
+  NEXT_PASS (pass_lower_vector_ssa);
+  /* ??? The loop optimizers are not GC safe.  See PR 21805.
+     Turn off GC while registering this pass.  */
+  pass_dce.todo_flags_finish &= ~TODO_ggc_collect;
   NEXT_PASS (pass_dce);
+  pass_dce.todo_flags_finish |= TODO_ggc_collect;
+  gcc_assert (p != &pass_dce.next);
   *p = NULL;
 
   p = &pass_loop2.sub;
diff --git a/gcc/testsuite/gcc.dg/vect/pr24049.c b/gcc/testsuite/gcc.dg/vect/pr24049.c
new file mode 100644 (file)
index 0000000..ee03fe3
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-vectorize --param ggc-min-heapsize=0 --param ggc-min-expand=0" } */
+
+int DES_CBCUpdate(unsigned char * output, int len)
+{
+  int work[2];
+  unsigned int i;
+  for(i = 0;i < len/8;i++)
+    unscrunch (&output[8*i], work);
+}