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 <andrew.pinski@oss.qualcomm.com>