From: Sven Verdoolaege Date: Sat, 8 Sep 2012 13:04:45 +0000 (+0200) Subject: isl_aff_floor: normalize result X-Git-Tag: isl-0.11~78 X-Git-Url: https://repo.or.cz/w/isl.git/commitdiff_plain/6d6bde4ec81fb642cef352f8b138a5b324bd1211 isl_aff_floor: normalize result Signed-off-by: Sven Verdoolaege --- diff --git a/isl_aff.c b/isl_aff.c index c2e3f532..0ea18472 100644 --- a/isl_aff.c +++ b/isl_aff.c @@ -955,6 +955,8 @@ __isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff) isl_int_set_si(aff->v->el[0], 1); isl_int_set_si(aff->v->el[size], 1); + aff = isl_aff_normalize(aff); + return aff; } diff --git a/test_inputs/codegen/cloog/thomasset.c b/test_inputs/codegen/cloog/thomasset.c index 97bde2f5..15552ae5 100644 --- a/test_inputs/codegen/cloog/thomasset.c +++ b/test_inputs/codegen/cloog/thomasset.c @@ -2,7 +2,7 @@ for (int c0 = 0; c0 <= floord(n - 1, 3); c0 += 1) for (int c2 = 3 * c0 + 1; c2 <= min(n, 3 * c0 + 3); c2 += 1) S1(c2, c0); - for (int c0 = floord(n, 3); c0 <= floord(n, 3) + floord(n, 3); c0 += 1) + for (int c0 = floord(n, 3); c0 <= 2 * floord(n, 3); c0 += 1) for (int c1 = 0; c1 < n; c1 += 1) for (int c3 = max((n % 3) - n + 3 * c0, 1); c3 <= min((n % 3) - n + 3 * c0 + 2, n); c3 += 1) S2(c1 + 1, c3, 0, n / 3, c0 - n / 3);