set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 1);
isl_seq_neg(bound->el, map->p[i]->ineq[cuts[k]], 1 + total);
- if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set) < 0)
+ if (!tabs[i]->empty &&
+ add_wraps(wraps, map->p[i], tabs[i], bound->el, set) < 0)
goto error;
set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 0);
if (isl_tab_rollback(tabs[i], snap_i) < 0)
goto error;
+ if (tabs[i]->empty)
+ break;
if (!wraps->n_row)
break;
return -1;
if (test_coalesce_set(ctx, "{ [0,1]; [i,2i] : 1 <= i <= 10 }", 0) < 0)
return -1;
+ 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;
return 0;
}