clast: drop loops with fractional lower and upper bounds in same unit interval
If the lower or upper bound of a loop is a fractional constant,
then clast_bound_from_constraint will round it up or down.
If both constant bounds happen to lie inside the same unit interval,
then the rounded up lower bound will actually end up being
larger than the rounded down upper bound, resulting in code
like
for (t0=200;t0<=199;t0++) {
for (t2=50*t0;t2<=9999;t2++) {
for (t3=0;t3<=t2;t3++) {
S1(i = t0,j = t2,k = t3) ;
}
}
}
Although such loops are technically correct, they do look a bit
strange, so we remove them by checking for a constant lower bound
that is bigger than the corresponding constant upper bound.
Note that this is only an issue for the PolyLib backend, as the isl
backend would have removed the sets corresponding to such loops
at a much earlier stage.
Reported by Uday K Bondhugula <bondhugu@cse.ohio-state.edu>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>