summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-22 18:45:58 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-22 18:45:58 +0000
commit41e117358ed4bb389ce63c2fa769b77c67513944 (patch)
treefec79d33e20d038b1ffb9d9aa5399045dabe8f12
parent0f93641f41997fd9440eb22c3392a10ded9db6c7 (diff)
downloadgcc-41e117358ed4bb389ce63c2fa769b77c67513944.tar.gz
2015-06-22 Vladimir Makarov <vmakarov@redhat.com>
PR bootstrap/63740 * lra-lives.c (process_bb_lives): Check insn copying the same reload pseudo and don't create a copy for it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224753 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lra-lives.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8f20c77dd4a..05ed274a9f7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-22 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR bootstrap/63740
+ * lra-lives.c (process_bb_lives): Check insn copying the same
+ reload pseudo and don't create a copy for it.
+
2015-06-22 Tom de Vries <tom@codesourcery.com>
* tree-parloops.c (transform_to_exit_first_loop_alt): Add update_stmt
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c
index 16e1f386b3e..5157c85895e 100644
--- a/gcc/lra-lives.c
+++ b/gcc/lra-lives.c
@@ -768,7 +768,15 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p)
dst_regno = REGNO (SET_DEST (set));
if (dst_regno >= lra_constraint_new_regno_start
&& src_regno >= lra_constraint_new_regno_start)
- lra_create_copy (dst_regno, src_regno, freq);
+ {
+ /* It might be still an original (non-reload) insn with
+ one unused output and a constraint requiring to use
+ the same reg for input/output operands. In this case
+ dst_regno and src_regno have the same value, we don't
+ need a misleading copy for this case. */
+ if (dst_regno != src_regno)
+ lra_create_copy (dst_regno, src_regno, freq);
+ }
else if (dst_regno >= lra_constraint_new_regno_start)
{
if ((hard_regno = src_regno) >= FIRST_PSEUDO_REGISTER)