]>
git.ipfire.org Git - thirdparty/gcc.git/commit
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 <andrew.pinski@oss.qualcomm.com>