Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-13 Thread Richard Biener via Gcc-patches
> Am 13.04.2023 um 17:49 schrieb Andrew MacLeod : > >  >> On 4/13/23 09:56, Richard Biener wrote: >>> On Wed, Apr 12, 2023 at 10:55 PM Andrew MacLeod wrote: >>> >>> On 4/12/23 07:01, Richard Biener wrote: On Wed, Apr 12, 2023 at 12:59 PM Jakub Jelinek wrote: > Would be nice. >

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-13 Thread Richard Biener via Gcc-patches
> Am 13.04.2023 um 17:49 schrieb Andrew MacLeod : > >  >> On 4/13/23 09:56, Richard Biener wrote: >>> On Wed, Apr 12, 2023 at 10:55 PM Andrew MacLeod wrote: >>> >>> On 4/12/23 07:01, Richard Biener wrote: On Wed, Apr 12, 2023 at 12:59 PM Jakub Jelinek wrote: > Would be nice. >

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-13 Thread Andrew MacLeod via Gcc-patches
On 4/13/23 09:56, Richard Biener wrote: On Wed, Apr 12, 2023 at 10:55 PM Andrew MacLeod wrote: On 4/12/23 07:01, Richard Biener wrote: On Wed, Apr 12, 2023 at 12:59 PM Jakub Jelinek wrote: Would be nice. Though, I'm afraid it still wouldn't fix the PR101912 testcase, because it has

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-13 Thread Richard Biener via Gcc-patches
On Wed, Apr 12, 2023 at 10:55 PM Andrew MacLeod wrote: > > > On 4/12/23 07:01, Richard Biener wrote: > > On Wed, Apr 12, 2023 at 12:59 PM Jakub Jelinek wrote: > >> > >> Would be nice. > >> > >> Though, I'm afraid it still wouldn't fix the PR101912 testcase, because > >> it has exactly what

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-12 Thread Andrew MacLeod via Gcc-patches
On 4/12/23 07:01, Richard Biener wrote: On Wed, Apr 12, 2023 at 12:59 PM Jakub Jelinek wrote: Would be nice. Though, I'm afraid it still wouldn't fix the PR101912 testcase, because it has exactly what happens in this PR, undefined phi arg from the pre-header and uses of the previous

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-12 Thread Andrew MacLeod via Gcc-patches
On 4/12/23 04:20, Jakub Jelinek wrote: On Tue, Apr 11, 2023 at 07:52:29PM -0400, Andrew MacLeod wrote: This bootstraps on x86_64-pc-linux-gnu  with that single regression, which I have XFAILed for now.  OK for trunk? Yes.    Once Jakub verifies it actually fixes the execution problem.  

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-12 Thread Richard Biener via Gcc-patches
On Wed, Apr 12, 2023 at 12:59 PM Jakub Jelinek wrote: > > On Wed, Apr 12, 2023 at 11:12:17AM +0200, Richard Biener wrote: > > > 108139 fixed this by not evaluating any equivalences if the equivalence > > > was the LHS. > > > > > > What it missed, was it possible we are calculating the range of

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-12 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 12, 2023 at 11:12:17AM +0200, Richard Biener wrote: > > 108139 fixed this by not evaluating any equivalences if the equivalence > > was the LHS. > > > > What it missed, was it possible we are calculating the range of a_3. > > b_2 is not defined in a phi node, so it happily used the

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-12 Thread Richard Biener via Gcc-patches
On Wed, Apr 12, 2023 at 1:52 AM Andrew MacLeod wrote: > > This is a carry over from PR 108139. > > When we have a PHI node which has 2 arguments and one is undefined, we > create an equivalence between the LHS and the non-undefined PHI > argument. THis allows us to perform certain optimizations.

Re: [PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-12 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 11, 2023 at 07:52:29PM -0400, Andrew MacLeod wrote: > This bootstraps on x86_64-pc-linux-gnu  with that single regression, which I > have XFAILed for now.  OK for trunk? Yes. >   Once Jakub verifies it actually fixes > the execution problem.   we have no executable test . yet. I

[PATCH] PR tree-optimization/109462 - Don't use ANY PHI equivalences in range-on-entry.

2023-04-11 Thread Andrew MacLeod via Gcc-patches
This is a carry over from PR 108139. When we have a PHI node which has 2 arguments and one is undefined, we create an equivalence between the LHS and the non-undefined PHI argument.  THis allows us to perform certain optimizations. The problem is, when we are evaluating range-on-entry in the