https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91734

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is:
        /* sqrt(x) < c is the same as x < c*c, if we ignore NaNs.  */
        (if (! HONOR_NANS (@0))
         (cmp @0 { build_real (TREE_TYPE (@0), c2); })
         /* sqrt(x) < c is the same as x >= 0 && x < c*c.  */
         (if (GENERIC)
          (truth_andif
           (ge @0 { build_real (TREE_TYPE (@0), dconst0); })
           (cmp @0 { build_real (TREE_TYPE (@0), c2); })))))))))
c here is 1.17549435082228750796873653722224567781866555677208752151e-38f,
so c2 is 0.0f because the product is smaller than smallest positive subnormal
float.  Obviously, in that case we can't use < c2, but need to use <= c2.

Maybe we probably should compute c2 with rounding towards positive infinity,
then we could keep using < c2.

Reply via email to