aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@redhat.com>2004-06-24 19:15:43 +0000
committerEric Christopher <echristo@gcc.gnu.org>2004-06-24 19:15:43 +0000
commitde7c79cc7771f311aa451103162436077aa1699a (patch)
treef405b768fe015e84c1d843db4ab9e8e2ec4d672b
parentd413e3cc11c3b1d746ed9d187b4a7e695355219a (diff)
downloadgcc-de7c79cc7771f311aa451103162436077aa1699a.zip
gcc-de7c79cc7771f311aa451103162436077aa1699a.tar.gz
gcc-de7c79cc7771f311aa451103162436077aa1699a.tar.bz2
combine.c (distribute_notes): Don't delete sets to global register variables.
2004-06-24 Eric Christopher <echristo@redhat.com> * combine.c (distribute_notes): Don't delete sets to global register variables. From-SVN: r83606
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7799244..a08ab3f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-24 Eric Christopher <echristo@redhat.com>
+
+ * combine.c (distribute_notes): Don't delete sets to
+ global register variables.
+
2004-06-24 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (ffsdi2, clzdi2): New expanders.
diff --git a/gcc/combine.c b/gcc/combine.c
index c0fef9d..008e351 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -11821,8 +11821,10 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2)
/* If the register is being set at TEM, see if that is all
TEM is doing. If so, delete TEM. Otherwise, make this
- into a REG_UNUSED note instead. */
- if (reg_set_p (XEXP (note, 0), PATTERN (tem)))
+ into a REG_UNUSED note instead. Don't delete sets to
+ global register vars. */
+ if (reg_set_p (XEXP (note, 0), PATTERN (tem))
+ && !global_regs [REGNO(XEXP (note, 0))])
{
rtx set = single_set (tem);
rtx inner_dest = 0;