This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch to fix PR63740 on gcc5 branch


I've committed the following patch to gcc 5 branch as rev.224761.

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.

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)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]