diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2010-06-27 18:50:23 +0200 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2010-06-27 20:36:52 +0200 |
commit | 09bb29c8f95cc3f3ddb3acf1de645beff31ec647 (patch) | |
tree | 0291a821554a1a7d0f6bf9adb8f1d1337d27ccc2 /isl_constraint.c | |
parent | 7c44f81ec955f061671b7f18480d627ac71f52bc (diff) | |
download | isl-09bb29c8f95cc3f3ddb3acf1de645beff31ec647.tar.gz isl-09bb29c8f95cc3f3ddb3acf1de645beff31ec647.tar.bz2 isl-09bb29c8f95cc3f3ddb3acf1de645beff31ec647.zip |
isl_basic_map_from_constraint: only return copy of bmap on equality constraints
Commit b39d157 (isl_basic_map_from_constraint: return copy of bmap in
constraint if possible) changed isl_basic_map_from_constraint to return
a copy when this bmap consists of a single constraint in order to handle
the case where a new constraint is created with unknown existentially
quantified variables. However, if the divs _are_ known, then the div
definition is simply thrown away. If the single constraint is an equality,
then it may be possible to recover the definition, but if it is an inequality,
then this is not possible and in fact it does not make sense to have unknown divs.
Therefore, only return a copy on equality constraints.
Diffstat (limited to 'isl_constraint.c')
-rw-r--r-- | isl_constraint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/isl_constraint.c b/isl_constraint.c index 86a8215a..96a088c9 100644 --- a/isl_constraint.c +++ b/isl_constraint.c @@ -400,7 +400,7 @@ __isl_give isl_basic_map *isl_basic_map_from_constraint( if (!constraint) return NULL; - if (constraint->bmap->n_eq + constraint->bmap->n_ineq == 1) { + if (constraint->bmap->n_eq == 1 && constraint->bmap->n_ineq == 0) { bmap = isl_basic_map_copy(constraint->bmap); isl_constraint_free(constraint); return bmap; |