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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Actually, I was just misreading the tree dumps, we use hw insn for x u>= 0.0,
which
is UNGE_EXPR, so it is true if x is NAN or GE_EXPR, or as described in the
tree-call-cdce.cc comment:
        y = sqrt (x);
     ==>
        if (__builtin_isless (x, 0))
          y =  sqrt (x);
        else
          y = IFN_SQRT (x);
So we don't need to inspect anything on the libc sides, we already use the hw
insn even for NANs.
All we need to do is to use the ranger in tree-call-cdce.cc or perhaps later,
and fold the x UNGE_EXPR 0.0 into true whenever frange says so (i.e. that the
range is a subset
of [-0.0, +INF] NAN).

Reply via email to