summaryrefslogtreecommitdiff
path: root/gcc/regmove.c
diff options
context:
space:
mode:
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 17:01:49 +0000
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 17:01:49 +0000
commitf2ee4302e9c912044a50a6b619f753598b66a73a (patch)
tree005f8e1bbe2b08856b76f9db9bfcb47eafa7b01f /gcc/regmove.c
parentf9e182acea823af55710fb1fbcc63ba14e278ddf (diff)
downloadgcc-f2ee4302e9c912044a50a6b619f753598b66a73a.tar.gz
* regmove.c (optimize_reg_copy_1): Don't try to replace call-used
hard registers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85149 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r--gcc/regmove.c3
1 files changed, 3 insertions, 0 deletions
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))))