From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26846 invoked by alias); 24 Aug 2011 23:16:17 -0000 Received: (qmail 26837 invoked by uid 22791); 24 Aug 2011 23:16:16 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_DD,TW_DX,TW_VZ,TW_ZB 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; Wed, 24 Aug 2011 23:16:01 +0000 From: "xinliangli at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/50182] Performance degradation from gcc 4.1 (x86_64) Date: Thu, 25 Aug 2011 00:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: xinliangli at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: 2011-08/txt/msg02060.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182 davidxl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xinliangli at gmail dot com --- Comment #2 from davidxl 2011-08-24 23:15:44 UTC --- The problem is fixed in trunk compiler: 1) with 4.6 compiler: test description absolute operations ratio with number time per second test0 0 "int8_t constant add" 3.29 sec 486.32 M 1.00 RAT_STALLS.registers = 288249 (sampling count 10001) 2) with trunk compiler: test description absolute operations ratio with number time per second test0 0 "int8_t constant add" 1.34 sec 1194.03 M 1.00 No partial register stalls from user functions. Inner loop from trunk compiler: .L55: movzbl 0(%rbp,%rcx), %r9d addq $1, %rcx cmpl %ecx, %ebx leal 10(%r8,%r9), %r8d jg .L55 Inner loop from 46 compiler: .L43: addl $10, %eax addb (%rdx), %al addq $1, %rdx cmpq $data8+8000, %rdx jne .L43 RAT stalls (not precise event so the instruction causing stalls is a little off) : 400e27: nopw 0x0(%rax,%rax,1) 127 0.0440 : 400e30: add $0xa,%eax 5869 2.0330 : 400e33: add (%rdx),%al 282125 97.7263 : 400e35: add $0x1,%rdx : 400e39: cmp $0x404560,%rdx : 400e40: jne 400e30 David