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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:970dcd567449ec510477a043bbff70a0b960bd7f

commit r13-3804-g970dcd567449ec510477a043bbff70a0b960bd7f
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Tue Nov 8 13:24:02 2022 +0100

    cdce: Fix up get_no_error_domain for new f{16,32,64,128} builtins
[PR107547]

    I've missed that this function needs to handle all the builtins that
    are handled in can_test_argument_range.
    The following patch does that.  For many of the builtins (like acos, or
    log) it is the same range regardless of the floating point type, but for
    some (cosh, sinh, exp{,m1,2}) it is different for each format,
    so I had to compute those ranges.

    Note, seems the existing ranges were in some cases (e.g. for exp2)
    the smallest in absolute value which results infinite result, in others
    the largest which still results in finite result (but consistently so
    for the IEEE single vs. double).  I've followed that for IEEE half and
    quad cases too, just am not sure why it was like that.  I think
    get_domain with true, false is open interval rather than closed
    and the comments indicate that too, conservatively that is certainly
    correct.

    OT, with frange, perhaps we could DCE the calls unconditionally if
    frange can prove we are in the domain range.

    2022-11-08  Jakub Jelinek  <ja...@redhat.com>

            PR tree-optimization/107547
            * tree-call-cdce.cc (get_no_error_domain): Handle
CASE_FLT_FN_FLOATN_NX
            of BUILT_IN_{ACOS,ASIN,ACOSH,ATANH,LOG,LOG2,LOG10,LOG1P}.  Handle
            BUILT_IN_{COSH,SINH,EXP,EXPM1,EXP2}F{16,32,64,128}.

            * gcc.dg/pr107547.c: New test.

Reply via email to