summaryrefslogtreecommitdiff
path: root/isl_tab_pip.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2012-06-09 15:10:04 +0200
committerSven Verdoolaege <skimo@kotnet.org>2012-06-09 15:29:36 +0200
commit7e9213eaf6364d5619fca8d230bf1df1b26bdc17 (patch)
tree82464373e181bd2d5d17df16fa421c395878c67d /isl_tab_pip.c
parent9fe3e28eba0fa07d33bca85e481ff057c803c83d (diff)
downloadisl-7e9213eaf6364d5619fca8d230bf1df1b26bdc17.tar.gz
isl-7e9213eaf6364d5619fca8d230bf1df1b26bdc17.tar.bz2
isl-7e9213eaf6364d5619fca8d230bf1df1b26bdc17.zip
isl_tab_basic_map_partial_lexopt: don't normalize intermediate div expressions
The function get_row_parameter_div would call normalize_div before finishing the construction of the div expression. In particular, it would call normalize_div before negating the coefficients. Since normalize_div may round down the constant term, the result of first normalizing and then negating may result in a different div than first negating and then normalizing. Call normalize_div only after negating the coefficients. Reported-by: Alexandre Isoard <alexandre.isoard@ens-lyon.fr> Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Diffstat (limited to 'isl_tab_pip.c')
-rw-r--r--isl_tab_pip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/isl_tab_pip.c b/isl_tab_pip.c
index 74564db3..dd95d885 100644
--- a/isl_tab_pip.c
+++ b/isl_tab_pip.c
@@ -789,8 +789,8 @@ static struct isl_vec *get_row_parameter_div(struct isl_tab *tab, int row)
isl_int_set(div->el[0], tab->mat->row[row][0]);
get_row_parameter_line(tab, row, div->el + 1);
- normalize_div(div);
isl_seq_neg(div->el + 1, div->el + 1, div->size - 1);
+ normalize_div(div);
isl_seq_fdiv_r(div->el + 1, div->el + 1, div->el[0], div->size - 1);
return div;