public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
To: Christophe Lyon <Christophe.Lyon@arm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>,
	Richard Sandiford <Richard.Sandiford@arm.com>
Cc: Christophe Lyon <Christophe.Lyon@arm.com>
Subject: RE: [PATCH 06/16] arm: add smax/smin expanders for v*hf
Date: Tue, 9 May 2023 13:48:05 +0000	[thread overview]
Message-ID: <PAXPR08MB69268E24E04E702680FB310B93769@PAXPR08MB6926.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20230509121937.206183-6-christophe.lyon@arm.com>



> -----Original Message-----
> From: Christophe Lyon <christophe.lyon@arm.com>
> Sent: Tuesday, May 9, 2023 1:19 PM
> To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>;
> Richard Earnshaw <Richard.Earnshaw@arm.com>; Richard Sandiford
> <Richard.Sandiford@arm.com>
> Cc: Christophe Lyon <Christophe.Lyon@arm.com>
> Subject: [PATCH 06/16] arm: add smax/smin expanders for v*hf
> 
> This patch adds the missing expanders for smax/smin for v*hf modes.
> 
> 2022-09-08  Christophe Lyon  <christophe.lyon@arm.com>
> 
> 	gcc/
> 	* config/arm/vec-common.md (smin<mode>3): New.
> 	(smax<mode>3): New.
> ---
>  gcc/config/arm/vec-common.md | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/gcc/config/arm/vec-common.md b/gcc/config/arm/vec-
> common.md
> index b5fc86fdf28..1f9b7992da4 100644
> --- a/gcc/config/arm/vec-common.md
> +++ b/gcc/config/arm/vec-common.md
> @@ -116,6 +116,13 @@ (define_expand "smin<mode>3"
>     "ARM_HAVE_<MODE>_ARITH"
>  )
> 
> +(define_expand "smin<mode>3"
> +  [(set (match_operand:VH 0 "s_register_operand")
> +	(smin:VH (match_operand:VH 1 "s_register_operand")
> +		 (match_operand:VH 2 "s_register_operand")))]
> +   "ARM_HAVE_<MODE>_ARITH"
> +)
> +
>  (define_expand "umin<mode>3"
>    [(set (match_operand:VINTW 0 "s_register_operand")
>  	(umin:VINTW (match_operand:VINTW 1 "s_register_operand")
> @@ -130,6 +137,13 @@ (define_expand "smax<mode>3"
>     "ARM_HAVE_<MODE>_ARITH"
>  )
> 
> +(define_expand "smax<mode>3"
> +  [(set (match_operand:VH 0 "s_register_operand")
> +	(smax:VH (match_operand:VH 1 "s_register_operand")
> +		 (match_operand:VH 2 "s_register_operand")))]
> +   "ARM_HAVE_<MODE>_ARITH"
> +)

We already have expanders for smin and smax, can we just extend their mode iterators to include the VH modes?
The ARM_HAVE_<MODE>_ARITH checks should still gate them properly and we could avoid adding more bloat in this file.
Thanks,
Kyrill

> +
>  (define_expand "umax<mode>3"
>    [(set (match_operand:VINTW 0 "s_register_operand")
>  	(umax:VINTW (match_operand:VINTW 1 "s_register_operand")
> --
> 2.34.1


  reply	other threads:[~2023-05-09 13:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 12:19 [PATCH 01/16] arm: [MVE intrinsics] add binary_maxvminv shape Christophe Lyon
2023-05-09 12:19 ` [PATCH 02/16] arm: [MVE intrinsics] add binary_maxavminav shape Christophe Lyon
2023-05-09 12:19 ` [PATCH 03/16] arm: [MVE intrinsics add unspec_mve_function_exact_insn_pred_p Christophe Lyon
2023-05-09 12:19 ` [PATCH 04/16] arm: [MVE intrinsics] factorize vmaxvq vminvq vmaxavq vminavq Christophe Lyon
2023-05-09 12:19 ` [PATCH 05/16] arm: [MVE intrinsics] rework " Christophe Lyon
2023-05-09 12:19 ` [PATCH 06/16] arm: add smax/smin expanders for v*hf Christophe Lyon
2023-05-09 13:48   ` Kyrylo Tkachov [this message]
2023-05-09 17:18     ` Christophe Lyon
2023-05-09 17:31       ` Kyrylo Tkachov
2023-05-09 17:33         ` Christophe Lyon
2023-05-09 17:34           ` Kyrylo Tkachov
2023-05-09 18:28             ` [PATCH v2 " Christophe Lyon
2023-05-09 12:19 ` [PATCH 07/16] arm: [MVE intrinsics] factorize vmaxnmq vminnmq Christophe Lyon
2023-05-09 12:19 ` [PATCH 08/16] arm: [MVE intrinsics] rework " Christophe Lyon
2023-05-09 12:19 ` [PATCH 09/16] arm: [MVE intrinsics] factorize vmaxnmavq vmaxnmvq vminnmavq vminnmvq Christophe Lyon
2023-05-09 12:19 ` [PATCH 10/16] arm: [MVE intrinsics] add support for mve_q_p_f Christophe Lyon
2023-05-09 12:19 ` [PATCH 11/16] arm: [MVE intrinsics] rework vmaxnmavq vmaxnmvq vminnmavq vminnmvq Christophe Lyon
2023-05-09 12:19 ` [PATCH 12/16] arm: [MVE intrinsics] factorize vmaxnmaq vminnmaq Christophe Lyon
2023-05-09 12:19 ` [PATCH 13/16] arm: [MVE intrinsics] rework " Christophe Lyon
2023-05-09 12:19 ` [PATCH 14/16] arm: [MVE intrinsics] add binary_maxamina shape Christophe Lyon
2023-05-09 12:19 ` [PATCH 15/16] arm: [MVE intrinsics] factorize vmaxaq vminaq Christophe Lyon
2023-05-09 12:19 ` [PATCH 16/16] arm: [MVE intrinsics] rework " Christophe Lyon
2023-05-09 13:50 ` [PATCH 01/16] arm: [MVE intrinsics] add binary_maxvminv shape Kyrylo Tkachov
2023-05-09 18:30   ` Christophe Lyon

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=PAXPR08MB69268E24E04E702680FB310B93769@PAXPR08MB6926.eurprd08.prod.outlook.com \
    --to=kyrylo.tkachov@arm.com \
    --cc=Christophe.Lyon@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=Richard.Sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).