Fix sharing in translate_isl_ast_node_for
authorTom de Vries <tom@codesourcery.com>
Tue, 19 Dec 2017 21:49:20 +0000 (21:49 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 19 Dec 2017 21:49:20 +0000 (21:49 +0000)
2017-12-19  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/83493
* graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for): Unshare ub
and lb.

From-SVN: r255842

gcc/ChangeLog
gcc/graphite-isl-ast-to-gimple.c

index 39b102fc24e8473e4b265231686bfdf42ef02181..7e803a31542f04266d9b890f01e93c551ed0f410 100644 (file)
@@ -1,3 +1,9 @@
+2017-12-19  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/83493
+       * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for): Unshare ub
+       and lb.
+
 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
 
        * gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
index 848bfe9dfc29e2a3791ee35c068d69733939e8d4..b020b2dfdcbd67c12e0bf29df1496f2aa5a23f79 100644 (file)
@@ -739,10 +739,10 @@ translate_isl_ast_node_for (loop_p context_loop, __isl_keep isl_ast_node *node,
         as expected.  */
       tree ub_one = fold_build2 (POINTER_TYPE_P (type)
                                 ? POINTER_PLUS_EXPR : PLUS_EXPR,
-                                type, ub, one);
+                                type, unshare_expr (ub), one);
       create_empty_if_region_on_edge (next_e,
                                      fold_build2 (LT_EXPR, boolean_type_node,
-                                                  lb, ub_one));
+                                                  unshare_expr (lb), ub_one));
       next_e = get_true_edge_from_guard_bb (next_e->dest);
     }