isl_ast_build_set_loop_bounds: compute divs after eliminating strided dimension
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 18 Apr 2013 14:12:00 +0000 (16:12 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 19 Apr 2013 17:19:43 +0000 (19:19 +0200)
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 <skimo@kotnet.org>
isl_ast_build.c

index ed67545..95b4692 100644 (file)
@@ -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;