From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6933 invoked by alias); 30 Mar 2006 18:26:22 -0000 Received: (qmail 6924 invoked by uid 48); 30 Mar 2006 18:26:19 -0000 Date: Thu, 30 Mar 2006 18:26:00 -0000 Subject: [Bug target/26949] New: [4.2 regression] worse code generated for -march=pentium4 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dann at godzilla dot ics dot uci dot edu" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg02995.txt.bz2 List-Id: Compiling the code in PR26944 with -O2 -march=pentium4 -fno-tree-ch generates this for the loop: .L3: movl %esi, -4(%eax) addl $1, %edx addl $4, %eax cmpl -16(%ebp), %edx <----- note an extra memory access here jle .L3 compiling for -march=i686 (or even just adding -fomit-frame-pointer) generates: .L3: addl $1, %ecx movl %ebx, -4(%edx) addl $4, %edx cmpl %eax, %ecx <---- no memory access here jle .L3 The above problem does not happen with gcc-4.0.3 or 4.1.0 -- Summary: [4.2 regression] worse code generated for - march=pentium4 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dann at godzilla dot ics dot uci dot edu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26949