From 21686238435b224acf7181c026b8fa2925bb0e4e Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 15 Jan 2012 16:12:49 +0100 Subject: [PATCH] isl_basic_map_remove_unknown_divs: restart whenever div has been removed The call to isl_basic_map_remove_dims may end up calling isl_basic_map_simplify, which may in turn remove additional divs if they no longer occur in any constraint. Signed-off-by: Sven Verdoolaege --- isl_map.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isl_map.c b/isl_map.c index d2d6759..b91fc27 100644 --- a/isl_map.c +++ b/isl_map.c @@ -1863,6 +1863,9 @@ __isl_give isl_basic_map *isl_basic_map_remove_unknown_divs( if (!div_is_unknown(bmap, i)) continue; bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, i, 1); + if (!bmap) + return NULL; + i = bmap->n_div; } return bmap; -- 2.7.4