+/* The current objective function has a fixed (or no) integer value.
+ * Cut the tableau to the hyperplane that fixes this value in
+ * both halves of the tableau.
+ * Return 1 if the resulting tableau is empty.
+ */
+static int cut_lp_to_hyperplane(struct tab_lp *lp, isl_int *row)
+{
+ enum isl_lp_result res;
+
+ isl_int_set_si(lp->row->el[0], 0);
+ isl_seq_cpy(lp->row->el + 1, row, lp->dim);
+ isl_seq_clr(lp->row->el + 1 + lp->dim, lp->dim);
+ res = isl_tab_min(lp->tab, lp->row->el, lp->ctx->one,
+ &lp->tmp, NULL, 0);
+ if (res != isl_lp_ok)
+ return -1;
+
+ isl_int_neg(lp->row->el[0], lp->tmp);
+ if (isl_tab_add_eq(lp->tab, lp->row->el) < 0)
+ return -1;
+
+ isl_seq_cpy(lp->row->el + 1 + lp->dim, row, lp->dim);
+ isl_seq_clr(lp->row->el + 1, lp->dim);
+ if (isl_tab_add_eq(lp->tab, lp->row->el) < 0)
+ return -1;
+
+ lp->con_offset += 2;
+
+ return lp->tab->empty;
+}
+