This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix heisenbug in combine.c
- From: Eric Christopher <echristo at redhat dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Fri, 02 Jul 2004 01:13:40 -0700
- Subject: Re: Fix heisenbug in combine.c
- References: <87fz8dyghz.fsf@taltos.codesourcery.com> <1088566819.10056.76.camel@dzur.sfbay.redhat.com> <874qotyae1.fsf@taltos.codesourcery.com>
> > This may be what was causing bootstrap failures with my last combine
> > patch on 3.4 and 3.3. Can you check please?
I just completed a bootstrap and test. No regressions.
OK for 3.4?
-eric
--
Eric Christopher <echristo@redhat.com>
2004-07-01 Eric Christopher <echristo@redhat.com>
PR rtl-optimization/14700
Backport from mainline:
2004-06-30 Zack Weinberg <zack@codesourcery.com>
* combine.c (distribute_notes): Don't look at global_regs for
pseudos.
2004-06-24 Eric Christopher <echristo@redhat.com>
* combine.c (distribute_notes): Don't delete sets to
global register variables.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.400.4.8
diff -u -p -w -r1.400.4.8 combine.c
--- combine.c 18 May 2004 10:51:30 -0000 1.400.4.8
+++ combine.c 2 Jul 2004 06:54:25 -0000
@@ -12658,8 +12658,11 @@ distribute_notes (rtx notes, rtx from_in
/* 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;