Re: [PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-25 Thread Richard Biener via Gcc-patches
On Thu, May 25, 2023 at 3:25 PM Alexandre Oliva wrote: > > On May 25, 2023, Richard Biener wrote: > > > On Thu, May 25, 2023 at 1:10 PM Alexandre Oliva wrote: > >> > >> On May 25, 2023, Richard Biener wrote: > >> > >> > I mean we could do what RTL expansion would do later and do > >> >

Re: [PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-25 Thread Alexandre Oliva via Gcc-patches
On May 25, 2023, Richard Biener wrote: > On Thu, May 25, 2023 at 1:10 PM Alexandre Oliva wrote: >> >> On May 25, 2023, Richard Biener wrote: >> >> > I mean we could do what RTL expansion would do later and do >> > by-pieces, thus emit multiple loads/stores but not n loads and then >> > n

Re: [PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-25 Thread Richard Biener via Gcc-patches
On Thu, May 25, 2023 at 1:10 PM Alexandre Oliva wrote: > > On May 25, 2023, Richard Biener wrote: > > > I mean we could do what RTL expansion would do later and do > > by-pieces, thus emit multiple loads/stores but not n loads and then > > n stores but interleaved. > > That wouldn't help e.g.

Re: [PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-25 Thread Alexandre Oliva via Gcc-patches
On May 25, 2023, Richard Biener wrote: > I mean we could do what RTL expansion would do later and do > by-pieces, thus emit multiple loads/stores but not n loads and then > n stores but interleaved. That wouldn't help e.g. gcc.dg/memcpy-6.c's fold_move_8, because MOVE_MAX and MOVE_MAX_PIECES

Re: [PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-25 Thread Richard Biener via Gcc-patches
On Thu, May 25, 2023 at 12:01 PM Alexandre Oliva wrote: > > --text follows this line-- > On May 24, 2023, Richard Biener wrote: > > > gimple_fold_builtin_memory_op tries to expand the call to a single > > load plus a single store so we can handle overlaps by first loading > > everything to

Re: [PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-25 Thread Alexandre Oliva via Gcc-patches
--text follows this line-- On May 24, 2023, Richard Biener wrote: > gimple_fold_builtin_memory_op tries to expand the call to a single > load plus a single store so we can handle overlaps by first loading > everything to registers and then storing: *nod*, that's why I figured we could afford to

Re: [PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-24 Thread Richard Biener via Gcc-patches
On Wed, May 24, 2023 at 7:47 AM Alexandre Oliva via Gcc-patches wrote: > > > MOVE_MAX on x86* used to accept up to 16 bytes, even without SSE, > which enabled inlining of small memmove by loading and then storing > the entire range. After the "x86: Update piecewise move and store" > r12-2666

[PATCH] [x86] reenable dword MOVE_MAX for better memmove inlining

2023-05-23 Thread Alexandre Oliva via Gcc-patches
MOVE_MAX on x86* used to accept up to 16 bytes, even without SSE, which enabled inlining of small memmove by loading and then storing the entire range. After the "x86: Update piecewise move and store" r12-2666 change, memmove of more than 4 bytes would not be inlined in