]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/61430 (ICE in lra_create_copy)
authorChung-Lin Tang <cltang@codesourcery.com>
Mon, 16 Jun 2014 09:58:34 +0000 (09:58 +0000)
committerChung-Lin Tang <cltang@gcc.gnu.org>
Mon, 16 Jun 2014 09:58:34 +0000 (09:58 +0000)
2014-06-16  Chung-Lin Tang  <cltang@codesourcery.com>

PR middle-end/61430
* lra-lives.c (process_bb_lives): Skip creating copy during
insn scan when src/dest has constrained to same regno.

From-SVN: r211701

gcc/ChangeLog
gcc/lra-lives.c

index abb63acb2193655abcd5c33acd50f52e9610d819..802f3d93c28dc62bc20916b2dfe45d17b0ddbb3c 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-16  Chung-Lin Tang  <cltang@codesourcery.com>
+
+       PR middle-end/61430
+       * lra-lives.c (process_bb_lives): Skip creating copy during
+       insn scan when src/dest has constrained to same regno.
+
 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
 
        * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Check again
index 26ba0d259c0e5b324aa4cb7c55ff8a85fc0c7a7d..1e7bb59678e011bf2d4112b600a3b37564b58ce2 100644 (file)
@@ -558,7 +558,11 @@ process_bb_lives (basic_block bb, int &curr_point)
              /* It might be 'inheritance pseudo <- reload pseudo'.  */
              || (src_regno >= lra_constraint_new_regno_start
                  && ((int) REGNO (SET_DEST (set))
-                     >= lra_constraint_new_regno_start))))
+                     >= lra_constraint_new_regno_start)
+                 /* Remember to skip special cases where src/dest regnos are
+                    the same, e.g. insn SET pattern has matching constraints
+                    like =r,0.  */
+                 && src_regno != (int) REGNO (SET_DEST (set)))))
        {
          int hard_regno = -1, regno = -1;