From patchwork Mon Jul 26 10:46:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 59905 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 328FAB70AB for ; Mon, 26 Jul 2010 20:46:27 +1000 (EST) Received: (qmail 18495 invoked by alias); 26 Jul 2010 10:46:25 -0000 Received: (qmail 18484 invoked by uid 22791); 26 Jul 2010 10:46:24 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Jul 2010 10:46:19 +0000 Received: (qmail 31378 invoked from network); 26 Jul 2010 10:46:17 -0000 Received: from unknown (HELO ?84.152.240.34?) (bernds@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Jul 2010 10:46:17 -0000 Message-ID: <4C4D6772.8050903@codesourcery.com> Date: Mon, 26 Jul 2010 12:46:10 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100724 Thunderbird/3.1.1 MIME-Version: 1.0 To: IainS CC: gcc patches , David Edelsohn Subject: Re: New optimization for reload_combine References: <4C4035C3.9080305@codesourcery.com> <9E468D4F-ADBF-4F7F-9055-81484B34E78D@sandoe-acoustics.co.uk> In-Reply-To: <9E468D4F-ADBF-4F7F-9055-81484B34E78D@sandoe-acoustics.co.uk> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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)