diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-09 01:07:13 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-09 01:07:13 +0000 |
commit | e932080c9d69531578ef8fa3dc19b48f5432ba58 (patch) | |
tree | 93405ae61022424ac07b96751d7bca9a59637485 /gcc/regrename.c | |
parent | a5510c0b7605f4f7c6fb8fcc72bfe79acf867398 (diff) | |
download | gcc-e932080c9d69531578ef8fa3dc19b48f5432ba58.tar.gz |
* regrename.c (copy_value): Ignore overlapping copies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48669 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r-- | gcc/regrename.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c index 45f5b8552ef..0079dc1e316 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -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. */ |