On Thu, Apr 17, 2025 at 8:30 PM Sam James <s...@gentoo.org> wrote: > > Andrew Pinski <quic_apin...@quicinc.com> writes: > > > 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 > > This looks cut off?
Yes it is. I got distracted while writing the commit message and I forgot I didn't finish it. Anyways here it is fully (not going to resend the patch since it is only the commit message that changes): 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 a cast from one pointer type to another. This is due to build_fold_addr_expr being generic but in gimple you don't need these casts. Thanks, Andrew