Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-05-03 Thread Dominique d'Humières
Done as revision r270843. Dominique > Le 3 mai 2019 à 11:06, Martin Liška a écrit : > > Feel free to install the patch please. > > Martin

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-05-03 Thread Martin Liška
On 5/3/19 11:04 AM, Dominique d'Humières wrote: > Hi Martin > > On Tue, Apr 30, 2019 at 10:00:07AM -0600, Jeff Law wrote: >>> 2019-04-23 Martin Liska >>> >>> PR target/88809 >>> * config/i386/i386.c (ix86_expand_strlen): Use strlen call. >>> With -minline-all-stringops use inline

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-05-03 Thread Dominique d'Humières
Hi Martin On Tue, Apr 30, 2019 at 10:00:07AM -0600, Jeff Law wrote: > > 2019-04-23 Martin Liska > > > > PR target/88809 > > * config/i386/i386.c (ix86_expand_strlen): Use strlen call. > > With -minline-all-stringops use inline expansion using 4B loop. > > * doc/invoke.texi:

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-05-03 Thread Martin Liška
On 5/2/19 11:36 PM, Jakub Jelinek wrote: > On Tue, Apr 30, 2019 at 10:00:07AM -0600, Jeff Law wrote: >>> 2019-04-23 Martin Liska >>> >>> PR target/88809 >>> * config/i386/i386.c (ix86_expand_strlen): Use strlen call. >>> With -minline-all-stringops use inline expansion using 4B

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-05-02 Thread Jakub Jelinek
On Tue, Apr 30, 2019 at 10:00:07AM -0600, Jeff Law wrote: > > 2019-04-23 Martin Liska > > > > PR target/88809 > > * config/i386/i386.c (ix86_expand_strlen): Use strlen call. > > With -minline-all-stringops use inline expansion using 4B loop. > > * doc/invoke.texi: Document the

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-04-30 Thread Jeff Law
On 4/29/19 4:47 AM, Martin Liška wrote: > On 4/26/19 11:05 AM, Martin Liška wrote: >> Then I'm very open to adjust that even for -Os to 'call strlen'. > That said, I'm suggesting following updated patch. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Thanks, >

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-04-29 Thread Martin Liška
On 4/26/19 11:05 AM, Martin Liška wrote: > Then I'm very open to adjust that even for -Os to 'call strlen'. That said, I'm suggesting following updated patch. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Thanks, Martin >From 435de2e8b88b2d9898901f2343e03102da367982 Mon

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-04-26 Thread Martin Liška
On 4/26/19 10:43 AM, Alexander Monakov wrote: > On Fri, 26 Apr 2019, Martin Liška wrote: > >> I'm suggesting to adjust that to: >> - -Os will keep using rep-scasb as -Os means optimize for size >> no matter what speed impact is > > I'm not sure it's a good choice, the inline sequence is > >

Re: [PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-04-26 Thread Alexander Monakov
On Fri, 26 Apr 2019, Martin Liška wrote: > I'm suggesting to adjust that to: > - -Os will keep using rep-scasb as -Os means optimize for size > no matter what speed impact is I'm not sure it's a good choice, the inline sequence is xorl%eax, %eax orq $-1, %rcx

[PATCH][stage1] Prefer to use strlen call instead of inline expansion (PR target/88809).

2019-04-26 Thread Martin Liška
Hi. As mentioned in the PR, strlen expansion leading to rep-scasb leads to a slow code. The expansion happens for -Os and -O1, with -O2 we expand into 4B loop if pointer alignment is known to be at least 4. When using -minline-all-stringops and -O2, the 4B loop happens also for an unknown