isl_map_coalesce: fix stride constraint integer division harmonization
Commit
isl-0.18-43-g0b4256f662 (isl_map_coalesce: harmonize integer
divisions in stride constraints, Tue Oct 4 11:12:34 2016 +0200) introduced
a harmonization of integer divisions in stride constraints that
ends up getting used by the test case introduced in commit
isl-0.18-46-g5334f05998 (isl_basic_map_simplify: reduce coefficients
of integer divisions, Thu Jun 23 17:31:31 2016 +0200).
The final clearing of the constant term of the integer division
is, however, only valid if the integer division has been derived
directly from the equality constraint.
In the new test case, two disjuncts get combined first
that have the equality constraints from which the integer division
was derived replaced by a pair of inequality constraints.
However, the result still has another equality constraint that
could also be used to derive an expression for the integer division.
Since this expression is different, the clearing of the constant term
is not valid in this case.
Only perform the clearing of the constant if the equality constraint
is of the expected form. Note that this clearing is not needed
for the test case introduced in
isl-0.18-46-g5334f05998, even
though the equality constraint is of the expected form here.
Still, there may very well be other cases where this clearing
is required, so the clearing is still performed whenever possible.
Reported-by: Michael Kruse <MichaelKruse@meinersbur.de>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>