Re: [EXTERNAL] Re: [PATCH][tree-optimization]Optimize combination of comparisons to dec+compare

2021-01-20 Thread Richard Biener via Gcc-patches
1 > > and the corresponding tests. > > > > The new patch is attached. > > OK. > > Thanks, > Richard. > > > Eugene > > > > -----Original Message----- > > From: Richard Biener > > Sent: Tuesday, January 5, 2021 4:21 AM > >

RE: [EXTERNAL] Re: [PATCH][tree-optimization]Optimize combination of comparisons to dec+compare

2021-01-19 Thread Eugene Rozenfeld via Gcc-patches
enfeld Cc: gabrav...@gmail.com; ja...@gcc.gnu.org; gcc-patches@gcc.gnu.org Subject: Re: [EXTERNAL] Re: [PATCH][tree-optimization]Optimize combination of comparisons to dec+compare On Thu, Jan 14, 2021 at 10:04 PM Eugene Rozenfeld wrote: > > I got more feedback for the patch from Gabriel

Re: [EXTERNAL] Re: [PATCH][tree-optimization]Optimize combination of comparisons to dec+compare

2021-01-15 Thread Richard Biener via Gcc-patches
Eugene Rozenfeld > > Sent: Tuesday, December 22, 2020 3:01 PM > > To: Richard Biener ; > > gcc-patches@gcc.gnu.org > > Subject: RE: Optimize combination of comparisons to dec+compare > > > > Re-sending my question and re-attaching the patch. > > > > Rich

RE: [EXTERNAL] Re: [PATCH][tree-optimization]Optimize combination of comparisons to dec+compare

2021-01-14 Thread Eugene Rozenfeld via Gcc-patches
-Original Message- From: Richard Biener Sent: Tuesday, January 5, 2021 4:21 AM To: Eugene Rozenfeld Cc: gcc-patches@gcc.gnu.org Subject: [EXTERNAL] Re: [PATCH][tree-optimization]Optimize combination of comparisons to dec+compare On Mon, Jan 4, 2021 at 9:50 PM Eugene Rozenfeld wrote: > >

Re: [PATCH][tree-optimization]Optimize combination of comparisons to dec+compare

2021-01-05 Thread Richard Biener via Gcc-patches
On Mon, Jan 4, 2021 at 9:50 PM Eugene Rozenfeld wrote: > > Ping. > > -Original Message- > From: Eugene Rozenfeld > Sent: Tuesday, December 22, 2020 3:01 PM > To: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: RE: Optimize combination of comparisons to dec+c

[PATCH][tree-optimization]Optimize combination of comparisons to dec+compare

2021-01-04 Thread Eugene Rozenfeld via Gcc-patches
Ping. -Original Message- From: Eugene Rozenfeld Sent: Tuesday, December 22, 2020 3:01 PM To: Richard Biener ; gcc-patches@gcc.gnu.org Subject: RE: Optimize combination of comparisons to dec+compare Re-sending my question and re-attaching the patch. Richard, can you please clarify your

RE: Optimize combination of comparisons to dec+compare

2020-12-22 Thread Eugene Rozenfeld via Gcc-patches
Subject: [EXTERNAL] Re: Optimize combination of comparisons to dec+compare Richard, > Do we already handle x < y || x <= CST to x <= y - CST? That is an invalid transformation: e.g., consider x=3, y=4, CST=2. Can you please clarify? Thanks, Eugene -Original Message- F

Re: Optimize combination of comparisons to dec+compare

2020-12-15 Thread Eugene Rozenfeld via Gcc-patches
ozenfeld Cc: gcc-patches@gcc.gnu.org Subject: Re: Optimize combination of comparisons to dec+compare On Thu, Dec 10, 2020 at 1:52 AM Eugene Rozenfeld via Gcc-patches wrote: > > This patch adds a pattern for optimizing x < y || x == XXX_MIN to x <= > y-1 if y is an integer with

Re: Optimize combination of comparisons to dec+compare

2020-12-10 Thread Richard Biener via Gcc-patches
On Thu, Dec 10, 2020 at 1:52 AM Eugene Rozenfeld via Gcc-patches wrote: > > This patch adds a pattern for optimizing > x < y || x == XXX_MIN to x <= y-1 > if y is an integer with TYPE_OVERFLOW_WRAPS. Do we already handle x < y || x <= CST to x <= y - CST? That is, the XXX_MIN case is just a speci

Optimize combination of comparisons to dec+compare

2020-12-09 Thread Eugene Rozenfeld via Gcc-patches
This patch adds a pattern for optimizing x < y || x == XXX_MIN to x <= y-1 if y is an integer with TYPE_OVERFLOW_WRAPS. This fixes pr96674. Tested on x86_64-pc-linux-gnu. For this function bool f(unsigned a, unsigned b) { return (b == 0) | (a < b); } the code without the patch is test