https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88713
--- Comment #29 from Marc Glisse <glisse at gcc dot gnu.org> --- The main difference I can see is that clang computes rsqrt directly, while gcc first computes sqrt and then computes the inverse. Also gcc seems afraid of getting NaN for sqrt(0) so it masks out this value. ix86_emit_swsqrtsf in gcc/config/i386/i386.c seems like a good place to look at.