Re: [PATCH] AArch64: Cleanup memset expansion

2023-11-10 Thread Richard Earnshaw
On 10/11/2023 14:46, Kyrylo Tkachov wrote: -Original Message- From: Richard Earnshaw Sent: Friday, November 10, 2023 11:31 AM To: Wilco Dijkstra ; Kyrylo Tkachov ; GCC Patches Cc: Richard Sandiford ; Richard Earnshaw Subject: Re: [PATCH] AArch64: Cleanup memset expansion On

RE: [PATCH] AArch64: Cleanup memset expansion

2023-11-10 Thread Kyrylo Tkachov
> -Original Message- > From: Richard Earnshaw > Sent: Friday, November 10, 2023 11:31 AM > To: Wilco Dijkstra ; Kyrylo Tkachov > ; GCC Patches > Cc: Richard Sandiford ; Richard Earnshaw > > Subject: Re: [PATCH] AArch64: Cleanup memset expansion > > &

Re: [PATCH] AArch64: Cleanup memset expansion

2023-11-10 Thread Richard Earnshaw
On 10/11/2023 10:17, Wilco Dijkstra wrote: Hi Kyrill, +  /* Reduce the maximum size with -Os.  */ +  if (optimize_function_for_size_p (cfun)) +    max_set_size = 96; + This is a new "magic" number in this code. It looks sensible, but how did you arrive at it? We need 1 instruction

Re: [PATCH] AArch64: Cleanup memset expansion

2023-11-10 Thread Wilco Dijkstra
Hi Kyrill, > +  /* Reduce the maximum size with -Os.  */ > +  if (optimize_function_for_size_p (cfun)) > +    max_set_size = 96; > + > This is a new "magic" number in this code. It looks sensible, but how > did you arrive at it? We need 1 instruction to create the value to store (DUP or MO

RE: [PATCH] AArch64: Cleanup memset expansion

2023-11-10 Thread Kyrylo Tkachov
Hi Wilco, > -Original Message- > From: Wilco Dijkstra > Sent: Monday, November 6, 2023 12:12 PM > To: GCC Patches > Cc: Richard Sandiford ; Richard Earnshaw > > Subject: Re: [PATCH] AArch64: Cleanup memset expansion > > ping > > Cleanup memset i

Re: [PATCH] AArch64: Cleanup memset expansion

2023-11-06 Thread Wilco Dijkstra
ping   Cleanup memset implementation.  Similar to memcpy/memmove, use an offset and bytes throughout.  Simplify the complex calculations when optimizing for size by using a fixed limit. Passes regress/bootstrap, OK for commit?     gcc/ChangeLog:     * config/aarch64/aarch64.cc (aarch64_progre

[PATCH] AArch64: Cleanup memset expansion

2023-10-19 Thread Wilco Dijkstra
Cleanup memset implementation. Similar to memcpy/memmove, use an offset and bytes throughout. Simplify the complex calculations when optimizing for size by using a fixed limit. Passes regress/bootstrap, OK for commit? gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_progress_poin