isl_ast_build_expr.c: extract_modulo: consider additional cases
In particular, look for any constraints in the domain that are equal
or opposite to the div expression (modulo the denominator).
Looking for such constraints is fairly cheap and the constraint
expression is guaranteed to be non-negative over the domain.
This allows us to detect some modulos that are fairly "obvious"
from the point of view of a user. However, this will not catch
all "obvious" cases. In particular, the new heuristic will not
catch those cases where the div expression can be written as
the sum of two or more constraints (modulo the denominator).
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
15 files changed: