From 0f9b1fd5e85993d21cc1e61688e9517bc149febd Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 28 Feb 2009 15:16:44 +0100 Subject: [PATCH] isl_basic_map_eliminate_vars: remove all dependent vars first --- isl_map_simplify.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/isl_map_simplify.c b/isl_map_simplify.c index 0920d8aa..ae58079f 100644 --- a/isl_map_simplify.c +++ b/isl_map_simplify.c @@ -1069,9 +1069,11 @@ struct isl_basic_map *isl_basic_map_eliminate_vars( total = isl_basic_map_total_dim(bmap); bmap = isl_basic_map_cow(bmap); + for (d = pos + n - 1; d >= 0 && d >= pos; --d) + bmap = remove_dependent_vars(bmap, d); + for (d = pos + n - 1; d >= 0 && d >= pos; --d) { int n_lower, n_upper; - bmap = remove_dependent_vars(bmap, d); if (!bmap) return NULL; if (d >= total - bmap->n_div) -- 2.11.4.GIT