From: Sven Verdoolaege Date: Sat, 3 Mar 2012 22:52:06 +0000 (+0100) Subject: isl_union_map_is_subset: properly handle non-obviously empty subsets X-Git-Tag: isl-0.10~8^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4d79e58fa4077f88b5242631f016a554ddc9c31;p=platform%2Fupstream%2Fisl.git isl_union_map_is_subset: properly handle non-obviously empty subsets If the first argument of isl_union_map_is_subset contains an empty set in some space that is not present in the second argument, then isl_union_map_is_subset would incorrectly draw the conclusion that the first is not a subset of the second. Signed-off-by: Sven Verdoolaege --- diff --git a/isl_union_map.c b/isl_union_map.c index f62a302..d47df15 100644 --- a/isl_union_map.c +++ b/isl_union_map.c @@ -1672,6 +1672,11 @@ static int is_subset_entry(void **entry, void *user) entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, hash, &has_dim, map->dim, 0); if (!entry2) { + int empty = isl_map_is_empty(map); + if (empty < 0) + return -1; + if (empty) + return 0; data->is_subset = 0; return -1; }