struct isl_tab_undo *snap, *snap2;
unsigned n_eq = map->p[i]->n_eq;
+ if (isl_tab_is_equality(tabs[i], n_eq + k))
+ return 0;
+
snap = isl_tab_snap(tabs[i]);
tabs[i] = isl_tab_relax(tabs[i], n_eq + k);
snap2 = isl_tab_snap(tabs[i]);
{
struct isl_map *map;
if (!bmap1 || !bmap2)
- return NULL;
+ goto error;
isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim), goto error);
isl_term *dup;
unsigned total;
- if (term)
+ if (!term)
return NULL;
total = isl_space_dim(term->dim, isl_dim_all) + term->div->n_row;
var = &tab->con[con];
+ if (var->is_row && (var->index < 0 || var->index < tab->n_redundant))
+ isl_die(tab->mat->ctx, isl_error_invalid,
+ "cannot relax redundant constraint", goto error);
+ if (!var->is_row && (var->index < 0 || var->index < tab->n_dead))
+ isl_die(tab->mat->ctx, isl_error_invalid,
+ "cannot relax dead constraint", goto error);
+
if (!var->is_row && !max_is_manifestly_unbounded(tab, var))
if (to_row(tab, var, 1) < 0)
goto error;
if (test_coalesce_set(ctx, "{ [a, b] : exists e : 2e = a and "
"a >= 0 and (a <= 3 or (b <= 0 and b >= -4 + a)) }", 0) < 0)
return -1;
+ if (test_coalesce_set(ctx,
+ "{ [i, j, i', j'] : i <= 2 and j <= 2 and "
+ "j' >= -1 + 2i + j - 2i' and i' <= -1 + i and "
+ "j >= 1 and j' <= i + j - i' and i >= 1; "
+ "[1, 1, 1, 1] }", 0) < 0)
+ return -1;
return 0;
}