From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3163 invoked by alias); 31 Jul 2012 16:29:38 -0000 Received: (qmail 3153 invoked by uid 22791); 31 Jul 2012 16:29:37 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED 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; Tue, 31 Jul 2012 16:29:24 +0000 From: "hagayg at broadcom dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/38644] [4.6 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code Date: Tue, 31 Jul 2012 16:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hagayg at broadcom dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: CC 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 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: 2012-07/txt/msg02257.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644 Hagay changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hagayg at broadcom dot com --- Comment #65 from Hagay 2012-07-31 16:26:15 UTC --- Also saw the same problem on MIPS Compiling using 'gcc version 4.5.2 (Sourcery CodeBench Lite 2011.09-86)' Produces the below assembly (mips16) 4c13 addiu a0,19 6478 restore 64,ra,s0-s1 f3a6 dd50 sw v0,13232(a1) e820 jr ra 8c40 lh v0,0(a0) 6500 nop You can see the 'lh' comes after 'restore' , so the problem exist on MIPS Sourcery as well.