From 422ab41e24c5ae2e32013b7c5643bae0f745b82f Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 4 May 2011 15:03:27 +0200 Subject: [PATCH] isl_map_range: correctly handle maps with 0D domains Internally, sets are represented as maps with unnamed, unstructured 0D domains. isl_map_range takes advantage of this fact, but only checked for 0D domains. This was correct when isl_map_range was added, but it should have been updated when named and structured spaces were introduced. Signed-off-by: Sven Verdoolaege --- isl_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_map.c b/isl_map.c index fbf95f7a..334f383f 100644 --- a/isl_map.c +++ b/isl_map.c @@ -3926,7 +3926,8 @@ struct isl_set *isl_map_range(struct isl_map *map) if (!map) goto error; - if (isl_map_dim(map, isl_dim_in) == 0) + if (isl_map_dim(map, isl_dim_in) == 0 && + !isl_dim_is_named_or_nested(map->dim, isl_dim_in)) return (isl_set *)map; map = isl_map_cow(map); -- 2.11.4.GIT