isl_basic_set_expand_divs: avoid moving coefficients in extra integer divisions
commit46d6f9f0e8fc8ca1f3a18af8eba47463650c74ff
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 18 Feb 2016 15:10:56 +0000 (18 16:10 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 18 Feb 2016 15:20:02 +0000 (18 16:20 +0100)
treeb651d864bdb2111dd197bb121603aa9080850122
parent147f0058a6f7d06bc75846ea6ac71e31d395a1ef
isl_basic_set_expand_divs: avoid moving coefficients in extra integer divisions

isl_basic_set_expand_divs needs to move the integer divisions in its
input to the right position and introduce additional integer divisions.
It would do these two tasks together, but this could result
in an additional integer division getting added that refers
to an earlier integer division that had not yet been added,
the position instead being occupied by an integer division
that still had to be moved.  The outer integer division would
then end up referring to this moved integer division instead
of to the integer division that eventually ends up in that position.

Move the integer divisions into their new positions before
adding new ones.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c
isl_test.c