From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14082 invoked by alias); 15 Jan 2003 18:43:10 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 14068 invoked from network); 15 Jan 2003 18:43:09 -0000 Received: from unknown (HELO smtp0.libero.it) (193.70.192.33) by sources.redhat.com with SMTP; 15 Jan 2003 18:43:09 -0000 Received: from engineer (151.24.31.66) by smtp0.libero.it (6.7.015) id 3E1B0377003A4919; Wed, 15 Jan 2003 19:43:09 +0100 Message-ID: <005801c2bcc5$e9e2f6a0$421f1897@bonz> From: "Bonzini" To: , Cc: Subject: Re: optimizations Date: Wed, 15 Jan 2003 23:20:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-SW-Source: 2003-01/txt/msg00727.txt.bz2 > > Could you please also tell me if 3.3 and 3.4 remove the extra mov's in and out > > of %eax. Ideally, there should be no more than 4 instructions in the critical > > loop. > > .L2: > movl -4(%ebp), %eax <== still does the load > cmpl $16, %eax > je .L7 > incl %eax > movl %eax, -4(%ebp) <== and store > jmp .L2 > .L7: > > For some reason it is not (even with -fnew-ra), but on PPC there > is no extra load/store. Instruction counts do not tell the whole story; gcc is simply putting more pressure on the decoding unit but less pressure on the execution unit (which otherwise would execute two loads in the `taken' case). Things might be different if gcc is given other options like -mtune=i386. |_ _ _ __ |_)(_)| ),' ------- '---