Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-12-06 Thread Marc Glisse
On Tue, 1 Dec 2020, Eugene Rozenfeld via Gcc-patches wrote: Thank you for the review Jeff. I don't need to look at the opcode to know the result. The pattern will be matched only in these 4 cases: X <= MAX(X, Y) -> true X > MAX(X, Y) -> false X >= MIN(X, Y) -> true X < MIN(X, Y) -> false So,

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/30/20 7:00 PM, Eugene Rozenfeld wrote: > Thank you for the review Jeff. > > I don't need to look at the opcode to know the result. The pattern will be > matched only in these 4 cases: > > X <= MAX(X, Y) -> true > X > MAX(X, Y) -> false > X >= MIN(X, Y) -> true > X < MIN(X, Y) -> false > >

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/30/20 7:00 PM, Eugene Rozenfeld wrote: > Thank you for the review Jeff. > > I don't need to look at the opcode to know the result. The pattern will be > matched only in these 4 cases: > > X <= MAX(X, Y) -> true > X > MAX(X, Y) -> false > X >= MIN(X, Y) -> true > X < MIN(X, Y) -> false > >

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-11-30 Thread Eugene Rozenfeld via Gcc-patches
rg Subject: Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison On 11/25/20 3:04 PM, Eugene Rozenfeld via Gcc-patches wrote: > Make the following simplifications: > X <= MAX(X, Y) -> true > X > MAX(X, Y) -> false > X >= MIN(X, Y) -> tr

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-11-30 Thread Jeff Law via Gcc-patches
On 11/25/20 3:04 PM, Eugene Rozenfeld via Gcc-patches wrote: > Make the following simplifications: > X <= MAX(X, Y) -> true > X > MAX(X, Y) -> false > X >= MIN(X, Y) -> true > X < MIN(X, Y) -> false > > This fixes PR96708. > > Tested on x86_64-pc-linux-gnu. > > bool f(i