fix check for "simple" loop termination condition
commit8d568f41c695f61ed46f0b250b8e724bc4e49337
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 29 Jul 2011 09:23:46 +0000 (29 11:23 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 30 Jul 2011 13:01:08 +0000 (30 15:01 +0200)
treea7af943211538a5592035bded07907f07e36822e
parentf9308f06a2ee4a29ac4d48a5178c125f90c64407
fix check for "simple" loop termination condition

If the termination condition of a for loop only involves upper bounds,
then we use a simplified method of constructing the corresponding iteration
domain.  Unfortunately, our check for this property was faulty.
In particular, it would mark the termination condition of the following
loop as only involving upper bounds.

for (j = i; j <= 5 * ((j + 2)/5); ++j)

The simplified method cannot be used on this loop because
the termination condition has an implicit lower bound through
the integer division.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc
tests/generic_condition2.c [new file with mode: 0644]
tests/generic_condition2.scop [new file with mode: 0644]