Re: [PATCH] Fix PR82991

2017-11-23 Thread Jakub Jelinek
On Thu, Nov 23, 2017 at 12:37:31PM +0100, Richard Biener wrote: > Hum. But that pessimizes a _lot_ of early folding. Like we'd no > longer optimize > > r = &a.a[4]; > r = r + 1; > if (r != &a.a[0]) > > and similar stuff exposed a lot by C++ abstraction. We really only > want to avoid eli

Re: [PATCH] Fix PR82991

2017-11-23 Thread Richard Biener
On Thu, 23 Nov 2017, Jakub Jelinek wrote: > On Thu, Nov 23, 2017 at 11:30:22AM +0100, Richard Biener wrote: > > FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution, -O2 > > ... > > FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution, -O2 > > ... > > FAIL: gcc.c-torture/execute

Re: [PATCH] Fix PR82991

2017-11-23 Thread Jakub Jelinek
On Thu, Nov 23, 2017 at 11:30:22AM +0100, Richard Biener wrote: > FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution, -O2 > ... > FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution, -O2 > ... > FAIL: gcc.c-torture/execute/builtins/strncat-chk.c execution, -O2 > ... > FAIL:

Re: [PATCH] Fix PR82991

2017-11-23 Thread Richard Biener
On Wed, 22 Nov 2017, Richard Biener wrote: > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > > > On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote: > > > > > > I am testing the following (old) patch to value number call lhs > > > according to the ERF_RETURNS_ARG annotation. This allows

Re: [PATCH] Fix PR82991

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote: > > > > I am testing the following (old) patch to value number call lhs > > according to the ERF_RETURNS_ARG annotation. This allows for > > more expression simplification and also changes

Re: [PATCH] Fix PR82991

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote: > > I am testing the following (old) patch to value number call lhs > according to the ERF_RETURNS_ARG annotation. This allows for > more expression simplification and also changes downstream > users of the argument to use the return

[PATCH] Fix PR82991

2017-11-22 Thread Richard Biener
I am testing the following (old) patch to value number call lhs according to the ERF_RETURNS_ARG annotation. This allows for more expression simplification and also changes downstream users of the argument to use the return value which should help register allocation and register lifetime in gene