isl_coalesce.c: add_sub_vars: preserve order of integer divisions
commit68132955e9696897e68147c91e73ca335fa84ede
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 30 Dec 2015 11:15:04 +0000 (30 12:15 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 2 Jan 2016 08:56:26 +0000 (2 09:56 +0100)
treefb396ee91758cb0915dc6b4f91f24a77080c245a
parent4fa299bf5c0c1322b2562b5d44ff2aed7ed02d84
isl_coalesce.c: add_sub_vars: preserve order of integer divisions

The function add_sub_vars inserts integer divisions that appear in one basic map
into another basic map.  The integer divisions are first appended to the list
of integer divisions and then moved to the right position, if needed.
However, when moving the newly added integer division to its right position,
the integer division at that position was simply moved to the end.
This means that if there is more than one integer division following
the newly inserted integer division, then those integer divisions would
end up in the wrong order.  As a result, the basic map and the tableau
representations would no longer match and no coalescing could be performed.
Preserve the order of the integer divisions while inserting new ones.

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