summaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-11 13:35:14 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-11 13:35:14 +0000
commit5ee24cd994e8d600a3e2f0298c52082b29ecca38 (patch)
tree144ced58776e7edc3dc5b6d761a57485acb2848b /gcc/regrename.c
parentd5c9a99f956b5b0af34e770545b7e723b8dfea28 (diff)
downloadgcc-5ee24cd994e8d600a3e2f0298c52082b29ecca38.tar.gz
* regrename.c (regrename_optimize): Don't accept a
part-clobbered register if the replaced register is not part clobbered. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49676 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index b830b889907..135eaefd0e1 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -325,7 +325,12 @@ regrename_optimize ()
/* See whether it accepts all modes that occur in
definition and uses. */
for (tmp = this; tmp; tmp = tmp->next_use)
- if (! HARD_REGNO_MODE_OK (new_reg, GET_MODE (*tmp->loc)))
+ if (! HARD_REGNO_MODE_OK (new_reg, GET_MODE (*tmp->loc))
+ || (tmp->need_caller_save_reg
+ && ! (HARD_REGNO_CALL_PART_CLOBBERED
+ (reg, GET_MODE (*tmp->loc)))
+ && (HARD_REGNO_CALL_PART_CLOBBERED
+ (new_reg, GET_MODE (*tmp->loc)))))
break;
if (! tmp)
{