isl_ast_build_expr_from_pw_aff: do not include rational expressions in min/max
commit52d5a457ee09a987a25fe689468a61f3111ee53d
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 8 Nov 2016 14:01:34 +0000 (8 15:01 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 9 Nov 2016 14:48:09 +0000 (9 15:48 +0100)
treeb45d6a5ec4d7be0179238cb9d0efb193f117bbf2
parent2048d7fbebc057d986d7457a63108a0868a144c0
isl_ast_build_expr_from_pw_aff: do not include rational expressions in min/max

The input to isl_ast_build_expr_from_pw_aff is assumed to only yield
integer values on its definition domain, but it may involve rational
expressions that are only guaranteed to yield integer values
on the corresponding subpart of the definition domain.
Combining such rational expressions into a min/max expression will
cause the expression to be evaluated on a larger part of the definition
domain where the expression is not guaranteed to yield an integer value.
Refrain from including rational expressions in a min/max expression
to avoid this issue.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ast_build_expr.c
isl_test.c