public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: fshvaige@cisco.com To: gcc-gnats@gcc.gnu.org Subject: optimization/7067: -Os with -mcpu=powerpc optimizes for speed (?) instead of space Date: Tue, 18 Jun 2002 08:56:00 -0000 [thread overview] Message-ID: <20020618150047.23321.qmail@sources.redhat.com> (raw) >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:
next reply other threads:[~2002-06-18 15:07 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-06-18 8:56 fshvaige [this message] 2002-08-01 15:24 dje 2002-08-02 9:26 dje
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020618150047.23321.qmail@sources.redhat.com \ --to=fshvaige@cisco.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).