]> gcc.gnu.org Git - gcc.git/commitdiff
Fix loop distribution bug with merging edges that creates too many edges.
authorJim Wilson <jim.wilson@linaro.org>
Thu, 10 Nov 2016 15:20:59 +0000 (15:20 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 10 Nov 2016 15:20:59 +0000 (07:20 -0800)
gcc/
* tree-loop-distribution.c (pg_add_dependence_edges): Return 2 if
this_dir is 2.  Check for this_dir non-zero before dir != this_dir
check.

From-SVN: r242038

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

index 9e93f793453deff225c81b4a157b94aff4ca6577..1e13f598d6fc544753b93a9138073ebd0ef8b7ba 100644 (file)
@@ -1,3 +1,9 @@
+2016-11-10  Jim Wilson  <jim.wilson@linaro.org>
+
+       * tree-loop-distribution.c (pg_add_dependence_edges): Return 2 if
+       this_dir is 2.  Check for this_dir non-zero before dir != this_dir
+       check.
+
 2016-11-10  Jakub Jelinek  <jakub@redhat.com>
 
        * omp-low.c (lower_omp_target): Fix up argument to is_reference.
index 5580f286ccfc79eeb72ca1828bde95929fcee31b..902cf30b78a25a17b62b4aff391b4f0cc8b9f0e1 100644 (file)
@@ -1408,9 +1408,11 @@ pg_add_dependence_edges (struct graph *rdg, vec<loop_p> loops, int dir,
        else
          this_dir = 0;
        free_dependence_relation (ddr);
-       if (dir == 0)
+       if (this_dir == 2)
+         return 2;
+       else if (dir == 0)
          dir = this_dir;
-       else if (dir != this_dir)
+       else if (this_dir != 0 && dir != this_dir)
          return 2;
        /* Shuffle "back" dr1.  */
        dr1 = saved_dr1;
This page took 0.096808 seconds and 5 git commands to generate.