Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Richard Biener
On Tue, 10 Oct 2023, Jakub Jelinek wrote: > On Tue, Oct 10, 2023 at 11:59:28AM +, Richard Biener wrote: > > > I don't see why the CONSTRUCTOR case couldn't be fine regardless of the > > > vuse. Though, am not really sure when a CONSTRUCTOR would appear, the > > > lhs would need to be an SSA_N

Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 11:59:28AM +, Richard Biener wrote: > > I don't see why the CONSTRUCTOR case couldn't be fine regardless of the > > vuse. Though, am not really sure when a CONSTRUCTOR would appear, the > > lhs would need to be an SSA_NAME, so wouldn't for vectors that be a > > VECTOR_C

Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Richard Biener
On Tue, 10 Oct 2023, Jakub Jelinek wrote: > On Tue, Oct 10, 2023 at 10:49:04AM +, Richard Biener wrote: > > The following fixes a mistake in count_nonzero_bytes which happily > > skips over stores clobbering the memory we load a value we store > > from and then performs analysis on the memory

Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 10:49:04AM +, Richard Biener wrote: > The following fixes a mistake in count_nonzero_bytes which happily > skips over stores clobbering the memory we load a value we store > from and then performs analysis on the memory state before the > intermediate store. > > The pat

[PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Richard Biener
The following fixes a mistake in count_nonzero_bytes which happily skips over stores clobbering the memory we load a value we store from and then performs analysis on the memory state before the intermediate store. The patch implements the most simple fix - guarantee that there are no intervening