Fix flipped condition using mpz_sgn.

2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>

	* graphite-cloog-util.c
	(cloog_matrix_to_ppl_constraint): Fix flipped condition.
	* graphite-poly.c
	(psct_scattering_dim_for_loop_depth): Same.

From-SVN: r163137
This commit is contained in:
Andreas Simbuerger 2010-08-11 20:27:02 +00:00 committed by Sebastian Pop
parent 7ff28cc2a7
commit 61298f6999
4 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2010-08-02 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
* graphite-cloog-util.c
(cloog_matrix_to_ppl_constraint): Fix flipped condition.
* graphite-poly.c
(psct_scattering_dim_for_loop_depth): Same.
2010-08-02 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
* graphite-cloog-util.h: Added cloog.h.

View File

@ -1,3 +1,10 @@
2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
* graphite-cloog-util.c
(cloog_matrix_to_ppl_constraint): Fix flipped condition.
* graphite-poly.c
(psct_scattering_dim_for_loop_depth): Same.
2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
* gfortran.dg/graphite/id-20.f: New.

View File

@ -187,7 +187,7 @@ cloog_matrix_to_ppl_constraint (CloogMatrix *matrix, int row)
ppl_Linear_Expression_add_to_inhomogeneous (expr, coef);
ppl_delete_Coefficient (coef);
if (mpz_sgn (matrix->p[row][0]))
if (mpz_sgn (matrix->p[row][0]) == 0)
ppl_new_Constraint (&cstr, expr, PPL_CONSTRAINT_TYPE_EQUAL);
else
ppl_new_Constraint (&cstr, expr, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL);

View File

@ -1018,7 +1018,7 @@ psct_scattering_dim_for_loop_depth (poly_bb_p pbb, graphite_dim_t loop_depth)
ppl_Linear_Expression_coefficient (expr, iter, coef);
ppl_Coefficient_to_mpz_t (coef, val);
if (mpz_sgn (val))
if (mpz_sgn (val) == 0)
{
ppl_delete_Linear_Expression (expr);
continue;