Skip to content

Commit

Permalink
2018-06-07 Richard Biener <rguenther@suse.de>
Browse files Browse the repository at this point in the history
	PR tree-optimization/85935
	* graphite-scop-detection.c (find_params_in_bb): Analyze
	condition operands with respect to the correct loop.  Assert
	the analysis doesn't fail.

	* gcc.dg/graphite/pr85935.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261263 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rguenth committed Jun 7, 2018
1 parent ed76efe commit 7839597
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2018-06-07 Richard Biener <rguenther@suse.de>

PR tree-optimization/85935
* graphite-scop-detection.c (find_params_in_bb): Analyze
condition operands with respect to the correct loop. Assert
the analysis doesn't fail.

2018-06-04 Carl Love <cel@us.ibm.com>

* gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
Expand Down
4 changes: 3 additions & 1 deletion gcc/graphite-scop-detection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,13 +1176,15 @@ find_params_in_bb (sese_info_p region, gimple_poly_bb_p gbb)

/* Find parameters in conditional statements. */
gimple *stmt;
loop_p loop = GBB_BB (gbb)->loop_father;
FOR_EACH_VEC_ELT (GBB_CONDITIONS (gbb), i, stmt)
{
loop_p loop = gimple_bb (stmt)->loop_father;
tree lhs = scalar_evolution_in_region (region->region, loop,
gimple_cond_lhs (stmt));
tree rhs = scalar_evolution_in_region (region->region, loop,
gimple_cond_rhs (stmt));
gcc_assert (!chrec_contains_undetermined (lhs)
&& !chrec_contains_undetermined (rhs));

scan_tree_for_params (region, lhs);
scan_tree_for_params (region, rhs);
Expand Down
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2018-06-07 Richard Biener <rguenther@suse.de>

PR tree-optimization/85935
* gcc.dg/graphite/pr85935.c: New testcase.

2018-06-04 Carl Love <cel@us.ibm.com>

* gcc.target/powerpc/builtins-8-p9-runnable.c: Add additional
Expand Down
25 changes: 25 additions & 0 deletions gcc/testsuite/gcc.dg/graphite/pr85935.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* { dg-do compile } */
/* { dg-options "-O -floop-parallelize-all -fno-tree-loop-im --param scev-max-expr-size=3" } */

typedef int dq;

int gb;

void
qq (dq ww, int kk)
{
dq *up = &ww;

(void) *up;

while (kk < 1)
{
++ww;

if (ww == 0)
for (gb = 0; gb < 2; ++gb)
;

++kk;
}
}

0 comments on commit 7839597

Please sign in to comment.