public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/41868]  New: cell microcode instruction is generated for a trivial loop with -O2 optimizations, hurting performance badly
@ 2009-10-29 15:16 siarhei dot siamashka at gmail dot com
  2009-10-29 15:21 ` [Bug target/41868] cell microcode instruction (addic.) " siarhei dot siamashka at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: siarhei dot siamashka at gmail dot com @ 2009-10-29 15:16 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]

/***************************************/
void __attribute__((noinline)) y()
{
    asm volatile ("# nop\n");
}

void __attribute__((noinline)) x(long c)
{
    while (c--)
        y();
}

int main()
{
    /* Run total 3.2G iterations */
    x(1600000000);
    x(1600000000);
    return 0;
}
/***************************************/

$ gcc -O2 -mcpu=cell -mtune=cell -mwarn-cell-microcode -o test-O2 test.c
test.c: In function ‘x’:
test.c:9: warning: emitting microcode insn {ai.|addic.} %0,%1,%2       
[*adddi3_internal3] #38

$ time ./test-O2
real    0m56.385s
user    0m56.232s
sys     0m0.138s

$ gcc -Os -mcpu=cell -mtune=cell -mwarn-cell-microcode -o test-Os test.c
$ time ./test-Os

real    0m24.149s
user    0m24.086s
sys     0m0.060s


-- 
           Summary: cell microcode instruction is generated for a trivial
                    loop with -O2 optimizations, hurting performance badly
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: siarhei dot siamashka at gmail dot com
 GCC build triplet: powerpc64-unknown-linux-gnu
  GCC host triplet: powerpc64-unknown-linux-gnu
GCC target triplet: powerpc64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41868


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-29 23:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-41868-4@http.gcc.gnu.org/bugzilla/>
2011-11-29 23:21 ` [Bug target/41868] cell microcode instruction (addic.) is generated for a trivial loop with -O2 optimizations, hurting performance badly pinskia at gcc dot gnu.org
2011-11-29 23:28 ` pinskia at gcc dot gnu.org
2009-10-29 15:16 [Bug target/41868] New: cell microcode instruction " siarhei dot siamashka at gmail dot com
2009-10-29 15:21 ` [Bug target/41868] cell microcode instruction (addic.) " siarhei dot siamashka at gmail dot com
2009-11-02 16:51 ` pinskia at gcc dot gnu dot org
2009-11-02 16:56 ` pinskia at gcc dot gnu dot org
2009-11-02 17:05 ` pinskia at gcc dot gnu dot org
2009-11-02 17:09 ` pinskia at gcc dot gnu dot org
2009-11-02 17:10 ` pinskia at gcc dot gnu dot org
2009-11-03 20:09 ` siarhei dot siamashka at gmail dot com

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).