From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11298 invoked by alias); 26 Jan 2011 14:43:42 -0000 Received: (qmail 11288 invoked by uid 22791); 26 Jan 2011 14:43:42 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Jan 2011 14:43:38 +0000 From: "mikpe at it dot uu.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/46856] [4.6 regression] internal compiler error in final_scan_insn breaks m68k-linux bootstrap X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mikpe at it dot uu.se X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 26 Jan 2011 14:49:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg02829.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46856 --- Comment #6 from Mikael Pettersson 2011-01-26 14:43:34 UTC --- The loop in reload_combine_recognize_const_pattern contains this check: /* If the add clobbers another hard reg in parallel, don't move it past a real set of this hard reg. */ if (must_move_add && clobbered_regno >= 0 && reg_state[clobbered_regno].real_store_ruid >= use_ruid) break; Since the moved add is a cc0 setter, it seems reasonable to check here that it's not moved past another cc0 setter. Replacing the previous patch with the following also restores bootstrap (testsuite still running): --- gcc-4.6-20110115/gcc/postreload.c.~1~ 2010-12-21 15:51:42.000000000 +0100 +++ gcc-4.6-20110115/gcc/postreload.c 2011-01-18 20:26:39.000000000 +0100 @@ -1008,6 +1008,11 @@ reload_combine_recognize_const_pattern ( if (must_move_add && clobbered_regno >= 0 && reg_state[clobbered_regno].real_store_ruid >= use_ruid) break; +#if defined(HAVE_cc0) + /* Unbreak m68k, see PR bootstrap/46856. */ + if (must_move_add && sets_cc0_p (PATTERN (use_insn))) + break; +#endif gcc_assert (reg_state[regno].store_ruid <= use_ruid); /* Avoid moving a use of ADDREG past a point where it is stored. */