OSDN Git Service

PR tree-optimization/40238
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 May 2009 07:56:32 +0000 (07:56 +0000)
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 May 2009 07:56:32 +0000 (07:56 +0000)
* tree-vect-stmts.c (vect_init_vector): Insert initialization
statements after basic block's labels.
* tree-vect-slp.c (vect_slp_transform_bb): Call destroy_bb_vec_info()
to free the allocated memory.

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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr40238.c [new file with mode: 0644]
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c

index 78985d3..5696b43 100644 (file)
@@ -1,3 +1,11 @@
+2009-05-25  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/40238
+       * tree-vect-stmts.c (vect_init_vector): Insert initialization
+       statements after basic block's labels.
+       * tree-vect-slp.c (vect_slp_transform_bb): Call destroy_bb_vec_info() 
+       to free the allocated memory.
+
 2009-05-24  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        * gcc/config/sh/sh.c (sh_set_return_address): Mark store of
index e0907db..7a72310 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-25  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/40238
+       * gcc.dg/vect/pr40238.c: New test.
+
 2009-05-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
            Dominique Dhumieres
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr40238.c b/gcc/testsuite/gcc.dg/vect/pr40238.c
new file mode 100644 (file)
index 0000000..91cf098
--- /dev/null
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+
+extern int xdo_rb_ctr_row( int *pos_code);
+
+int xgp_ahd_interpolate (int tile)
+{
+ int p[4];
+
+ switch (tile) {
+ default:
+ case 0:
+ case 1:
+  p[0] = 0; p[1] = 1; p[2] = 2; p[3] = 3;
+  break;
+ case 2:
+ case 3:
+  p[0] = 1; p[1] = 0; p[2] = 3; p[3] = 2;
+  break;
+ case 4:
+ case 5:
+  p[0] = 3; p[1] = 2; p[2] = 1; p[3] = 0;
+  break;
+ case 6:
+ case 7:
+  p[0] = 2; p[1] = 3; p[2] = 0; p[3] = 1;
+  break;
+ }
+
+ xdo_rb_ctr_row(p);
+ xdo_rb_ctr_row(p);
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
index ece3297..6c93210 100644 (file)
@@ -2089,6 +2089,7 @@ vect_slp_transform_bb (basic_block bb)
 
   if (vect_print_dump_info (REPORT_DETAILS))
     fprintf (vect_dump, "BB VECTORIZED\n");
-}
 
+  destroy_bb_vec_info (bb_vinfo);
+}
 
index 9ac733a..5ca8d94 100644 (file)
@@ -833,7 +833,7 @@ vect_init_vector (gimple stmt, tree vector_var, tree vector_type,
 
           gcc_assert (bb_vinfo);
           bb = BB_VINFO_BB (bb_vinfo);
-          gsi_bb_start = gsi_start_bb (bb);
+          gsi_bb_start = gsi_after_labels (bb);
           gsi_insert_before (&gsi_bb_start, init_stmt, GSI_SAME_STMT);
        }
     }