Given code such as #include <math.h> float dz[100]; int foo() { int i; for (i=0; i<100; i++) { dz[i] = sqrtf(dz[i]); } }
Open64 generates (on X86) a sqrt instruction followed by a conditional call to the sqrtf library function. __sqrt_arg_temp_0 = dz[i]; __save_sqrt_temp_1 = _F4SQRT(__sqrt_arg_temp_0); if(__save_sqrt_temp_1 != __save_sqrt_temp_1) { __save_sqrt_temp_1 = sqrtf(__sqrt_arg_temp_0); } Does anyone know the motivation for the library call? Is something missing in the X86 hardware instruction, some error value in the library that needs to be set, something else? Seems like a pretty high performance penalty for this behavior. Dror PS gcc seems to do the same thing ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel