Commit 21e16bd6 by Richard Henderson Committed by Richard Henderson

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

From-SVN: r48669
parent 35484f77
2002-01-08 Richard Henderson <rth@redhat.com> 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 * config/alpha/alpha.c (alpha_split_conditional_move): Call copy_rtx
as needed to avoid shared structure. as needed to avoid shared structure.
......
...@@ -1214,6 +1214,7 @@ copy_value (dest, src, vd) ...@@ -1214,6 +1214,7 @@ copy_value (dest, src, vd)
{ {
unsigned int dr = REGNO (dest); unsigned int dr = REGNO (dest);
unsigned int sr = REGNO (src); unsigned int sr = REGNO (src);
unsigned int dn, sn;
unsigned int i; unsigned int i;
/* ??? At present, it's possible to see noop sets. It'd be nice if /* ??? At present, it's possible to see noop sets. It'd be nice if
...@@ -1230,6 +1231,13 @@ copy_value (dest, src, vd) ...@@ -1230,6 +1231,13 @@ copy_value (dest, src, vd)
if (frame_pointer_needed && dr == HARD_FRAME_POINTER_REGNUM) if (frame_pointer_needed && dr == HARD_FRAME_POINTER_REGNUM)
return; 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) /* 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 assign it now and assume the value came from an input argument
or somesuch. */ or somesuch. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment