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

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

https://gcc.gnu.org/g:58e696376aecf8b895bb952a99988538cf366479

commit r17-5568-g58e696376aecf8b895bb952a99988538cf366479
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.

Reply via email to