isl_ast_codegen.c: update_unrolling_lower_bound: check for overflow
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 15 Apr 2013 10:55:59 +0000 (12:55 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 15 Apr 2013 12:03:39 +0000 (14:03 +0200)
commitf7f38c2aca61e13373581df7a2194ccc94ebda75
tree53d3e72abc7387561c4f83c3c2827b619a8cb185
parent1cbd5e5b9beb6bcda586e8d026825142c7e03287
isl_ast_codegen.c: update_unrolling_lower_bound: check for overflow

If the number of slices along a given lower bound exceeds the maximal
value of an integer, then it would mistakenly be replaced by its
least signficant bits, resulting in slices being dropped if the lower
bound ends up being selected as the best (based on the wrong number).
If the number of slices really exceeds the maximal value of an integer,
then we do not want to honor the request of the user anyway.
We should probably set an even smaller limit.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ast_codegen.c
test_inputs/codegen/unroll6.c [new file with mode: 0644]
test_inputs/codegen/unroll6.in [new file with mode: 0644]