[Bug other/54857] New: Superfluous NOPs on Atom

piotr.wyderski at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 8 15:44:00 GMT 2012


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

             Bug #: 54857
           Summary: Superfluous NOPs on Atom
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: piotr.wyderski@gmail.com


GCC [4.7.1 on Linux and 4.6.1 on Cygwin] generates a LOT of unnecessary
NOPs when the target is Atom. The following testcase shows the odd behaviour:

int func(float f) { return (int)f; };

The output is:

gcc -S -O2 -march=atom -mtune=atom test.cpp 

.LFB0:
    .cfi_startproc
    cvttss2si    %xmm0, %eax
    nop
    nop
    nop
    nop
    nop
    nop
    ret
    .cfi_endproc 

When the target is e.g. Core2:

gcc -S -O2 -march=core2 -mtune=core2 test.cpp

it is simply:

.LFB0:
    .cfi_startproc
    cvttss2si    %xmm0, %eax
    ret
    .cfi_endproc 


gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/mnt/local/a3d.gcc-4.7.1/libexec/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.1/configure --prefix=/mnt/local/a3d.gcc-4.7.1
--with-gmp=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-mpfr=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-mpc=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-ppl=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-cloog=/mnt/local/a3d.gcc-4.7.1/gcc-prerequisites
--with-local-prefix=/mnt/local/a3d.gcc-4.7.1 --enable-languages=c,c++
--disable-multilib
Thread model: posix
gcc version 4.7.1 (GCC)



More information about the Gcc-bugs mailing list