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

--- Comment #4 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:faafcc163b261d640aad43dacc645fbc43db757c

commit r17-2027-gfaafcc163b261d640aad43dacc645fbc43db757c
Author: Andrew Pinski <[email protected]>
Date:   Mon Jun 29 17:06:46 2026 -0700

    phiopt: use remove_phi_node instead of gsi_remove for phi node [PR125961]

    While working on some other code I noticed that we call gsi_remove
    for the phi node but then don't release the phi node so it takes until
    the next gc to free it. This changes the 2 places in phiopt to use
    remove_phi_node instead of gsi_remove so that the phi node can be reused
    instead. Note we need to pass false here since we use the result
    of the phi still.

    Bootstrapped and tested on x86_64-linux-gnu.

            PR tree-optimization/125961
    gcc/ChangeLog:

            * tree-ssa-phiopt.cc (factor_out_conditional_operation): Use
            remove_phi_node instead of gsi_remove for the phi node.
            (factor_out_conditional_load): Likewise.

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

Reply via email to