In carry_dependences we check that we have been able to carry at least
(part of) one dependence relation, by checking that the number of
edges that are not carried is smaller than the total number of edges.
However, we were only looking at the numerator. If the optimal LP
solution is integral then this happens to work out, but otherwise
we could overestimate the number of non-carried edges, possibly
leading to the wrong conclusion.
Reported-by: Tomofumi Yuki <tomofumi.yuki@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
"error in schedule construction", return -1);
}
+ isl_int_divexact(sol->el[1], sol->el[1], sol->el[0]);
if (isl_int_cmp_si(sol->el[1], n_edge) >= 0) {
isl_vec_free(sol);
isl_die(ctx, isl_error_unknown,
if (test_padded_schedule(ctx) < 0)
return -1;
+ /* Check that check for progress is not confused by rational
+ * solution.
+ */
+ D = "[N] -> { S0[i, j] : i >= 0 and i <= N and j >= 0 and j <= N }";
+ V = "[N] -> { S0[i0, -1 + N] -> S0[2 + i0, 0] : i0 >= 0 and "
+ "i0 <= -2 + N; "
+ "S0[i0, i1] -> S0[i0, 1 + i1] : i0 >= 0 and "
+ "i0 <= N and i1 >= 0 and i1 <= -1 + N }";
+ P = "{}";
+ ctx->opt->schedule_algorithm = ISL_SCHEDULE_ALGORITHM_FEAUTRIER;
+ if (test_has_schedule(ctx, D, V, P) < 0)
+ return -1;
+ ctx->opt->schedule_algorithm = ISL_SCHEDULE_ALGORITHM_ISL;
+
return 0;
}