From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22418 invoked by alias); 22 Apr 2002 14:56:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 22371 invoked by uid 71); 22 Apr 2002 14:56:02 -0000 Resent-Date: 22 Apr 2002 14:56:02 -0000 Resent-Message-ID: <20020422145602.22368.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, roger@eyesopen.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, roger@eyesopen.com Received:(qmail 14273 invoked by uid 61); 22 Apr 2002 14:46:45 -0000 Message-Id:<20020422144645.14270.qmail@sources.redhat.com> Date: Mon, 22 Apr 2002 07:56:00 -0000 From: roger@eyesopen.com Reply-To: roger@eyesopen.com To: gcc-gnats@gcc.gnu.org Cc: roger@eyesopen.com X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify:roger@eyesopen.com Subject: optimization/6405: Loop-unrolling related performance regressions X-SW-Source: 2002-04/txt/msg01108.txt.bz2 List-Id: >Number: 6405 >Category: optimization >Synopsis: Loop-unrolling related performance regressions >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: pessimizes-code >Submitter-Id: net >Arrival-Date: Mon Apr 22 07:56:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Roger Sayle >Release: gcc-3.1 branch and mainline 20020422 >Organization: >Environment: All platforms, but first observed on i686-pc-linux-gnu. >Description: See http://gcc.gnu.org/ml/gcc/2002-02/msg00307.html With the command line options "-O3 -funroll-loops", GCC 2.96 generates better code for the attached loop than GCC 3.1 (prerelease) or mainline. A correctness fix had the side effect that the compiler can no longer determine that this loop iterates a fix number of times. >How-To-Repeat: Compile the attached loop.c with "-O2 -funroll-all-loops" and inspect the assembly code generated. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/x-unknown-content-type-cfile; name="loop.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="loop.c" Y29uc3QgaW50IGZlYXR1cmVfdGltZXMgPSAyNTsKCmV4dGVybiB2b2lkIGZvbyh2b2lkKTsKCnZv aWQKdGVzdCAodm9pZCkKewogICBpbnQgaSA9IDE7CgogICBmb3IgKDs7KQogICAgIHsKICAgICAg IGZvbyAoKTsKICAgICAgIGkrKzsKICAgICAgIGlmIChpID4gZmVhdHVyZV90aW1lcykKICAgICAg ICAgYnJlYWs7CiAgICAgfQp9Cgo=