re PR middle-end/53616 (416.gamess in SPEC CPU 2006 miscompiled)
authorRichard Guenther <rguenther@suse.de>
Tue, 24 Jul 2012 08:37:43 +0000 (08:37 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 24 Jul 2012 08:37:43 +0000 (08:37 +0000)
2012-07-24  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/53616
* tree-loop-distribution.c (ldist_gen): Do not change
partition ordering when merging partitions.

From-SVN: r189802

gcc/ChangeLog
gcc/tree-loop-distribution.c

index 7404a62a354634778a5c1de916718ac672316553..6c386867b1cefea5cab9382e67750b22e69d8428 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-24  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/53616
+       * tree-loop-distribution.c (ldist_gen): Do not change
+       partition ordering when merging partitions.
+
 2012-07-24  Alan Modra  <amodra@gmail.com>
 
        PR target/53914
index 58ed12b1e69003953921a1552cd05da28be24034..18df9fbd249917560b2e620932f706798addbfe4 100644 (file)
@@ -1289,16 +1289,25 @@ ldist_gen (struct loop *loop, struct graph *rdg,
          nbp = 0;
          goto ldist_done;
        }
-      for (i = 0; VEC_iterate (partition_t, partitions, i, into); ++i)
-       if (!partition_builtin_p (into))
-         break;
-      for (++i; VEC_iterate (partition_t, partitions, i, partition); ++i)
-       if (!partition_builtin_p (partition))
-         {
-           bitmap_ior_into (into->stmts, partition->stmts);
-           VEC_ordered_remove (partition_t, partitions, i);
-           i--;
-         }
+      /* Only fuse adjacent non-builtin partitions, see PR53616.
+         ???  Use dependence information to improve partition ordering.  */
+      i = 0;
+      do
+       {
+         for (; VEC_iterate (partition_t, partitions, i, into); ++i)
+           if (!partition_builtin_p (into))
+             break;
+         for (++i; VEC_iterate (partition_t, partitions, i, partition); ++i)
+           if (!partition_builtin_p (partition))
+             {
+               bitmap_ior_into (into->stmts, partition->stmts);
+               VEC_ordered_remove (partition_t, partitions, i);
+               i--;
+             }
+           else
+             break;
+       }
+      while ((unsigned) i < VEC_length (partition_t, partitions));
     }
   else
     {