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

--- Comment #5 from GCC 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:c65653f5685a106661596a413744953ea9cdbc60

commit r15-2458-gc65653f5685a106661596a413744953ea9cdbc60
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Mon Jul 29 11:33:58 2024 -0700

    match: Fix types matching for `(?:) !=/== (?:)` [PR116134]

    The problem here is that in generic types of comparisons don't need
    to be boolean types (or vector boolean types). And fixes that by making
    sure the types of the conditions match before doing the optimization.

    Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR middle-end/116134

    gcc/ChangeLog:

            * match.pd (`(a ? x : y) eq/ne (b ? x : y)`): Check that
            a and b types match.
            (`(a ? x : y) eq/ne (b ? y : x)`): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.dg/torture/pr116134-1.c: New test.

    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Reply via email to