As explained in the commit message of 22c210c (isl_basic_map_gauss:
try not to remove any div definitions, Tue Sep 1 22:59:21 2009 +0200),
we should preserve known divs during isl_basic_map_simplify.
That commit only fixed the possible loss of known divs in
isl_basic_map_gauss. Here we fix the same problem in remove_duplicate_divs.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
unsigned total;
struct isl_ctx *ctx;
+ bmap = isl_basic_map_order_divs(bmap);
if (!bmap || bmap->n_div <= 1)
return bmap;
k = elim_for[l] - 1;
isl_int_set_si(eq.data[1+total_var+k], -1);
isl_int_set_si(eq.data[1+total_var+l], 1);
- eliminate_div(bmap, eq.data, l, 0);
+ eliminate_div(bmap, eq.data, l, 1);
isl_int_set_si(eq.data[1+total_var+k], 0);
isl_int_set_si(eq.data[1+total_var+l], 0);
}