> On Jan 13, 2023, at 8:54 PM, Alexandre Oliva via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>
> Hello, Richard,
>
> Thank you for the feedback.
>
> On Jan 12, 2023, Richard Biener <richard.guent...@gmail.com> wrote:
>
>> On Tue, Dec 27, 2022 at 5:12 AM Alexandre Oliva via Gcc-patches
>> <gcc-patches@gcc.gnu.org> wrote:
>
>>> This patch extends the memset expansion to start with a loop, so as to
>>> still take advantage of known alignment even with long lengths, but
>>> without necessarily adding store blocks for every power of two.
>
>> I wonder if that isn't better handled by targets via the setmem pattern,
>
> That was indeed where I started, but then I found myself duplicating the
> logic in try_store_by_multiple_pieces on a per-target basis.
>
> Target-specific code is great for tight optimizations, but the main
> purpose of this feature is not an optimization. AFAICT it actually
> slows things down in general (due to code growth, and to conservative
> assumptions about alignment),
I thought machinery like the memcpy patterns have as one of their benefits the
ability to find the alignment of their operands and from that optimize things.
So I don't understand why you'd say "conservative".
paul