add check for isl_map_lexmin_pw_multi_aff returning single cell expression
commit5e39c0992313fbac42bb0add937796030e2edb5b
authorSven Verdoolaege <sven@cerebras.net>
Tue, 14 Feb 2023 14:23:51 +0000 (14 15:23 +0100)
committerSven Verdoolaege <sven@cerebras.net>
Sat, 30 Mar 2024 13:41:51 +0000 (30 14:41 +0100)
treefa98415f6b94feedea98196ec9b2362346266f92
parent77297885a90670900f410ba20954e7683e354d4d
add check for isl_map_lexmin_pw_multi_aff returning single cell expression

This will illustrate the effect of an upcoming commit.
In particular, the test currently checks for the opposite
of the desired result.

It would be nicer if the actual result of isl_map_lexmin_pw_multi_aff
could be compared, but this is complicated by the fact that parsing
may change the representation of an isl_pw_multi_aff so that
it is no longer obviously equal to the input.
In particular, the result of isl_map_lexmin_pw_multi_aff is
{ [a] -> [(2a - 2*floor((5 + 5a)/6))] : 0 <= a <= 11 },
but it gets parsed as
{ [a] -> [(-2 - 2*floor((-1 - a)/6))] : 0 <= a <= 11 }.
Comparing the piecewise expressions using
isl_pw_multi_aff_is_equal instead of isl_pw_multi_aff_plain_is_equal
would not help since then it wouldn't be possible to make a distinction
based on the number of cells in the expression.

Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
isl_test2.cc