isl_tab_basic_map_partial_lexopt: properly normalize divs
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 21 Feb 2012 15:27:28 +0000 (16:27 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 21 Feb 2012 15:37:37 +0000 (16:37 +0100)
commite8f088101ca4ec8ffa55c8957663d8cba926aa25
tree06cf5b6f4ddbcc5790b6eb35ef8706b3f9ee80d4
parent8b5a230beac61fb0886a3d4fc6aff7b8e8887603
isl_tab_basic_map_partial_lexopt: properly normalize divs

We were only dividing out common divisors that also divide
the constant term, but we should ignore the constant term
while determining the greatest common divisor.

We already properly normalize the constraints and not properly
normalizing the divs could result in div constraints not being
recognized as such.  In particular, inside isl_map_affine_hull,
div constraints are added inside the call to isl_basic_map_overlying_set.
Usually, these constraints are removed again in remove_redundant_divs,
but they would remain if the the divs are not properly normalized.

Now, arguably, we shouldn't be adding div constraints inside
isl_map_affine_hull, but a proper normalization of divs is useful in any case.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_tab_pip.c
isl_test.c