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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Tamar Christina
<[email protected]>:

https://gcc.gnu.org/g:a6772e84ff2eaacdf8ac57a2bc7d5f199540ff70

commit r16-9978-ga6772e84ff2eaacdf8ac57a2bc7d5f199540ff70
Author: Tamar Christina <[email protected]>
Date:   Mon Oct 26 06:53:17 2026 +0000

    ifcvt: fix ifcvt SSA updates of PHI nodes in factor_out_operators
[PR128095]

    There is an existing latent bug in ifcvt where factor_out_operators updates
    a PHI node by bypassing the normal PHI update functions.  It then calls
    update_stmt but as far as I can tell, this is a NOP on PHI nodes.

    Because of this my reduction patch ICEs because it checks if the
accumulator
    is single use and with the SSA info wrong this check incorrectly passes.

    Fix it by using the proper way to update PHI nodes.

    gcc/ChangeLog:

            PR tree-optimization/128095
            * tree-if-conv.cc (factor_out_operators): Fix PHI update.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/128095
            * gcc.dg/vect/pr128095.c: New test.

    (cherry picked from commit 58e696376aecf8b895bb952a99988538cf366479)

Reply via email to