From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4827 invoked by alias); 14 Nov 2010 17:57:26 -0000 Received: (qmail 4818 invoked by uid 22791); 14 Nov 2010 17:57:26 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Sun, 14 Nov 2010 17:56:39 +0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/40436] [4.5/4.6 regression] 0.5% code size regression caused by r147852 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.5.2 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: Sun, 14 Nov 2010 18:00: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: 2010-11/txt/msg01830.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40436 --- Comment #45 from rguenther at suse dot de 2010-11-14 17:38:46 UTC --- On Sun, 14 Nov 2010, hubicka at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40436 > > --- Comment #44 from Jan Hubicka 2010-11-14 16:16:35 UTC --- > OK, ialloc is because 4.3 folds: > oldbit_430 = 0; > D.12699_431 = oldbit_430 & 1; > D.12698_462 = D.12699_431; > D.12095_241 = D.12698_462; > if (D.12095_241 != 0) > goto ; > else > goto ; > > In mainline the same sequence misses oldbit_430 = 0. > > static __inline__ int > test_and_set_bit_simple(unsigned long nr, volatile void * addr) > { > unsigned long reg1, reg2; > int oldbit; > > return oldbit & 1; > } > > > > > > static __inline__ int > test_and_clear_bit_simple(unsigned long nr, volatile void * addr) > { > unsigned long reg1, reg2; > int oldbit; > > > return oldbit & 1; > } > > > > > > static __inline__ int > test_and_change_bit_simple(unsigned long nr, volatile void * addr) > { > unsigned long reg1, reg2; > int oldbit; > > > return oldbit & 1; > } > > So another source code bug. > Richard, do you remember if we dropped initialization by zero for uninitialized > vars? I don't even remember that we did that. Btw, CCP should be able to fold it with UNDEFINED given that & 1 cannot yield zero (but we're very conservative here now due to past bugs ...)