isl_qpolynomial_fold_fold_on_domain: do not consider zero to dominate NaN
commita0697cd68feb8ef22b3a76b9bb4838c5a6664193
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 2 May 2015 09:22:54 +0000 (2 11:22 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 2 May 2015 12:29:08 +0000 (2 14:29 +0200)
tree071a945ddc5075b70c8627135d535907bd0e9cdc
parentfbcc763acafab8b181a078430e7ddd4a3c87085e
isl_qpolynomial_fold_fold_on_domain: do not consider zero to dominate NaN

Calling isl_pw_qpolynomial_bound on { [m,n] -> -m * n } would
return max(0) because the domain is split into orthants and on
some of the orthants, the upper bound is 0, while on others
a NaN is derived.  isl_qpolynomial_fold_fold_on_domain could then
consider the NaN to be dominated by the zero, because it looks
at the sign of the difference, which is undefined for a NaN.
Ideally, the upper bound should be infinity on those orthants,
but we should at least make sure the result is not zero.

Reported-by: Fabrice RASTELLO <fabrice.rastello@inria.fr>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_fold.c
isl_test.c