This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC-3.2.1 behavior on p3/p4
- From: "Pramod Kumar Swami" <Pramod_Swami at infosys dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Sun, 16 Mar 2003 13:20:18 +0530
- Subject: GCC-3.2.1 behavior on p3/p4
Hi,
I am trying to optimize a C code with the use of MMX 64-bit instructions on BSD 4.7, The compiler which I am using is g++ 3.2.1. Now there is a strange behavior of the code generated by the compiler on different targets. If I run the code on Pentium-3 650 MHz machine, the 64-bit code runs faster than its equivalent C implementation. But if I run the same code on Pentium-4 1.6 GHz machine the C implementation runs faster than the 64-bit implementation. The code does not contain any floating point operation.
The compiler options which I am using are:
g++ -msse -O3 (in case of 64-bit implementation)
g++ -O3 (in case of C implementation)
Is there any specific option for the compiler to generate optimized code for P4 ?? Can someone clarify this strange behavior?? I have also tried -march=pentium4 option.
Regards,
Pramod