Re: [PATCH 3/3] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-03-23 Thread Richard Biener via Gcc-patches
On Tue, Mar 23, 2021 at 3:41 AM Hongyu Wang wrote: > > > Hongyue, please collect code size differences on SPEC CPU 2017 and > > eembc. > > Here is code size difference for this patch Thanks, nothing too bad although slightly larger impacts than envisioned. > SPEC CPU 2017 >

Re: [PATCH 3/3] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-03-22 Thread Hongyu Wang via Gcc-patches
> Hongyue, please collect code size differences on SPEC CPU 2017 and > eembc. Here is code size difference for this patch SPEC CPU 2017 difference w patch w/o patch 500.perlbench_r 0.051% 1622637 1621805 502.gcc

Re: [PATCH 3/3] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-03-22 Thread H.J. Lu via Gcc-patches
On Mon, Mar 22, 2021 at 6:29 AM Richard Biener wrote: > > On Mon, Mar 22, 2021 at 2:19 PM H.J. Lu via Gcc-patches > wrote: > > > > Simply memcpy and memset inline strategies to avoid branches for > > -mtune=generic: > > > > 1. With MOVE_RATIO and CLEAR_RATIO == 17, GCC will use integer/vector > >

Re: [PATCH 3/3] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-03-22 Thread Richard Biener via Gcc-patches
On Mon, Mar 22, 2021 at 2:19 PM H.J. Lu via Gcc-patches wrote: > > Simply memcpy and memset inline strategies to avoid branches for > -mtune=generic: > > 1. With MOVE_RATIO and CLEAR_RATIO == 17, GCC will use integer/vector >load and store for up to 16 * 16 (256) bytes when the data size is >

[PATCH 3/3] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-03-22 Thread H.J. Lu via Gcc-patches
Simply memcpy and memset inline strategies to avoid branches for -mtune=generic: 1. With MOVE_RATIO and CLEAR_RATIO == 17, GCC will use integer/vector load and store for up to 16 * 16 (256) bytes when the data size is fixed and known. 2. Inline only if data size is known to be <= 256. a.