https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122153
--- Comment #3 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:14a825d4891f12ae0e2595b6b08a3555518f5dcb commit r16-4220-g14a825d4891f12ae0e2595b6b08a3555518f5dcb Author: Andrew Pinski <[email protected]> Date: Fri Oct 3 14:09:57 2025 -0700 phiopt: allow store placement of `= {}` [PR122153] Currently cselim and cselim-limited are able to handle stores which have a rhs of a ssa name or a constant. This extends that support to also allow `= {}`. The sink pass will also commonalize the store but in some cases this is too late in the pipeline. Doing it in phiopt1 allows for better inlining estimates too. This is also the first step in improving/fixing PR 122083 such that we do an early inlining which is now not happening for GCC 15+. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/122153 gcc/ChangeLog: * tree-ssa-phiopt.cc (cond_if_else_store_replacement_1): Handle stores of empty constructors too. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr122153-1.c: New test. Signed-off-by: Andrew Pinski <[email protected]>
