temporarily make isl_val_int_from_isl_int available
[platform/upstream/isl.git] / isl_local_space.c
index 6c4fb84..42f3e9f 100644 (file)
@@ -219,6 +219,9 @@ __isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls,
        if (isl_int_is_zero(ls->div->row[pos][0]))
                isl_die(isl_local_space_get_ctx(ls), isl_error_invalid,
                        "expression of div unknown", return NULL);
+       if (!isl_local_space_is_set(ls))
+               isl_die(isl_local_space_get_ctx(ls), isl_error_invalid,
+                       "cannot represent divs of map spaces", return NULL);
 
        aff = isl_aff_alloc(isl_local_space_copy(ls));
        if (!aff)
@@ -1104,7 +1107,7 @@ __isl_give isl_local_space *isl_local_space_preimage_multi_aff(
                        continue;
                }
                isl_seq_preimage(res->div->row[n_div_ma + i], ls->div->row[i],
-                                   ma, n_div_ma, n_div_ls, f, c1, c2, g, 1);
+                               ma, 0, 0, n_div_ma, n_div_ls, f, c1, c2, g, 1);
                normalize_div(res, n_div_ma + i);
        }