public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/7067: -Os with -mcpu=powerpc optimizes for speed (?) instead of space
@ 2002-08-01 15:24 dje
0 siblings, 0 replies; 3+ messages in thread
From: dje @ 2002-08-01 15:24 UTC (permalink / raw)
To: dje, fshvaige, gcc-bugs, gcc-prs, nobody
Synopsis: -Os with -mcpu=powerpc optimizes for speed (?) instead of space
Responsible-Changed-From-To: unassigned->dje
Responsible-Changed-By: dje
Responsible-Changed-When: Thu Aug 1 15:24:48 2002
Responsible-Changed-Why:
PowerPC
State-Changed-From-To: open->analyzed
State-Changed-By: dje
State-Changed-When: Thu Aug 1 15:24:48 2002
State-Changed-Why:
Should optimize_size affect RTX_COSTS(MULT)?
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7067
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: optimization/7067: -Os with -mcpu=powerpc optimizes for speed (?) instead of space
@ 2002-08-02 9:26 dje
0 siblings, 0 replies; 3+ messages in thread
From: dje @ 2002-08-02 9:26 UTC (permalink / raw)
To: dje, fshvaige, gcc-bugs, gcc-prs
Synopsis: -Os with -mcpu=powerpc optimizes for speed (?) instead of space
State-Changed-From-To: analyzed->closed
State-Changed-By: dje
State-Changed-When: Fri Aug 2 09:26:30 2002
State-Changed-Why:
Addressed in GCC 3.3
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7067
^ permalink raw reply [flat|nested] 3+ messages in thread
* optimization/7067: -Os with -mcpu=powerpc optimizes for speed (?) instead of space
@ 2002-06-18 8:56 fshvaige
0 siblings, 0 replies; 3+ messages in thread
From: fshvaige @ 2002-06-18 8:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 7067
>Category: optimization
>Synopsis: -Os with -mcpu=powerpc optimizes for speed (?) instead of space
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Tue Jun 18 08:06:13 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: fshvaige@cisco.com
>Release: 3.1 20020510 (prerelease)
>Organization:
>Environment:
../gcc-3.1/configure --with-gcc-version-trigger=/home/install/gcc-3.1/gcc/version.c --host=i686-pc-linux-gnu --with-newlib --enable-target-optspace --target=ppc-eabi --prefix=/home/crossGCC/ppc-eabi --with-local-prefix=/home/crossGCC/ppc-eabi --program-prefix=ppc-eabi- --enable-languages=c,c++ -v --norecursion
>Description:
File test4.c:
unsigned f (unsigned v) {
return v * 10;
}
Command line:
ppc-eabi-gcc -S -Os test4.c
Produced code (right, space optimized):
f:
mulli 3,3,10
blr
Command line:
ppc-eabi-gcc -S -Os -mcpu=powerpc test4.c
Produced code (wrong, probably speed optimized ?):
f:
mr 0,3
slwi 3,3,2
add 3,3,0
slwi 3,3,1
blr
Note: instruction "mulli" present in powerpc and even used by the same compiler and same command line for the very alike function, so problem is somewhere in optimization.
File test4a.c:
unsigned f (unsigned v) {
return v * 11;
}
Command line:
ppc-eabi-gcc -S -Os -mcpu=powerpc test4a.c
Produced code (right):
f:
mulli 3,3,11
blr
>How-To-Repeat:
ppc-eabi-gcc -S -Os test4.c
ppc-eabi-gcc -S -Os -mcpu=powerpc test4.c
ppc-eabi-gcc -S -Os -mcpu=powerpc test4a.c
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-08-02 16:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-01 15:24 optimization/7067: -Os with -mcpu=powerpc optimizes for speed (?) instead of space dje
-- strict thread matches above, loose matches on Subject: below --
2002-08-02 9:26 dje
2002-06-18 8:56 fshvaige
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).