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

--- Comment #9 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:245595d72818526e2ca857848831e8afa87ae2de

commit r14-9941-g245595d72818526e2ca857848831e8afa87ae2de
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Wed Apr 10 13:39:01 2024 -0700

    match: Fix `!a?b:c` and `a?~t:t` patterns for signed 1 bit types [PR114666]

    The problem is `!a?b:c` pattern will create a COND_EXPR with an 1bit signed
integer
    which breaks patterns like `a?~t:t`. This rejects when we have a signed
operand for
    both patterns.

    Note for GCC 15, I am going to look at the canonicalization of `a?~t:t`
where t
    was a constant since I think keeping it a COND_EXPR might be more canonical
and
    is what VPR produces from the same IR; if anything expand should handle
which one
    is better.

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

            PR tree-optimization/114666

    gcc/ChangeLog:

            * match.pd (`!a?b:c`): Reject signed types for the condition.
            (`a?~t:t`): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/execute/bitfld-signed1-1.c: New test.

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

Reply via email to