add isl_pw_*_intersect_params
[platform/upstream/isl.git] / isl_input.c
index 548ff41..320703a 100644 (file)
@@ -899,7 +899,7 @@ static __isl_give isl_map *read_tuple(struct isl_stream *s,
                nested = read_nested_tuple(s, isl_map_universe(dim), v);
                if (type == isl_dim_in) {
                        nested = isl_map_reverse(nested);
-                       map = isl_map_intersect(nested, map);
+                       map = isl_map_intersect_params(nested, map);
                } else {
                        isl_set *set;
                        dim = isl_set_get_space(nested);
@@ -1058,9 +1058,14 @@ static int resolve_paren_expr(struct isl_stream *s,
        if (!tok || tok->type != '(')
                goto error;
 
+       if (isl_stream_next_token_is(s, '('))
+               if (resolve_paren_expr(s, v, isl_map_copy(map)))
+                       goto error;
+
        if (isl_stream_next_token_is(s, ISL_TOKEN_EXISTS) ||
            isl_stream_next_token_is(s, ISL_TOKEN_TRUE) ||
-           isl_stream_next_token_is(s, ISL_TOKEN_FALSE)) {
+           isl_stream_next_token_is(s, ISL_TOKEN_FALSE) ||
+           isl_stream_next_token_is(s, ISL_TOKEN_MAP)) {
                map = read_disjuncts(s, v, map);
                if (isl_stream_eat(s, ')'))
                        goto error;