Hi, GCC manuals says the foloowing are the list of optimizations turned on when -O1 flag is used. ------------------------------------------------------- -fdefer-pop -fdelayed-branch -fguess-branch-probability -fcprop-registers -floop-optimize -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -fmerge-constants -O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging. -O doesn?t turn on -ftree-sra for the Ada compiler. This option must be explicitly specified on the command line to be enabled for the Ada compiler. ---------------------------------------------------- But When I compiled the same file as in the following 2 ways, I got two differen assembly programs. What could be the reason. Thanks in advance. 1) gcc -march=pentium4 -O1 -S res22.c 2) gcc -march=pentium4 -fdefer-pop -fdelayed-branch -fguess-branch-probability -fcprop-registers -floop-optimize -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -fmerge-constants -fomit-frame-pointer -ftree-sra -S res22.c Are there any extra optimizations turned on while using -O1 options??????????????? Below is the res22.c program. ------------------------------------------------------- ------------------------------------------------------- 1 #include <stdio.h> 2 #include <xmmintrin.h> 3 unsigned int x , y,p,val,x1; 4 5 __m128 a, b, c; 6 7 float inp_sse1[4] __attribute__((aligned(16))) = { 1.2, 3.5, 1.7, 2.8 }; 8 float inp_sse2[4] __attribute__((aligned(16)))= { -0.7, 2.6, 3.3, -4.0 }; 9 float out_sse[4] __attribute__((aligned(16))); 10 void f() 11 { 12 13 c = _mm_add_ps(a, b); 14 _mm_store_ps(out_sse,c); 15 } 16 17 18 int main(void){ 19 int i,j; 20 21 a = _mm_load_ps(inp_sse1); 22 b = _mm_load_ps(inp_sse2); 23 24 //for(j=0;j<999;j++) 25 // for(i = 0; i < 9999; i++) 26 f(); 27 28 for(i = 0; i < 4; i++) { 29 printf("Result %d: %.2f\n",i,out_sse[i]); 30 } ___________________________________________________________ What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk