From patchwork Mon Jul 26 10:46:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: New optimization for reload_combine Date: Mon, 26 Jul 2010 00:46:10 -0000 From: Bernd Schmidt X-Patchwork-Id: 59905 Message-Id: <4C4D6772.8050903@codesourcery.com> To: IainS Cc: gcc patches , David Edelsohn 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 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)