diff mbox

New optimization for reload_combine

Message ID 4C4D6772.8050903@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt July 26, 2010, 10:46 a.m. UTC
On 07/26/2010 12:12 PM, IainS wrote:
> It fails on the stage1 compiler, so that should help debug (and I guess
> it's not a gtoggle issue).
> and I've kept the builds of MPFR(162269) and (162270) .. (although they
> are normal, optimized objects).

Can you, as before, find a miscompiled file and send me .i and
before/after .s files?  First see if stage1 gcc has any testsuite
failures, that's probably easier than finding the bootstrap problem.

Also, try with the attached patch which gcc_asserts that the situation
fixed by the previous patch can't happen.


Bernd
diff mbox

Patch

Index: postreload.c
===================================================================
--- postreload.c	(revision 162421)
+++ postreload.c	(working copy)
@@ -955,9 +955,9 @@  reload_combine_recognize_const_pattern (
 	      && reg_state[clobbered_regno].real_store_ruid >= use_ruid)
 	    break;
 
-	  /* Avoid moving a use of ADDREG past a point where it
-	     is stored.  */
-	  if (reg_state[REGNO (addreg)].store_ruid >= use_ruid)
+	  gcc_assert (reg_state[regno].store_ruid <= use_ruid);
+	  /* Avoid moving a use of ADDREG past a point where it is stored.  */
+	  if (reg_state[REGNO (addreg)].store_ruid > use_ruid)
 	    break;
 
 	  if (mem != NULL_RTX)