isl_ast_expr_from_constraint: detect stride constraints
In particular, if an equality is of the form
e - d floor(e/d) = 0
then directly convert it into
e % d == 0
with '%' the isl_ast_op_zdiv_r operator.
Do this rather than the default procedure of
checking if (some variation of) e is non-negative and replacing
d floor(e/d) by e - (e mod d).
This saves some needless processing, but more importantly,
it allows us to detect stride conditions even when e cannot
be proven to be non-negative.
For example, we can now write
if (n % 2 == 0)
instead of
if (2 * floord(n, 2) == n)
even when nothing is known about n.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>