From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22589 invoked by alias); 3 Jul 2008 12:55:38 -0000 Received: (qmail 21399 invoked by alias); 3 Jul 2008 12:54:35 -0000 Date: Thu, 03 Jul 2008 12:55:00 -0000 Message-ID: <20080703125435.21394.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/36713] [4.4 regression] r137252 breaks -O2 optimization on x86_64-unknown-linux-gnu In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" 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: 2008-07/txt/msg00190.txt.bz2 ------- Comment #12 from rguenther at suse dot de 2008-07-03 12:54 ------- Subject: Re: [4.4 regression] r137252 breaks -O2 optimization on x86_64-unknown-linux-gnu On Thu, 3 Jul 2008, dfranke at gcc dot gnu dot org wrote: > ------- Comment #11 from dfranke at gcc dot gnu dot org 2008-07-03 12:45 ------- >> I guess the assembly is different, right? > > Yes, it is. Comparing *.s files from FCFLAGS="-O2 -save-temps", there are > differences in one file - though not the one suspected in comment #7. > > There is one difference in the .optimized file that I could easily identify: > - D.1935 = dummy_atom_model_inertia_tensor (this, phase); > - __result_dummy_atom_model_rad.21 = inertia_tensor_to_rg (&D.1935); > + D.1935 = dummy_atom_model_inertia_tensor (this, phase) [return slot > optimization]; > + __result_dummy_atom_model_rad.21 = inertia_tensor_to_rg (&D.1935) [tail > call]; Ok, that is an interesting difference. Can you try if -fno-optimize-sibling-calls fixes it (that should remove the [tail call]). Unfortunately there is no option to disable the return slot optimization, so you have to disable that in the source (tree-nrv.c, just return early from execute_return_slot_opt). Obviously the above may be a valid extra optimization ... Richard. > > And there are plenty in *.alias, e.g.: > Aliased symbols > > -D.1935, UID D.1935, struct inertia_tensor, is addressable, score: 8, direct > reads: 0, direct writes: 0, indirect reads: 0, indirect writes: 2, call > clobbered (passed to call) > +D.1935, UID D.1935, struct inertia_tensor, is addressable, score: 0, direct > reads: 0, direct writes: 0, indirect reads: 0, indirect writes: 0 > > The difference file has 3000+ lines here, one could argue that the dumps are > significantly different ;) > > > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36713