[Bug tree-optimization/126296] `(i <=> j > 0) | (i <=> j < 0)` should optimize to `i <> j` even with trapping

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126296

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrea Pinski <[email protected]>:

https://gcc.gnu.org/g:1c69a96d20cbfd4e9a36ee8a6bff8591150424aa

commit r17-2735-g1c69a96d20cbfd4e9a36ee8a6bff8591150424aa
Author: Andrea Pinski <[email protected]>
Date:   Mon Jul 27 15:06:07 2026 -0700

    testsuite: Add C++ testcase for PR 126296: `<=>` folding into `<>`.

    This adds 2 testcases for fp: `(i <=> j > 0) | (i <=> j < 0)`.
    The trapping version was fixed by r17-2709-gde8be0eb05d951
    while the non-trapping version was fixed earlier by
    r17-2129-gea8c74c074925b.
    Since we didn't have a testcase for these cases before,
    it would be a good idea to have them.

    Pushed as obvious after testing to make sure they work on x86_64-linux-gnu.

            PR tree-optimization/126296

    gcc/testsuite/ChangeLog:

            * g++.dg/tree-ssa/pr126296-1.C: New test.
            * g++.dg/tree-ssa/pr126296-2.C: New test.

    Signed-off-by: Andrea Pinski <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.