diff mbox

patch to fix PR63740 on trunk

Message ID 5588587F.4060705@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov June 22, 2015, 6:48 p.m. UTC
I've committed patch for PR63740 to the trunk as rev. 224753.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63740

The patch was bootstrapped on x86-64.

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.
diff mbox

Patch

Index: lra-lives.c
===================================================================
--- lra-lives.c (revision 224739)
+++ lra-lives.c (working copy)
@@ -565,7 +565,15 @@  process_bb_lives (basic_block bb, int &c
           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)