From 6f23dd91cbe49e6d3945440b0f03110ef3d29fd4 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Wed, 11 Aug 2010 20:28:38 +0000 Subject: Unshare the scev before code generating it. 2010-07-15 Sebastian Pop * sese.c (rename_uses): Call unshare_expr before force_gimple_operand. * gcc.dg/graphite/id-23.c: New. From-SVN: r163149 --- gcc/sese.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/sese.c') diff --git a/gcc/sese.c b/gcc/sese.c index 9dbd76f..5ac7a2f 100644 --- a/gcc/sese.c +++ b/gcc/sese.c @@ -543,7 +543,8 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt, && !tree_contains_chrecs (new_expr, NULL)); /* Replace the old_name with the new_expr. */ - new_expr = force_gimple_operand (new_expr, &stmts, true, NULL); + new_expr = force_gimple_operand (unshare_expr (new_expr), &stmts, + true, NULL); gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT); replace_exp (use_p, new_expr); set_rename (rename_map, old_name, new_expr); -- cgit v1.1