This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
SSE regression
- From: Matteo Croce <rootkit85 at yahoo dot it>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 5 Jan 2008 02:53:03 +0100
- Subject: SSE regression
Hi,
I have a piece of code that runs ~70% slower on a Xeon CPU with
SSE enable than with plain 387.
[aguy@enc1 ~]$ uname -a
FreeBSD enc1 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP
[aguy@enc1 ~]$ gcc42 -v
Using built-in specs.
Target: i386-portbld-freebsd6.2
Configured with: ./..//gcc-4.2-20071024/configure --disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local --program-suffix=42 --libdir=/usr/local/lib/gcc-4.2.3 --with-gxx-include-dir=/usr/local/lib/gcc-4.2.3/include/c++/ --disable-rpath --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc42 i386-portbld-freebsd6.2
Thread model: posix
gcc version 4.2.3 20071024 (prerelease)
[aguy@enc1 ~]$ gcc42 ssucks.c -O2 -march=prescott -o ssucks-387
[aguy@enc1 ~]$ gcc42 ssucks.c -O2 -march=prescott -o ssucks-sse -mfpmath=sse
[aguy@enc1 ~]$ ssucks-387 ; ssucks-sse
FLOPS C Program (Double Precision), V2.0 18 Dec 1992
Module Error RunTime MFLOPS
(usec)
1 4.0146e-13 0.0147 953.0052
2 -1.4166e-13 0.0061 1149.6845
FLOPS C Program (Double Precision), V2.0 18 Dec 1992
Module Error RunTime MFLOPS
(usec)
1 4.0146e-13 0.0146 960.7945
2 -1.4166e-13 0.0281 249.3171
[aguy@enc1 ~]$
1149.6845 vs 249.3171: a ~78% slowdown by just enabling sse
I have source and output files here:
http://teknoraver.campuslife.it/software/gcc-sse/