OSDN Git Service

Fix flipped condition using mpz_sgn.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Aug 2010 20:27:02 +0000 (20:27 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Aug 2010 20:27:02 +0000 (20:27 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163137 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ChangeLog.graphite
gcc/graphite-cloog-util.c
gcc/graphite-poly.c

index 2047ed8..f9f2ded 100644 (file)
@@ -1,5 +1,12 @@
 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.
index fa59c75..806d67e 100644 (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.
index 21a7872..33ee5cf 100644 (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);
index 67b9384..7d33aa8 100644 (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;