Commit 61298f69 by Andreas Simbuerger Committed by Sebastian Pop

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
parent 7ff28cc2
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.
* graphite-blocking.c: Removed cloog.h.
* graphite-dependences.c: Same.
......
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.
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment