isl_pw_templ.c: rename align_params_pw_pw_and to include PW
[platform/upstream/isl.git] / bound.c
diff --git a/bound.c b/bound.c
index 626f8b4..7115002 100644 (file)
--- a/bound.c
+++ b/bound.c
@@ -57,6 +57,7 @@ struct verify_point_bound {
 static int verify_point(__isl_take isl_point *pnt, void *user)
 {
        int i;
+       unsigned nvar;
        unsigned nparam;
        struct verify_point_bound *vpb = (struct verify_point_bound *) user;
        isl_int t;
@@ -109,8 +110,10 @@ static int verify_point(__isl_take isl_point *pnt, void *user)
        else
                opt = isl_pw_qpolynomial_fold_min(isl_pw_qpolynomial_fold_copy(pwf));
 
+       nvar = isl_set_dim(dom, isl_dim_set);
+       opt = isl_qpolynomial_project_domain_on_params(opt);
        if (vpb->exact && bounded)
-               ok = isl_qpolynomial_is_equal(opt, bound);
+               ok = isl_qpolynomial_plain_is_equal(opt, bound);
        else if (sign > 0)
                ok = isl_qpolynomial_le_cst(opt, bound);
        else
@@ -172,8 +175,7 @@ static int check_solution(__isl_take isl_pw_qpolynomial_fold *pwf,
        int i, r, n;
 
        dom = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf));
-       context = isl_set_remove_dims(isl_set_copy(dom), isl_dim_set,
-                                       0, isl_set_dim(dom, isl_dim_set));
+       context = isl_set_params(isl_set_copy(dom));
        context = isl_set_remove_divs(context);
        context = set_bounds(context);