]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/63740 (GCC 4.9.2 bootstrap fails on ARM, haifa-sched.c:6507:1: intern...
authorVladimir Makarov <vmakarov@redhat.com>
Mon, 22 Jun 2015 18:17:28 +0000 (18:17 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Mon, 22 Jun 2015 18:17:28 +0000 (18:17 +0000)
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.

From-SVN: r224752

gcc/ChangeLog
gcc/lra-lives.c

index 8e1c59da111883c6618ec56f66632b52e817ceb4..9f59faf51a154224c816f8fe15315f66af626ba8 100644 (file)
@@ -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-19  Christophe Lyon  <christophe.lyon@linaro.org>
 
        Backport from mainline r215707.
index 8444adee6d8d3d11080c1a2b2fcad8c759f4a8df..6b8efdcdeca4b41295168c3fded6c73429108aab 100644 (file)
@@ -565,7 +565,15 @@ process_bb_lives (basic_block bb, int &curr_point)
          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)