]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lra-constraints.c (remove_inheritance_pseudos): Process destination pseudo too.
authorVladimir Makarov <vmakarov@redhat.com>
Fri, 11 Jul 2014 17:19:53 +0000 (17:19 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Fri, 11 Jul 2014 17:19:53 +0000 (17:19 +0000)
2014-07-11  Vladimir Makarov  <vmakarov@redhat.com>

* lra-constraints.c (remove_inheritance_pseudos): Process
destination pseudo too.

From-SVN: r212464

gcc/ChangeLog
gcc/lra-constraints.c

index 45b862bad6e0fc1d79544080434d6848e58375e7..c7f0fd47f9a8edf8b539b2b3d69d05e81c8e8868 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-11  Vladimir Makarov  <vmakarov@redhat.com>
+
+       * lra-constraints.c (remove_inheritance_pseudos): Process
+       destination pseudo too.
+
 2014-07-11  Rong Xu  <xur@google.com>
 
        * gcov-tool.c (gcov_output_files): Fix build error introduced in
index baed7e7d57c2e8840bd52bb74d24a27b0fd4a13d..a43f8dc420886f141ef16309415de0ac3eac4376 100644 (file)
@@ -5697,6 +5697,20 @@ remove_inheritance_pseudos (bitmap remove_pseudos)
                        SUBREG_REG (SET_SRC (set)) = SET_SRC (prev_set);
                      else
                        SET_SRC (set) = SET_SRC (prev_set);
+                     /* As we are finishing with processing the insn
+                        here, check the destination too as it might
+                        inheritance pseudo for another pseudo.  */
+                     if (bitmap_bit_p (remove_pseudos, dregno)
+                         && bitmap_bit_p (&lra_inheritance_pseudos, dregno)
+                         && (restore_regno
+                             = lra_reg_info[dregno].restore_regno) >= 0)
+                       {
+                         if (GET_CODE (SET_DEST (set)) == SUBREG)
+                           SUBREG_REG (SET_DEST (set))
+                             = regno_reg_rtx[restore_regno];
+                         else
+                           SET_DEST (set) = regno_reg_rtx[restore_regno];
+                       }
                      lra_push_insn_and_update_insn_regno_info (curr_insn);
                      lra_set_used_insn_alternative_by_uid
                        (INSN_UID (curr_insn), -1);