optimization/6405: Loop-unrolling related performance regressions
roger@eyesopen.com
roger@eyesopen.com
Mon Apr 22 07:56:00 GMT 2002
>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 <roger@eyesopen.com>
>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=
More information about the Gcc-prs
mailing list