From 42bd17b7fc6af8d4239ff6925bc0697a84545c6a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 9 Jan 2002 12:54:49 -0800 Subject: [PATCH] regrename.c (copy_value): Ignore the copy if the source register is present in the value chain with a... * 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 | 5 +++++ gcc/regrename.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4623baa7b07..95ed9eb7ad1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-01-09 Richard Henderson + + * 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 * real.c (c4xtoe, toc4x): Do some special conversion on long doubles diff --git a/gcc/regrename.c b/gcc/regrename.c index c164d216f78..d101525ad1d 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -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; -- 2.30.2