* Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France
*/
+#include <limits.h>
#include <isl/aff.h>
#include <isl/set.h>
#include <isl/ilp.h>
return 0;
}
- if (!data->lower || isl_int_cmp_si(data->tmp, *data->n) < 0) {
+ if (isl_int_cmp_si(data->tmp, INT_MAX) <= 0 &&
+ (!data->lower || isl_int_cmp_si(data->tmp, *data->n) < 0)) {
isl_aff_free(data->lower);
data->lower = lower;
*data->n = isl_int_get_si(data->tmp);
--- /dev/null
+{
+ if (((-t1 + 128) % 128) + nn >= 128 * g + 130 && 128 * g + 127 >= (-t1 + 128) % 128 && nn >= 128 * g + 6)
+ for (int c1 = 393214; c1 < nn - 1; c1 += 393216)
+ A(c1, ((t1 + 127) % 128) + 128 * g + 1, ((t1 + 127) % 128) + 1);
+ if (nn >= t1 + 128 * g + 130 && t1 + 128 * g + 127 >= 0 && t1 <= 2 && t1 >= 1)
+ for (int c1 = 393214; c1 < nn - 1; c1 += 393216)
+ A(c1, t1 + 128 * g + 128, t1 + 128);
+}
--- /dev/null
+# Check that the right lower bound is chosen for unrolling.
+# Older versions of isl would pick a lower bound that resulted
+# in a number of slices that exceeds the maximal value of an integer
+# and then only generated code for a truncated number (zero) of slices.
+[nn, t1, g] -> { A[a, b, c] -> [c] : exists (e0 = [(2 + a)/393216], e1 = [(t1 - c)/128]: 128g = b - c and 393216e0 = 2 + a and 128e1 = t1 - c and c <= 130 and c >= 6 - nn + b and c <= 128 + b and nn >= 137 and t1 >= 0 and c >= 1 and a <= -2 + nn and a >= 1 and nn <= 9223372036854775807 and b >= 1 and b <= -2 + nn and t1 <= 127) }
+[nn, t1, g] -> { : nn <= 9223372036854775807 and nn >= 137 and t1 >= 0 and t1 <= 127 }
+{ [c] -> unroll[x] }