]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: [multiple changes]
authorMatthias Klose <doko@debian.org>
Sun, 25 Jul 2004 18:49:54 +0000 (18:49 +0000)
committerMatthias Klose <doko@gcc.gnu.org>
Sun, 25 Jul 2004 18:49:54 +0000 (18:49 +0000)
2004-07-25  Matthias Klose  <doko@debian.org>

        Backport:
        PR rtl-optimization/14700

        2004-06-24  Eric Christopher  <echristo@redhat.com>

        * combine.c (distribute_notes): Don't delete sets to
        global register variables.

        2004-06-29  Zack Weinberg  <zack@codesourcery.com>

        * combine.c (distribute_notes): Don't look at global_regs for
        pseudos.

From-SVN: r85157

gcc/ChangeLog
gcc/combine.c

index 41a943cbe07792717b52e2863e85e91c0e3662e8..f4feec2eb525fcd7354deaacf97da5fd4e8ce967 100644 (file)
@@ -1,3 +1,18 @@
+2004-07-25  Matthias Klose  <doko@debian.org>
+
+       Backport:
+       PR rtl-optimization/14700
+
+       2004-06-24  Eric Christopher  <echristo@redhat.com>
+
+       * combine.c (distribute_notes): Don't delete sets to
+       global register variables.
+       2004-06-29  Zack Weinberg  <zack@codesourcery.com>
+       * combine.c (distribute_notes): Don't look at global_regs for
+       pseudos.
+
 2004-07-23  James E Wilson  <wilson@specifixinc.com>
 
        PR target/16559
index b26053c5ad2a0b7c8c05a362b4547f0c2b5864f9..bc4ee639047cab9fcdafde367c13e58fea4a7b77 100644 (file)
@@ -12798,8 +12798,11 @@ distribute_notes (notes, from_insn, i3, 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 ((REGNO (XEXP (note, 0)) >= FIRST_PSEUDO_REGISTER
+                      || !global_regs[REGNO (XEXP (note, 0))])
+                     && reg_set_p (XEXP (note, 0), PATTERN (tem)))
                    {
                      rtx set = single_set (tem);
                      rtx inner_dest = 0;