X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_local_space.c;h=4577cde5124213d60f07fdf09c0bc97233c4b498;hb=64b09f1d4d4d62c38b97df9e82156a42e544a8c2;hp=a8e5ebacb39a5cdb935a1099ee6d81aa9e850873;hpb=6d28e7c5ff2b41ec88fa32664cc446807af5843d;p=platform%2Fupstream%2Fisl.git diff --git a/isl_local_space.c b/isl_local_space.c index a8e5eba..4577cde 100644 --- a/isl_local_space.c +++ b/isl_local_space.c @@ -721,7 +721,6 @@ __isl_give isl_local_space *isl_local_space_substitute_equalities( unsigned total; unsigned n_div; - ls = isl_local_space_cow(ls); if (!ls || !eq) goto error; @@ -739,6 +738,12 @@ __isl_give isl_local_space *isl_local_space_substitute_equalities( for (k = 0; k < ls->div->n_row; ++k) { if (isl_int_is_zero(ls->div->row[k][1 + j])) continue; + ls = isl_local_space_cow(ls); + if (!ls) + goto error; + ls->div = isl_mat_cow(ls->div); + if (!ls->div) + goto error; isl_seq_elim(ls->div->row[k] + 1, eq->eq[i], j, total, &ls->div->row[k][0]); normalize_div(ls, k);