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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:4aa14ec7d5b25722e4d02c29c8c1e22dcc5a4915

commit r14-3433-g4aa14ec7d5b25722e4d02c29c8c1e22dcc5a4915
Author: Andrew Pinski <apin...@marvell.com>
Date:   Wed Aug 23 16:46:10 2023 +0000

    MATCH: [PR111109] Fix bit_ior(cond,cond) when comparisons are fp

    The patterns that were added in r13-4620-g4d9db4bdd458, missed that
    (a > b) and (a <= b) are not inverse of each other for floating point
    comparisons (if NaNs are supported). Even though there was a check for
    intergal types, it was only for the result of the cond rather for the
    type of what is being compared. The fix is to check to see if cmp and
    icmp are inverse of each other by using the invert_tree_comparison
function.

    OK for trunk and GCC 13 branch? Bootstrapped and tested on x86_64-linux-gnu
with no regressions.

    I added the testcase to execute/ieee as it requires support for NAN.

            PR tree-optimization/111109

    gcc/ChangeLog:

            * match.pd (ior(cond,cond), ior(vec_cond,vec_cond)):
            Add check to make sure cmp and icmp are inverse.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/execute/ieee/fp-cmp-cond-1.c: New test.

Reply via email to