So When I try to compile such code #include <iostream> #include <time.h> #include <stdlib.h> #include <math.h>
#include <emmintrin.h> int main() { double s_ptime = clock(); double d1 = 0; double d2 = 1; double d3 = 1; __m128d pd, pd2; pd = _mm_loadh_pd(pd, &d1); pd = _mm_loadl_pd(pd, &d2); pd2 = _mm_loadh_pd(pd2, &d3); pd2 = _mm_loadl_pd(pd2, &d3); for(long i=0; i<10000000000; i++){ pd = _mm_sub_pd(pd, pd2); }; _mm_storeh_pd(&d1, pd); _mm_storel_pd(&d2, pd); double ptime = (clock() - s_ptime); //CLOCKS_PER_SEC; std::cout << "\t cpu: " << ptime << " " << d1 <<" " << d2 << " tics\n"; }; with command g++43 -mfpmath=sse -msse -msse2 -o testsse testsse.cc -mstackrealign I have such message /usr/local/lib/gcc-4.3.2/include/c++//x86_64-portbld-freebsd7.0/bits/gthr-default.h: In function 'void __gthread_trigger()': /usr/local/lib/gcc-4.3.2/include/c++//x86_64-portbld-freebsd7.0/bits/gthr-default.h:174: error: unrecognizable insn: (insn 16 15 17 /usr/local/lib/gcc-4.3.2/include/c++//x86_64-portbld-freebsd7.0/bits/gthr-default.h:171 (parallel [ (set (reg/f:DI 7 sp) (and:SI (reg/f:DI 7 sp) (const_int -16 [0xfffffffffffffff0]))) (clobber (reg:CC 17 flags)) ]) -1 (nil)) /usr/local/lib/gcc-4.3.2/include/c++//x86_64-portbld-freebsd7.0/bits/gthr-default.h:174: internal compiler error: in insn_default_length, at insn-attrtab.c:1340 Please submit a full bug report, with preprocessed source if appropriate. -- Summary: Internal compiller bug Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: msnkipa at mail dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36732