aboutsummaryrefslogtreecommitdiff
path: root/gcc/regmove.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@gcc.gnu.org>2008-10-24 23:09:00 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2008-10-24 23:09:00 +0000
commitd3a5ecb5dcf6ad53d8d4256c54fca5256bfbd3bc (patch)
tree8b53e75f73b5a11041aa660906532cc294a55a58 /gcc/regmove.c
parent397979fa4dbedbfc03d13352bfb54737d629ce5d (diff)
downloadgcc-d3a5ecb5dcf6ad53d8d4256c54fca5256bfbd3bc.zip
gcc-d3a5ecb5dcf6ad53d8d4256c54fca5256bfbd3bc.tar.gz
gcc-d3a5ecb5dcf6ad53d8d4256c54fca5256bfbd3bc.tar.bz2
re PR rtl-optimization/37769 (internal compiler error: in reg_overlap_mentioned_for_reload_p, at reload.c:6525)
PR rtl-optimization/37769 * regmove.c (optimize_reg_copy_2): Update REG_INC note if needed. From-SVN: r141354
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r--gcc/regmove.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c
index e25dbec..12b93fc 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -685,7 +685,15 @@ optimize_reg_copy_2 (rtx insn, rtx dest, rtx src)
{
if (reg_mentioned_p (dest, PATTERN (q)))
{
+ rtx note;
+
PATTERN (q) = replace_rtx (PATTERN (q), dest, src);
+ note = FIND_REG_INC_NOTE (q, dest);
+ if (note)
+ {
+ remove_note (q, note);
+ add_reg_note (q, REG_INC, src);
+ }
df_insn_rescan (q);
}