regmove.c (optimize_reg_copy_1): Don't try to replace call-used hard registers.
authorDaniel Jacobowitz <dan@debian.org>
Sun, 25 Jul 2004 17:01:49 +0000 (17:01 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Sun, 25 Jul 2004 17:01:49 +0000 (17:01 +0000)
* regmove.c (optimize_reg_copy_1): Don't try to replace call-used
hard registers.

From-SVN: r85149

gcc/ChangeLog
gcc/regmove.c

index bd5d443492f2718c2703e745e553214fe1ec6516..55be14e1c484a80c593d4fa0d2f4c09f4200e7d7 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-25  Daniel Jacobowitz  <dan@debian.org>
+
+       * regmove.c (optimize_reg_copy_1): Don't try to replace call-used
+       hard registers.
+
 2004-07-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * tree-ssa-operands.c (get_stmt_operands, get_expr_operands):
index 5816831dc6cd94786674a7a63e3d325dc211a74b..5bd6f40e21f8d3501b0a7089874520b7e9d7961b 100644 (file)
@@ -431,6 +431,9 @@ optimize_reg_copy_1 (rtx insn, rtx dest, rtx src)
          || (sregno < FIRST_PSEUDO_REGISTER
              && asm_noperands (PATTERN (p)) >= 0
              && reg_overlap_mentioned_p (src, PATTERN (p)))
+         /* Don't change hard registers used by a call.  */
+         || (CALL_P (p) && sregno < FIRST_PSEUDO_REGISTER
+             && find_reg_fusage (p, USE, src))
          /* Don't change a USE of a register.  */
          || (GET_CODE (PATTERN (p)) == USE
              && reg_overlap_mentioned_p (src, XEXP (PATTERN (p), 0))))