fix isl_basic_map_move_dims in presence of existentially quantified variables
[platform/upstream/isl.git] / isl_test.c
index 2fc9d16..dcb417d 100644 (file)
@@ -97,6 +97,7 @@ void test_construction(struct isl_ctx *ctx)
 
 void test_dim(struct isl_ctx *ctx)
 {
+       const char *str;
        isl_map *map1, *map2;
 
        map1 = isl_map_read_from_str(ctx,
@@ -113,6 +114,16 @@ void test_dim(struct isl_ctx *ctx)
 
        isl_map_free(map1);
        isl_map_free(map2);
+
+       str = "[n] -> { [i] -> [] : exists a : 0 <= i <= n and i = 2 a }";
+       map1 = isl_map_read_from_str(ctx, str, -1);
+       str = "{ [i] -> [j] : exists a : 0 <= i <= j and i = 2 a }";
+       map2 = isl_map_read_from_str(ctx, str, -1);
+       map1 = isl_map_move_dims(map1, isl_dim_out, 0, isl_dim_param, 0, 1);
+       assert(isl_map_is_equal(map1, map2));
+
+       isl_map_free(map1);
+       isl_map_free(map2);
 }
 
 void test_div(struct isl_ctx *ctx)