From 3a742b3c0be668c77a68c8c687d9106952bc6633 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 18 Apr 2013 16:12:00 +0200 Subject: [PATCH] isl_ast_build_set_loop_bounds: compute divs after eliminating strided dimension Although it is unlikely that the elimination would result in any unknown divs, we had better make sure to preserve the invariant that build->domain does not have any unknown divs. Signed-off-by: Sven Verdoolaege --- isl_ast_build.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/isl_ast_build.c b/isl_ast_build.c index ed67545..95b4692 100644 --- a/isl_ast_build.c +++ b/isl_ast_build.c @@ -733,9 +733,11 @@ __isl_give isl_ast_build *isl_ast_build_set_loop_bounds( set = isl_set_compute_divs(set); build->pending = isl_set_intersect(build->pending, isl_set_copy(set)); - if (isl_ast_build_has_stride(build, build->depth)) + if (isl_ast_build_has_stride(build, build->depth)) { build->domain = isl_set_eliminate(build->domain, isl_dim_set, build->depth, 1); + build->domain = isl_set_compute_divs(build->domain); + } } else { isl_basic_set *generated, *pending; -- 2.7.4