Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-21 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > The issue in the PR the change is fixing is that we end up with > an expression that overflows but uses signed arithmetic and so > we miscompile it later. IIRC the fixes to split_constant_offset > always were that the sum of the base + offset wasn't equal to > the origina

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-21 Thread Richard Biener via Gcc-patches
On Wed, 21 Jun 2023, Richard Biener wrote: > On Tue, 20 Jun 2023, Richard Sandiford wrote: > > > Richard Biener writes: > > > On Mon, 19 Jun 2023, Richard Sandiford wrote: > > > > > >> Jeff Law writes: > > >> > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: > > >> >> IVOPTs has strip_o

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-21 Thread Richard Biener via Gcc-patches
On Tue, 20 Jun 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Mon, 19 Jun 2023, Richard Sandiford wrote: > > > >> Jeff Law writes: > >> > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: > >> >> IVOPTs has strip_offset which suffers from the same issues regarding > >> >> i

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-20 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, 19 Jun 2023, Richard Sandiford wrote: > >> Jeff Law writes: >> > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: >> >> IVOPTs has strip_offset which suffers from the same issues regarding >> >> integer overflow that split_constant_offset did but the latter

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-20 Thread Richard Biener via Gcc-patches
On Mon, 19 Jun 2023, Richard Sandiford wrote: > Jeff Law writes: > > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: > >> IVOPTs has strip_offset which suffers from the same issues regarding > >> integer overflow that split_constant_offset did but the latter was > >> fixed quite some time

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-19 Thread Richard Sandiford via Gcc-patches
Jeff Law writes: > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: >> IVOPTs has strip_offset which suffers from the same issues regarding >> integer overflow that split_constant_offset did but the latter was >> fixed quite some time ago. The following implements strip_offset >> in terms

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: IVOPTs has strip_offset which suffers from the same issues regarding integer overflow that split_constant_offset did but the latter was fixed quite some time ago. The following implements strip_offset in terms of split_constant_offset, r

[PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-16 Thread Richard Biener via Gcc-patches
IVOPTs has strip_offset which suffers from the same issues regarding integer overflow that split_constant_offset did but the latter was fixed quite some time ago. The following implements strip_offset in terms of split_constant_offset, removing the redundant and incorrect implementation. The impl