From 97b69e514a011eb1c529281c355d61399956edb4 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 25 Jul 2004 17:01:49 +0000 Subject: [PATCH] regmove.c (optimize_reg_copy_1): Don't try to replace call-used hard registers. * regmove.c (optimize_reg_copy_1): Don't try to replace call-used hard registers. From-SVN: r85149 --- gcc/ChangeLog | 5 +++++ gcc/regmove.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd5d443492f..55be14e1c48 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-07-25 Daniel Jacobowitz + + * regmove.c (optimize_reg_copy_1): Don't try to replace call-used + hard registers. + 2004-07-25 Richard Kenner * tree-ssa-operands.c (get_stmt_operands, get_expr_operands): diff --git a/gcc/regmove.c b/gcc/regmove.c index 5816831dc6c..5bd6f40e21f 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -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)))) -- 2.30.2