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

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

https://gcc.gnu.org/g:92044aadb3037c59ea124c0b23f8437c9e48b2fd

commit r16-6882-g92044aadb3037c59ea124c0b23f8437c9e48b2fd
Author: Andrew Pinski <[email protected]>
Date:   Sat Jan 17 12:55:04 2026 -0800

    phiopt: Rewrite cond_removal_in_builtin_zero_pattern canonicalization args
code [PR123645]

    The canonicalization of args code was originally thinking edges e1/e2
    were edges out going from the cond block but they were the edges
    coming into the join block. This rewrites the canonicalization of arg0/1
    args to correct that mistake. And it fixes the wrong code that would
    happen in this case.

            PR tree-optimization/123645

    gcc/ChangeLog:

            * tree-ssa-phiopt.cc (cond_removal_in_builtin_zero_pattern):
Rewrite
            the canonicalization of the args code based on e1/e2 being edges
into
            the join block.

    gcc/testsuite/ChangeLog:

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

    Signed-off-by: Andrew Pinski <[email protected]>

Reply via email to