re PR tree-optimization/38156 (gcc.dg/tree-ssa/update-unswitch-1.c fails when compile...
authorRazya Ladelsky <razya@il.ibm.com>
Wed, 19 Nov 2008 16:08:01 +0000 (16:08 +0000)
committerRazya Ladelsky <razya@gcc.gnu.org>
Wed, 19 Nov 2008 16:08:01 +0000 (16:08 +0000)
2008-11-19  Razya Ladelsky  <razya@il.ibm.com>

        PR target/38156
        * tree-parloops.c (loop_parallel_p): NULL vect_dump.
        (separate_decls_in_region): Create shared struct even when there
        are only reductions.

From-SVN: r142004

gcc/ChangeLog
gcc/tree-parloops.c

index c071c5a..47fe145 100644 (file)
@@ -1,3 +1,10 @@
+2008-11-19  Razya Ladelsky  <razya@il.ibm.com>
+
+        PR target/38156
+        * tree-parloops.c (loop_parallel_p): NULL vect_dump.
+       (separate_decls_in_region): Create shared struct even when there 
+       are only reductions.
+
 2008-11-19  Hariharan Sandanagobalane <hariharan@picochip.com>
        * config/picochip/picochip.c (headers): Remove an unnecessary
        header file.
index 0373205..d6e94b3 100644 (file)
@@ -278,6 +278,7 @@ loop_parallel_p (struct loop *loop, htab_t reduction_list,
       return false;
     }
 
+  vect_dump = NULL;
   simple_loop_info = vect_analyze_loop_form (loop);
 
   for (gsi = gsi_start_phis (loop->header); !gsi_end_p (gsi); gsi_next (&gsi))
@@ -1193,7 +1194,7 @@ separate_decls_in_region (edge entry, edge exit, htab_t reduction_list,
 
   VEC_free (basic_block, heap, body);
 
-  if (htab_elements (name_copies) == 0)
+  if (htab_elements (name_copies) == 0 && reduction_list == 0) 
     {
       /* It may happen that there is nothing to copy (if there are only
          loop carried and external variables in the loop).  */