https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91734
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Even in the default rounding mode, cases where c2 is equal to zero are clearly problematic as this testcase shows, but also cases where c is subnormal. E.g. sqrtf (x) < 0x1.2dd3d0p-65f is true for x 0x1.63dbc0p-130f, because sqrtf (0x1.63dbc0p-130f) == 0x1.2dd3cep-65. But c2 is 0x1.63dbc0p-130f and so 0x1.63dbc0p-130f < 0x1.63dbc0p-130f is false. So, 1) shall we somehow guard some of these optimizations on !HONOR_SIGN_DEPENDENT_ROUNDING (or is flag_unsafe_math_optimizations it is guarded on incompatible with -frounding-math)? 2) after computing the c2, try to real_sqrt it again and if cmp is LT_EXPR or GE_EXPR, adjust cmp depending on how the boundary value compares?