From 0e7ec30e62379a9cc8a33f07bc540c488cfe4b69 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 9 Apr 2013 14:27:30 +0200 Subject: [PATCH] pet_check_code.c: add_assignment: completely remove any previous value In more complicated programs, the domain of the new assignment may not completely match the domain of a previous assignment, possibly due to simplifications in a context that is no longer available. Remove any previously assigned value to the same variable rather than just those with matching domain elements. Signed-off-by: Sven Verdoolaege --- pet_check_code.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pet_check_code.c b/pet_check_code.c index c524bf3..9371d51 100644 --- a/pet_check_code.c +++ b/pet_check_code.c @@ -323,7 +323,7 @@ static __isl_give isl_union_map *add_assignment( val = isl_map_uncurry(val); val = isl_map_reverse(val); - dom = isl_map_domain(isl_map_copy(val)); + dom = isl_set_universe(isl_space_domain(isl_map_get_space(val))); assignments = isl_union_map_subtract_domain(assignments, isl_union_set_from_set(dom)); assignments = isl_union_map_add_map(assignments, val); -- 2.11.4.GIT