Re: [PATCH] Avoid optimizing memory references with side effects in compare-elim.c

2018-06-07 Thread Paul Koning
> On Jun 7, 2018, at 11:37 AM, Eric Botcazou wrote: > >> Here is a corrected version. Ok with this change? >> >> paul >> >> gcc/ChangeLog: >> >> 2018-06-06 Paul Koning >> >> * compare-elim.c (try_merge_compare): Don't merge compare if >> address contains a side effect. >

Re: [PATCH] Avoid optimizing memory references with side effects in compare-elim.c

2018-06-07 Thread Eric Botcazou
> Here is a corrected version. Ok with this change? > > paul > > gcc/ChangeLog: > > 2018-06-06 Paul Koning > > * compare-elim.c (try_merge_compare): Don't merge compare if > address contains a side effect. > (try_eliminate_compare): Likewise. > * gcc.c-torture/

Re: [PATCH] Avoid optimizing memory references with side effects in compare-elim.c

2018-06-06 Thread Peter Bergner
On 6/6/18 1:23 PM, Paul Koning wrote: >> On Jun 6, 2018, at 11:53 AM, Eric Botcazou wrote: >> I would suggest using "diff -up" to generate patches with more context. > > Yes, sorry. I normally use the subversion internal diff which doesn't do > this. If you edit ~/.subversion/config and use th

Re: [PATCH] Avoid optimizing memory references with side effects in compare-elim.c

2018-06-06 Thread Paul Koning
> On Jun 6, 2018, at 11:53 AM, Eric Botcazou wrote: > >> That simplifies the patch, which now looks like this. Ok for trunk? >> >> paul >> >> gcc/ChangeLog: >> >> 2018-06-05 Paul Koning >> >> * compare-elim.c (try_merge_compare): Don't merge compare if >> address contain

Re: [PATCH] Avoid optimizing memory references with side effects in compare-elim.c

2018-06-06 Thread Eric Botcazou
> That simplifies the patch, which now looks like this. Ok for trunk? > > paul > > gcc/ChangeLog: > > 2018-06-05 Paul Koning > > * compare-elim.c (try_merge_compare): Don't merge compare if > address contains a side effect. > * gcc.c-torture/compile/20180605-1.c: New

Re: [PATCH] Avoid optimizing memory references with side effects in compare-elim.c

2018-06-05 Thread Paul Koning
> On Jun 5, 2018, at 3:54 PM, Richard Sandiford > wrote: > > Paul Koning writes: >> This fixes an ICE if post-reload compare elimination is done and the >> target supports post_inc and similar modes, as pdp11 does. The ICE is >> caused by a generated PARALLEL that has the side effect twice,

Re: [PATCH] Avoid optimizing memory references with side effects in compare-elim.c

2018-06-05 Thread Richard Sandiford
Paul Koning writes: > This fixes an ICE if post-reload compare elimination is done and the > target supports post_inc and similar modes, as pdp11 does. The ICE is > caused by a generated PARALLEL that has the side effect twice, which > is not legal. > > (Ideally it would generate a similar RTL su