aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <jim.wilson@linaro.org>2016-11-10 15:20:59 +0000
committerJim Wilson <wilson@gcc.gnu.org>2016-11-10 07:20:59 -0800
commitdd18c8c32a865a5432338d1959afefa42bebb718 (patch)
tree38eb3a996aa140e8305bd762262d03601489a352 /gcc
parentb4c3a85be96585374bf95c981ba2f602667cf5b7 (diff)
downloadgcc-dd18c8c32a865a5432338d1959afefa42bebb718.zip
gcc-dd18c8c32a865a5432338d1959afefa42bebb718.tar.gz
gcc-dd18c8c32a865a5432338d1959afefa42bebb718.tar.bz2
Fix loop distribution bug with merging edges that creates too many edges.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-loop-distribution.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9e93f79..1e13f59 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 5580f28..902cf30 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -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;