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

--- Comment #2 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:94ce59ad335ac372afb4521e880add4cf8fc0607

commit r16-4444-g94ce59ad335ac372afb4521e880add4cf8fc0607
Author: Andrew Pinski <[email protected]>
Date:   Tue Oct 14 09:13:51 2025 -0700

    dce: Remove __builtin_stack_save during dce [PR122037]

    __builtin_stack_save can be removed when the lhs becomes unused
    as it is just recording the current StackPointer into another register.

    Bootstrapped and tested on x86_64-linux-gnu.

            PR tree-optimization/122037

    gcc/ChangeLog:

            * tree-ssa-dce.cc (eliminate_unnecessary_stmts): Remove
            __builtin_stack_save when the lhs is unused.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/vla-1.c: New test.

    Signed-off-by: Andrew Pinski <[email protected]>
  • [Bug tree-optimization/122037] ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to