[Bug target/46080] [4.4/4.5/4.6 Regression] incorrect precision of sqrtf builtin for x87 arithmetic (-mfpmath=387)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 21 20:56:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46080

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-10-21 20:55:58 UTC ---
fsqrt insn is always used, and if the result is NaN, it calls library sqrtf
function so that errno is set correctly.  The (conditional) call causes (some
of) the values to be forced into stack and thus rounded to IEEE single
precision, if they aren't forced into stack, they will have long double
precision.
You can use -fno-errno-math if you don't want errno to be set, then there will
be no calls to sqrtf and all 3 calls should at least when optimizing evaluate
in extended precision.



More information about the Gcc-bugs mailing list