Re: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-07-01 Thread Jeff Law via Gcc-patches
On Mon, 2020-06-15 at 09:32 +0200, Richard Biener via Gcc-patches wrote: > On Thu, Jun 4, 2020 at 5:09 PM Naveen Hurugalawadi > wrote: > > Hi, > > > > Thanks for reviewing the patch and sharing your comments. > > > > > > nop_convert4 cannot happen, constants will have been constant folded > >

Re: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-06-15 Thread Richard Biener via Gcc-patches
On Thu, Jun 4, 2020 at 5:09 PM Naveen Hurugalawadi wrote: > > Hi, > > Thanks for reviewing the patch and sharing your comments. > > >> nop_convert4 cannot happen, constants will have been constant folded here. > Removed. > > >> So I think it should be and the other patterns adjusted accordingly.

RE: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-06-04 Thread Naveen Hurugalawadi via Gcc-patches
Hi, Thanks for reviewing the patch and sharing your comments. >> nop_convert4 cannot happen, constants will have been constant folded here. Removed. >> So I think it should be and the other patterns adjusted accordingly. Modified the remaining patterns accordingly. Please find attached the

Re: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-06-04 Thread Richard Biener via Gcc-patches
On Thu, Jun 4, 2020 at 2:09 PM Marc Glisse wrote: > > On Thu, 4 Jun 2020, Richard Biener via Gcc-patches wrote: > > > (if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type) > > && !TYPE_SATURATING (type) > > Would the positive form > TYPE_OVERFLOW_WRAPS (type) ||

Re: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-06-04 Thread Marc Glisse
On Thu, 4 Jun 2020, Richard Biener via Gcc-patches wrote: (if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type) && !TYPE_SATURATING (type) Would the positive form TYPE_OVERFLOW_WRAPS (type) || TYPE_OVERFLOW_UNDEFINED (type) be roughly equivalent and shorter? Or am I missing

Re: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-06-04 Thread Richard Biener via Gcc-patches
On Wed, Jun 3, 2020 at 12:36 PM Naveen Hurugalawadi wrote: > > Hi Richard, > > Thanks for reviewing the patch and sharing your comments. > > >> pattern should be guarded with !TYPE_OVERFLOW_SANITIZED > >> and/or !TYPE_OVERFLOW_TRAPS > Done. > > >> can you add some cases with unsigned types and

RE: [EXT] Re: [PATCH] Optimize and+or+sub into xor+not (PR94882)

2020-06-03 Thread Naveen Hurugalawadi via Gcc-patches
Hi Richard, Thanks for reviewing the patch and sharing your comments. >> pattern should be guarded with !TYPE_OVERFLOW_SANITIZED >> and/or !TYPE_OVERFLOW_TRAPS Done. >> can you add some cases with unsigned types and types >> smaller than int (thus with integral promotion applied)? Done. Please