Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-06-08 Thread Oluwatamilore Adebayo via Gcc-patches
New patch to address issue brought up in a different thread: mptjzwgplp2@arm.com > > + /* Failed to find a widen operation so we check for a regular > > MINUS_EXPR. */ > > + if (diff > > + && gimple_assign_rhs_code (diff) == MINUS_EXPR > > + && (TYPE_UNSIGNED (abs_type) || TYPE_O

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-06-06 Thread Oluwatamilore Adebayo via Gcc-patches
> > + if (TYPE_PRECISION (unprom_diff.type) != TYPE_PRECISION (abs_type) > > + && TYPE_UNSIGNED (unprom_diff.type) > > + && TYPE_UNSIGNED (abs_type)) > > The last line is now redundant, since TYPE_UNSIGNED was checked above. Done. > > + // Failed to find a widen operation so we check

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-23 Thread Oluwatamilore Adebayo via Gcc-patches
> > + if (reject_unsigned && TYPE_UNSIGNED (abs_type)) > > +return false; > > + if (!ANY_INTEGRAL_TYPE_P (abs_type) || TYPE_OVERFLOW_WRAPS (abs_type)) > > +return false; > > Could you explain the reject_unsigned behaviour? I'd have expected > TYPE_OVERFLOW_WRAPS (abs_type) to reject the

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-17 Thread Oluwatamilore Adebayo via Gcc-patches
> Yeah. Like Tami says, this is what the instruction does. > > I think all three definitions are equivalent: the extend/operate/truncate > one, the ?: one above, and the "max - min" one. Probably just personal > preference as to which seems more natural. Decided to switch to using the ?: one as

RE: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-15 Thread Oluwatamilore Adebayo via Gcc-patches
From: Oluwatamilore Adebayo Sent: Wednesday, May 10, 2023 14:29 To: Richard Biener ; gcc-patches@gcc.gnu.org; Richard Sandiford Subject: Re: [PATCH] vect: Missed opportunity to use [SU]ABD When using inputs of 0x7fff and 0x8000 the result yielded is -1. When using inputs of -1 and 0x7fff the

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-10 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, May 10, 2023 at 11:49 AM Richard Biener > wrote: >> >> On Wed, May 10, 2023 at 11:01 AM Richard Sandiford >> wrote: >> > >> > Oluwatamilore Adebayo writes: >> > > From 0b5f469171c340ef61a48a31877d495bb77bd35f Mon Sep 17 00:00:00 2001 >> > > From: oluade01 >> >

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-10 Thread Oluwatamilore Adebayo via Gcc-patches
; richard.guent...@gmail.com ; Richard Sandiford Subject: Re: [PATCH] vect: Missed opportunity to use [SU]ABD On Wed, May 10, 2023 at 11:01 AM Richard Sandiford wrote: > > Oluwatamilore Adebayo writes: > > From 0b5f469171c340ef61a48a31877d495bb77bd35f Mon Sep 17 00:00:00 2001 > > From:

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-10 Thread Richard Biener via Gcc-patches
On Wed, May 10, 2023 at 11:49 AM Richard Biener wrote: > > On Wed, May 10, 2023 at 11:01 AM Richard Sandiford > wrote: > > > > Oluwatamilore Adebayo writes: > > > From 0b5f469171c340ef61a48a31877d495bb77bd35f Mon Sep 17 00:00:00 2001 > > > From: oluade01 > > > Date: Fri, 14 Apr 2023 10:24:43 +0

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-10 Thread Richard Biener via Gcc-patches
On Wed, May 10, 2023 at 11:01 AM Richard Sandiford wrote: > > Oluwatamilore Adebayo writes: > > From 0b5f469171c340ef61a48a31877d495bb77bd35f Mon Sep 17 00:00:00 2001 > > From: oluade01 > > Date: Fri, 14 Apr 2023 10:24:43 +0100 > > Subject: [PATCH 1/4] Missed opportunity to use [SU]ABD > > > > T

Re: [PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-10 Thread Richard Sandiford via Gcc-patches
Oluwatamilore Adebayo writes: > From 0b5f469171c340ef61a48a31877d495bb77bd35f Mon Sep 17 00:00:00 2001 > From: oluade01 > Date: Fri, 14 Apr 2023 10:24:43 +0100 > Subject: [PATCH 1/4] Missed opportunity to use [SU]ABD > > This adds a recognition pattern for the non-widening > absolute difference (

[PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-09 Thread Oluwatamilore Adebayo via Gcc-patches
>From 0b5f469171c340ef61a48a31877d495bb77bd35f Mon Sep 17 00:00:00 2001 From: oluade01 Date: Fri, 14 Apr 2023 10:24:43 +0100 Subject: [PATCH 1/4] Missed opportunity to use [SU]ABD This adds a recognition pattern for the non-widening absolute difference (ABD). gcc/ChangeLog: * doc/md.tex

[PATCH] vect: Missed opportunity to use [SU]ABD

2023-05-09 Thread Oluwatamilore Adebayo via Gcc-patches
>From 0b5f469171c340ef61a48a31877d495bb77bd35f Mon Sep 17 00:00:00 2001 From: oluade01 Date: Fri, 14 Apr 2023 10:24:43 +0100 Subject: [PATCH 1/4] Missed opportunity to use [SU]ABD This adds a recognition pattern for the non-widening absolute difference (ABD). gcc/ChangeLog: * doc/md.tex