summaryrefslogtreecommitdiff
path: root/gcc/sese.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-01 17:24:47 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-01 17:24:47 +0000
commit1f8cbcdd84e4841f88ec14ad45133dd221337a93 (patch)
tree8f94eaf8f0022130c067b9545675aeeefbf6234c /gcc/sese.c
parent68f6634f48067e4003c7d0e19a98a8a40fe03941 (diff)
downloadgcc-1f8cbcdd84e4841f88ec14ad45133dd221337a93.tar.gz
Call recompute_tree_invariant_for_addr_expr when replacing a constant in an ADDR_EXPR.
2010-11-22 Sebastian Pop <sebastian.pop@amd.com> * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr when replacing a constant in an ADDR_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sese.c')
-rw-r--r--gcc/sese.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/sese.c b/gcc/sese.c
index 078df67b795..f5e41f5b3be 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -546,6 +546,19 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
true, NULL_TREE);
gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT);
replace_exp (use_p, new_expr);
+
+
+ if (TREE_CODE (new_expr) == INTEGER_CST)
+ {
+ tree lhs = gimple_assign_lhs (copy);
+ tree rhs = gimple_assign_rhs1 (copy);
+
+ if (TREE_CODE (lhs) == ADDR_EXPR)
+ recompute_tree_invariant_for_addr_expr (lhs);
+ if (TREE_CODE (rhs) == ADDR_EXPR)
+ recompute_tree_invariant_for_addr_expr (rhs);
+ }
+
set_rename (rename_map, old_name, new_expr);
}
}