This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix heisenbug in combine.c


> > 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;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]