graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi when the loop stride is zero.

2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
	when the loop stride is zero.

	* gcc.dg/graphite/id-16.c: New.

From-SVN: r154565
This commit is contained in:
Sebastian Pop 2009-11-25 04:56:21 +00:00 committed by Sebastian Pop
parent 60d2a8c3bb
commit 7cc4ff8d29
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
when the loop stride is zero.
* gcc.dg/graphite/id-16.c: New.
2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
* graphite-dependences.c (reduction_dr_1): New.

View File

@ -193,7 +193,11 @@ reduction_phi_p (sese region, gimple_stmt_iterator *psi)
reductions. */
if (simple_iv (loop, loop, res, &iv, true))
{
gsi_next (psi);
if (integer_zerop (iv.step))
remove_invariant_phi (region, psi);
else
gsi_next (psi);
return false;
}