Re: [PATCH] tree-optimization/110434 - avoid ={v} {CLOBBER} from NRV

2023-06-28 Thread Jeff Law via Gcc-patches
On 6/28/23 04:21, Richard Biener via Gcc-patches wrote: When NRV replaces a local variable with it also replaces occurences in clobbers. This leads to being clobbered before the return of it which is strictly invalid but harmless in practice since there's no pass after NRV which would remov

Re: [PATCH] tree-optimization/110434 - avoid ={v} {CLOBBER} from NRV

2023-06-28 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 28, 2023 at 12:32:51PM +, Richard Biener wrote: > As said there's nothing run after NRV. There is expansion but in the case I strongly doubt we are trying to stack reuse it for other vars, so maybe it is ok. > > On the other side, could there be partial clobbers for the var -> ,

Re: [PATCH] tree-optimization/110434 - avoid ={v} {CLOBBER} from NRV

2023-06-28 Thread Richard Biener via Gcc-patches
On Wed, 28 Jun 2023, Jakub Jelinek wrote: > On Wed, Jun 28, 2023 at 10:21:45AM +, Richard Biener via Gcc-patches > wrote: > > When NRV replaces a local variable with it also replaces > > occurences in clobbers. This leads to being clobbered > > before the return of it which is strictly inv

Re: [PATCH] tree-optimization/110434 - avoid ={v} {CLOBBER} from NRV

2023-06-28 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 28, 2023 at 10:21:45AM +, Richard Biener via Gcc-patches wrote: > When NRV replaces a local variable with it also replaces > occurences in clobbers. This leads to being clobbered > before the return of it which is strictly invalid but harmless in > practice since there's no pass

[PATCH] tree-optimization/110434 - avoid ={v} {CLOBBER} from NRV

2023-06-28 Thread Richard Biener via Gcc-patches
When NRV replaces a local variable with it also replaces occurences in clobbers. This leads to being clobbered before the return of it which is strictly invalid but harmless in practice since there's no pass after NRV which would remove earlier stores. The following fixes this nevertheless. Bo