* regrename.c (copy_value): Ignore overlapping copies.

From-SVN: r48669
This commit is contained in:
Richard Henderson 2002-01-08 17:07:13 -08:00 committed by Richard Henderson
parent 35484f777f
commit 21e16bd6bb
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-01-08 Richard Henderson <rth@redhat.com>
* regrename.c (copy_value): Ignore overlapping copies.
2002-01-08 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_split_conditional_move): Call copy_rtx

View File

@ -1214,6 +1214,7 @@ copy_value (dest, src, vd)
{
unsigned int dr = REGNO (dest);
unsigned int sr = REGNO (src);
unsigned int dn, sn;
unsigned int i;
/* ??? At present, it's possible to see noop sets. It'd be nice if
@ -1230,6 +1231,13 @@ copy_value (dest, src, vd)
if (frame_pointer_needed && dr == HARD_FRAME_POINTER_REGNUM)
return;
/* If SRC and DEST overlap, don't record anything. */
dn = HARD_REGNO_NREGS (dr, GET_MODE (dest));
sn = HARD_REGNO_NREGS (sr, GET_MODE (dest));
if ((dr > sr && dr < sr + sn)
|| (sr > dr && sr < dr + dn))
return;
/* If SRC had no assigned mode (i.e. we didn't know it was live)
assign it now and assume the value came from an input argument
or somesuch. */