Merge branch 'maint'
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 24 Mar 2013 13:00:21 +0000 (14:00 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 24 Mar 2013 13:00:21 +0000 (14:00 +0100)
1  2 
isl_tab_pip.c
isl_test.c

diff --cc isl_tab_pip.c
Simple merge
diff --cc isl_test.c
@@@ -3852,34 -3867,36 +3870,60 @@@ static int test_simplify(isl_ctx *ctx
        return 0;
  }
  
+ /* This is a regression test for a bug where isl_tab_basic_map_partial_lexopt
+  * with gbr context would fail to disable the use of the shifted tableau
+  * when transferring equalities for the input to the context, resulting
+  * in invalid sample values.
+  */
+ static int test_partial_lexmin(isl_ctx *ctx)
+ {
+       const char *str;
+       isl_basic_set *bset;
+       isl_basic_map *bmap;
+       isl_map *map;
+       str = "{ [1, b, c, 1 - c] -> [e] : 2e <= -c and 2e >= -3 + c }";
+       bmap = isl_basic_map_read_from_str(ctx, str);
+       str = "{ [a, b, c, d] : c <= 1 and 2d >= 6 - 4b - c }";
+       bset = isl_basic_set_read_from_str(ctx, str);
+       map = isl_basic_map_partial_lexmin(bmap, bset, NULL);
+       isl_map_free(map);
+       if (!map)
+               return -1;
+       return 0;
+ }
 +/* Check that the variable compression performed on the existentially
 + * quantified variables inside isl_basic_set_compute_divs is not confused
 + * by the implicit equalities among the parameters.
 + */
 +static int test_compute_divs(isl_ctx *ctx)
 +{
 +      const char *str;
 +      isl_basic_set *bset;
 +      isl_set *set;
 +
 +      str = "[a, b, c, d, e] -> { [] : exists (e0: 2d = b and a <= 124 and "
 +              "b <= 2046 and b >= 0 and b <= 60 + 64a and 2e >= b + 2c and "
 +              "2e >= b and 2e <= 1 + b and 2e <= 1 + b + 2c and "
 +              "32768e0 >= -124 + a and 2097152e0 <= 60 + 64a - b) }";
 +      bset = isl_basic_set_read_from_str(ctx, str);
 +      set = isl_basic_set_compute_divs(bset);
 +      isl_set_free(set);
 +      if (!set)
 +              return -1;
 +
 +      return 0;
 +}
 +
  struct {
        const char *name;
        int (*fn)(isl_ctx *ctx);
  } tests [] = {
 +      { "compute divs", &test_compute_divs },
+       { "partial lexmin", &test_partial_lexmin },
        { "simplify", &test_simplify },
        { "curry", &test_curry },
        { "piecewise multi affine expressions", &test_pw_multi_aff },