On 4/17/25 9:12 PM, Andrew Pinski wrote:
This is the second part of the PR which comes from transformation
of memset into either stores of 0 (via an integral type) or stores
of {}. We already handle stores of `{}`, this just extends that to
handle of the constant 0 and treat it similarly.

        PR tree-optimization/87901

gcc/ChangeLog:

        * tree-ssa-dse.cc (maybe_trim_constructor_store): Add was_integer_cst 
argument.
        Check for was_integer_cst instead of `{}` when was_integer_cst is true.
        (maybe_trim_partially_dead_store): Handle INTEGER_CST stores of 0 as 
stores of `{}`.

gcc/testsuite/ChangeLog:

        * gcc.dg/tree-ssa/ssa-dse-53.c: New test.
        * gcc.dg/tree-ssa/ssa-dse-54.c: New test.
So maybe_trim_constructor_store has a single call site, which you adjusted. So I think the default argument value is superfluous.

OK with the default value removed.

jeff

Reply via email to