regrename.c (copy_value): Ignore the copy if the source register is present in the...
authorRichard Henderson <rth@redhat.com>
Wed, 9 Jan 2002 20:54:49 +0000 (12:54 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 9 Jan 2002 20:54:49 +0000 (12:54 -0800)
        * regrename.c (copy_value): Ignore the copy if the source register
        is present in the value chain with a narrower mode.

From-SVN: r48689

gcc/ChangeLog
gcc/regrename.c

index 4623baa7b07a9dbf596492b223747aa457cdafb3..95ed9eb7ad14db33979768fb8a3b45f65ece0ce7 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-09  Richard Henderson  <rth@redhat.com>
+
+       * regrename.c (copy_value): Ignore the copy if the source register
+       is present in the value chain with a narrower mode.
+
 2002-01-09  Herman A.J. ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
 
         * real.c (c4xtoe, toc4x): Do some special conversion on long doubles
index c164d216f78308b3950ba065b800c6648895fb77..d101525ad1df84ed3c3b09ee0ef8a8a9b743af96 100644 (file)
@@ -1244,6 +1244,12 @@ copy_value (dest, src, vd)
   if (vd->e[sr].mode == VOIDmode)
     set_value_regno (sr, vd->e[dr].mode, vd);
 
+  /* If SRC had been assigned a mode narrower than the copy, we can't
+     link DEST into the chain, because not all of the pieces of the
+     copy came from oldest_regno.  */
+  else if (sn > (unsigned int) HARD_REGNO_NREGS (sr, vd->e[sr].mode))
+    return;
+
   /* Link DR at the end of the value chain used by SR.  */
 
   vd->e[dr].oldest_regno = vd->e[sr].oldest_regno;