isl_basic_map_insert: preserve rationality of input
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 13 Feb 2011 09:05:01 +0000 (10:05 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 13 Feb 2011 09:05:01 +0000 (10:05 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index 2aa42f1..750db19 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -2362,6 +2362,8 @@ __isl_give isl_basic_map *isl_basic_map_insert(__isl_take isl_basic_map *bmap,
 
        res = isl_basic_map_alloc_dim(res_dim,
                        bmap->n_div, bmap->n_eq, bmap->n_ineq);
+       if (isl_basic_map_is_rational(bmap))
+               res = isl_basic_map_set_rational(res);
        res = add_constraints_dim_map(res, bmap, dim_map);
        return isl_basic_map_finalize(res);
 }