On 4/17/25 9:12 PM, Andrew Pinski wrote:
DSE has support for trimming memset (and memset like) statements.
In this case we have `MEM <unsigned char[17]> [(char * {ref-all})&z] = {};` in
the IR and when we go to trim it, we call build_fold_addr_expr which leaves 
around

        PR tree-optimization/87901

gcc/ChangeLog:

        * tree-ssa-dse.cc (maybe_trim_constructor_store): Strip over useless 
type
        conversions after taking the address of the MEM_REF.

gcc/testsuite/ChangeLog:

        * gcc.dg/tree-ssa/ssa-dse-52.c: New test.
OK
jeff

Reply via email to