diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2010-04-02 12:13:22 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2010-04-02 12:13:22 +0200 |
commit | 8b77e25456e0dc54cbf8cc79422c0e102354a48b (patch) | |
tree | 2a8ee7d9b75d87030d6536beabbf2bed3e975c8d /isl_tab_pip.c | |
parent | ebc5d6d19b93cff8e8b774cc8fd801446508df7e (diff) | |
download | isl-8b77e25456e0dc54cbf8cc79422c0e102354a48b.tar.gz isl-8b77e25456e0dc54cbf8cc79422c0e102354a48b.tar.bz2 isl-8b77e25456e0dc54cbf8cc79422c0e102354a48b.zip |
isl_tab_pip.c: always set row sign of found row to isl_tab_row_neg
first_neg returns row that is obviously negative and usually
sets the sign of the row to isl_tab_row_neg. However, if
the row happens to be obviously negative because the big parameter
has a negative coefficient, then it would fail to set the row sign,
while update_row_sign check that the row sign is effectively set
to isl_tab_row_neg.
Diffstat (limited to 'isl_tab_pip.c')
-rw-r--r-- | isl_tab_pip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/isl_tab_pip.c b/isl_tab_pip.c index f8682901..a15015e6 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -1084,8 +1084,11 @@ static int first_neg(struct isl_tab *tab) for (row = tab->n_redundant; row < tab->n_row; ++row) { if (!isl_tab_var_from_row(tab, row)->is_nonneg) continue; - if (isl_int_is_neg(tab->mat->row[row][2])) - return row; + if (!isl_int_is_neg(tab->mat->row[row][2])) + continue; + if (tab->row_sign) + tab->row_sign[row] = isl_tab_row_neg; + return row; } for (row = tab->n_redundant; row < tab->n_row; ++row) { if (!isl_tab_var_from_row(tab, row)->is_nonneg) |