isl_tab_detect_implicit_equalities: also detect manifest equalities
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 7 Jun 2010 21:44:26 +0000 (23:44 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 12 Jun 2010 11:28:00 +0000 (13:28 +0200)
It's not clear why manifestly zero rows were ignored before.

isl_tab.c

index 741c27e..9068c71 100644 (file)
--- a/isl_tab.c
+++ b/isl_tab.c
@@ -2500,11 +2500,9 @@ int isl_tab_select_facet(struct isl_tab *tab, int con)
 static int may_be_equality(struct isl_tab *tab, int row)
 {
        unsigned off = 2 + tab->M;
-       return (tab->rational ? isl_int_is_zero(tab->mat->row[row][1])
-                             : isl_int_lt(tab->mat->row[row][1],
-                                           tab->mat->row[row][0])) &&
-               isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead,
-                                       tab->n_col - tab->n_dead) != -1;
+       return tab->rational ? isl_int_is_zero(tab->mat->row[row][1])
+                            : isl_int_lt(tab->mat->row[row][1],
+                                           tab->mat->row[row][0]);
 }
 
 /* Check for (near) equalities among the constraints.