isl_*_partial_lex{min,max}_pw_multi_aff: fix handling of existentials
commit38b12d93911e8530dde53073b0e4386b71263014
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 18 Jul 2016 14:11:29 +0000 (18 16:11 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 19 Jul 2016 10:15:16 +0000 (19 12:15 +0200)
tree400ea9a2b4748f24e85ca2b960c403e5ad44da13
parent15a7c6a4859482c8b7b202bf8565fda70d874739
isl_*_partial_lex{min,max}_pw_multi_aff: fix handling of existentials

Support for handling existentially quantified variables was added in
dc6b61f (isl_*_partial_lex{min,max}_pw_multi_aff: handle existentially
quantified vars, Thu Jun 16 15:36:00 2016 +0200).  In particular,
any unknown integer divisions in the context were moved to the end and
dropped before constructing affine expressions.

The solution may however depend on those unknown integer divisions
if some newly added integer divisions that are used in the description
of the solution have been found to be linear combinations of
the unknown integer divisions.  A mechanism was therefore introduced
to try and undo this effect.
However, as illustrated by the new test case, this does not always succeed
because the expression of some newly added integer division may
also have been rewritten in terms of the unknown integer divisions,
complicating both the detection of which integer divisions were unknown
to begin with and the removal of the dependence on these unknown
integer divisions.

Instead of trying to undo the effect of a newly introduced integer division
having been treated as a linear combination of unknown integer divisions,
make sure this does not happen by inserting them in front of
the unknown integer divisions.

Reported-by: Michael Kruse <MichaelKruse@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_tab_pip.c
isl_test.c