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
This commit is contained in:
Jim Wilson 2016-11-10 15:20:59 +00:00 committed by Jim Wilson
parent b4c3a85be9
commit dd18c8c32a
2 changed files with 10 additions and 2 deletions

View 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.

View 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;