Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 25, 2023 at 06:23:25PM -0500, Andrew MacLeod wrote: > > > --- a/gcc/gimple-range-fold.cc > > > +++ b/gcc/gimple-range-fold.cc > > > @@ -1039,6 +1039,9 @@ fold_using_range::relation_fold_and_or (irange& > > > lhs_range, gimple *s, > > >    if (!ssa1_dep1 || !ssa1_dep2 || !ssa2_dep1 || !

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-25 Thread Andrew MacLeod via Gcc-patches
On 1/25/23 17:35, Jakub Jelinek wrote: On Wed, Jan 25, 2023 at 11:12:11AM -0500, Andrew MacLeod via Gcc-patches wrote: In GCC13, I don't think there are any uses of the relation oracle outside of ranger and range-ops. So, given that, perhaps the simplest thing to do is bail on all this change

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 25, 2023 at 11:12:11AM -0500, Andrew MacLeod via Gcc-patches wrote: > In GCC13, I don't think there are any uses of the relation oracle outside of > ranger and range-ops. > > So, given that, perhaps the simplest thing to do is bail on all this change, > and instead simply do the follow

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-25 Thread Andrew MacLeod via Gcc-patches
On 1/25/23 09:48, Jakub Jelinek wrote: On Wed, Jan 25, 2023 at 09:30:44AM -0500, Andrew MacLeod wrote: But I'm afraid the above has VREL_OTHER for too many important cases, unlike intersect where it is for none unless VREL_OTHER is involved, or just a few ones for union. Im not sure it is qui

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 25, 2023 at 09:30:44AM -0500, Andrew MacLeod wrote: > > But I'm afraid the above has VREL_OTHER for too many important cases, > > unlike intersect where it is for none unless VREL_OTHER is involved, or just > > a few ones for union. > > Im not sure it is quite that bad.   Floating poin

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-25 Thread Andrew MacLeod via Gcc-patches
On 1/25/23 06:15, Jakub Jelinek wrote: On Tue, Jan 24, 2023 at 10:57:12AM -0500, Andrew MacLeod wrote: That is the way VREL_OTHER is implemented in the table. So the problem is not on the true side of the IF condition as in your example, its on the false side. We see this commonly in code lik

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 24, 2023 at 10:57:12AM -0500, Andrew MacLeod wrote: > That is the way VREL_OTHER is implemented in the table. > > So the problem is not on the true side of the IF condition as in your > example, its on the false side. We see this commonly in code like this > > > if (x <= y) // FA

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-24 Thread Andrew MacLeod via Gcc-patches
On 1/24/23 05:05, Jakub Jelinek wrote: On Mon, Jan 23, 2023 at 12:44:48PM -0500, Andrew MacLeod wrote: @@ -784,17 +794,28 @@ value_relation::negate () bool value_relation::intersect (const value_relation &p) { - // Save previous value - relation_kind old = related; + relation_kind k;

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Jan 23, 2023 at 12:44:48PM -0500, Andrew MacLeod wrote: > @@ -784,17 +794,28 @@ value_relation::negate () > bool > value_relation::intersect (const value_relation &p) > { > - // Save previous value > - relation_kind old = related; > + relation_kind k; > >if (p.op1 () == op1 () &

Re: [PATCH 2/2] Add VREL_OTHER for FP unsupported relations.

2023-01-24 Thread Richard Biener via Gcc-patches
On Mon, Jan 23, 2023 at 6:44 PM Andrew MacLeod wrote: > > This patch adds VREL_OTHER to represent another relation we do not > understand. It is used to represent the class fo relations arising from > floating point that are currently not represented. IN GCC 14 we will > determine exactly how to