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

--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>:

https://gcc.gnu.org/g:355475e332f264107ef07555f7c379be7b85942f

commit r15-6551-g355475e332f264107ef07555f7c379be7b85942f
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Fri Jan 3 18:12:07 2025 +0000

    rtlanal: Treat writes to sp as also writing to memory [PR117938]

    This PR was about a case in which late-combine moved a stack
    deallocation across an earlier stack access.  This was possible
    because the deallocation was missing the RTL-SSA equivalent of
    a vop, which in turn was because rtl_properties didn't treat
    the deallocation as writing to memory.  I think the bug was
    ultimately there.

    gcc/
            PR rtl-optimization/117938
            * rtlanal.cc (rtx_properties::try_to_add_dest): Treat writes
            to the stack pointer as also writing to memory.

    gcc/testsuite/
            PR rtl-optimization/117938
            * gcc.dg/torture/pr117938.c: New test.

Reply via email to