From: Sven Verdoolaege Date: Sun, 1 Mar 2009 22:16:04 +0000 (+0100) Subject: isl_basic_map_eliminate_vars: clear divs first X-Git-Tag: isl-0.01~257 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd5ac025089b7b92de2ec25648ccc5727f76b2d3;p=platform%2Fupstream%2Fisl.git isl_basic_map_eliminate_vars: clear divs first --- diff --git a/isl_map_simplify.c b/isl_map_simplify.c index ae58079..37ec30c 100644 --- a/isl_map_simplify.c +++ b/isl_map_simplify.c @@ -1072,12 +1072,13 @@ struct isl_basic_map *isl_basic_map_eliminate_vars( for (d = pos + n - 1; d >= 0 && d >= pos; --d) bmap = remove_dependent_vars(bmap, d); + for (d = pos + n - 1; + d >= 0 && d >= total - bmap->n_div && d >= pos; --d) + isl_seq_clr(bmap->div[d-(total-bmap->n_div)], 2+total); for (d = pos + n - 1; d >= 0 && d >= pos; --d) { int n_lower, n_upper; if (!bmap) return NULL; - if (d >= total - bmap->n_div) - isl_seq_clr(bmap->div[d-(total-bmap->n_div)], 2+total); for (i = 0; i < bmap->n_eq; ++i) { if (isl_int_is_zero(bmap->eq[i][1+d])) continue;