public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: <oluwatamilore.adebayo@arm.com>
To: <richard.sandiford@arm.com>
Cc: <Oluwatamilore.Adebayo@arm.com>, <gcc-patches@gcc.gnu.org>,
	<richard.guenther@gmail.com>
Subject: Re: [PATCH] vect: Missed opportunity to use [SU]ABD
Date: Wed, 17 May 2023 13:21:55 +0100	[thread overview]
Message-ID: <20230517122155.531-1-oluwatamilore.adebayo@arm.com> (raw)
In-Reply-To: <mpty1lwky06.fsf@arm.com>

> 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 it makes more sense
for unsigned types.

> It would be good to document what the parameters mean (except VINFO,
> which is obvious).

Documentation added for vect_recog_absolute_difference.

> I think this should instead be:
> 
>   if (TYPE_PRECISION (unprom_diff.type) != TYPE_PRECISION (abs_type)
>       && TYPE_UNSIGNED (unprom_diff.type)
>       && TYPE_UNSIGNED (abs_type))
>     return false;
> 
> ....
> 
> I think the code would be easier to follow if it used vect_widened_op_tree
> first, and only considered the unextended case on failure.

Implemented Richard's suggested changes to vect_recog_absolute_difference.

> Minor formatting nit: GCC style is to indent braces by two spaces
> further than an "if":
> 
>   if (...)
>     {
>       ...
>     }

Adopted this style.

New patch will be in the reply.

  reply	other threads:[~2023-05-17 12:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 16:07 Oluwatamilore Adebayo
2023-05-10  9:01 ` Richard Sandiford
2023-05-10  9:49   ` Richard Biener
2023-05-10  9:51     ` Richard Biener
2023-05-10 15:27       ` Richard Sandiford
2023-05-17 12:21         ` oluwatamilore.adebayo [this message]
2023-05-18  8:39           ` [PATCH 1/4] " Oluwatamilore.Adebayo
2023-05-18 17:59             ` Richard Sandiford
2023-05-22 13:32               ` Richard Biener
2023-05-23 14:27               ` [PATCH] vect: " Oluwatamilore Adebayo
2023-05-23 14:34                 ` [PATCH 1/2] " Oluwatamilore Adebayo
2023-05-24  9:48                   ` Richard Sandiford
2023-06-06  9:50                     ` [PATCH] vect: " Oluwatamilore Adebayo
2023-06-06  9:53                       ` [PATCH 1/2] " Oluwatamilore Adebayo
2023-06-06 12:56                         ` Richard Sandiford
2023-06-06 14:34                           ` Oluwatamilore Adebayo
2023-06-08 10:28                             ` [PATCH] vect: " Oluwatamilore Adebayo
2023-06-08 10:31                               ` [PATCH 1/2] " Oluwatamilore Adebayo
2023-06-13  8:26                                 ` Oluwatamilore Adebayo
2023-06-14 11:15                                   ` Richard Sandiford
2023-06-14 15:26                                     ` Oluwatamilore Adebayo
2023-06-15  6:38                                       ` Richard Sandiford
2023-05-10 13:29     ` [PATCH] vect: " Oluwatamilore Adebayo
2023-05-15 12:35       ` Oluwatamilore Adebayo
  -- strict thread matches above, loose matches on Subject: below --
2023-05-09 16:00 Oluwatamilore Adebayo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230517122155.531-1-oluwatamilore.adebayo@arm.com \
    --to=oluwatamilore.adebayo@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=richard.sandiford@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).