The bmap field of a constraint may contain a basic map that is bounded
by more than one constraint. The constraint can therefore not be
added by simply taking the intersection with this bmap.
Instead, first create a basic map that exactly corresponds to the constraint
and then take the intersection with that basic map.
isl_dim_equal(bmap->dim, constraint->bmap->dim), goto error);
bmap = isl_basic_map_intersect(bmap,
- isl_basic_map_copy(constraint->bmap));
- isl_constraint_free(constraint);
+ isl_basic_map_from_constraint(constraint));
return bmap;
error:
isl_basic_map_free(bmap);