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

--- Comment #5 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:c7a7934c60c7e0112352c20efe4677a34a5b0cb6

commit r17-6471-gc7a7934c60c7e0112352c20efe4677a34a5b0cb6
Author: Tamar Christina <[email protected]>
Date:   Thu Nov 19 15:56:07 2026 +0000

    ifcvt: Fix single use checks in factor_out_operators [PR128095]

    When backporting the fix of updating PHI arguments with SET_PHI_ARG_DEF
    in PR128095 test gcc.dg/vect/vect-reduc-cond-2.c started failing on the
    branch.

    It didn't fail on master because commit r17-1507-gc43fed44d9a changed
    the tests and so hid the problem.

    The code in factor_out_operators dealt with the broken SSA by having
    this variable "repeated" which first time around checked for
    has_single_use because SSA was up to date.  Then when it did the
    rewrite for subsequent passes checked has_zero_uses because the SSA
    wasn't single use anymore.

    But as far as I can tell, the optimization was always intended to
    only work on single use PHIs and the "repeated" thing was just a
    hack around the broken SSA.

    This removes the hack and the test now passes.

    gcc/ChangeLog:

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

Reply via email to