public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Krebbel <krebbel@linux.ibm.com>
To: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 3/3] s390: Revise vector reverse elements
Date: Thu, 9 Nov 2023 09:27:58 +0100	[thread overview]
Message-ID: <26db3cee-134a-8117-cba9-1de74f5033b0@linux.ibm.com> (raw)
In-Reply-To: <20231109082211.2505-3-stefansf@linux.ibm.com>

On 11/9/23 09:22, Stefan Schulze Frielinghaus wrote:
> Replace UNSPEC_VEC_ELTSWAP with a vec_select implementation.
> 
> Furthermore, for a vector reverse elements operation between registers
> of mode V8HI perform three rotates instead of a vperm operation since
> the latter involves loading the permutation vector from the literal
> pool.
> 
> Prior z15, instead of
>   larl + vl + vl + vperm
> prefer
>   vl + vpdi (+ verllg (+ verllf))
> for a load operation.
> 
> Likewise, prior z15, instead of
>   larl + vl + vperm + vst
> prefer
>   vpdi (+ verllg (+ verllf)) + vst
> for a store operation.
> 
> Bootstrapped and regtested on s390.  Ok for mainline?
> 
> gcc/ChangeLog:
> 
> 	* config/s390/s390.md: Remove UNSPEC_VEC_ELTSWAP.
> 	* config/s390/vector.md (eltswapv16qi): New expander.
> 	(*eltswapv16qi): New insn and splitter.
> 	(eltswapv8hi): New insn and splitter.
> 	(eltswap<mode>): New insn and splitter for modes V_HW_4 as well
> 	as V_HW_2.
> 	* config/s390/vx-builtins.md (eltswap<mode>): Remove.
> 	(*eltswapv16qi): Remove.
> 	(*eltswap<mode>): Remove.
> 	(*eltswap<mode>_emu): Remove.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/s390/zvector/vec-reve-load-halfword-z14.c: Remove
> 	vperm and substitude by vpdi et al.
> 	* gcc.target/s390/zvector/vec-reve-load-halfword.c: Likewise.
> 	* gcc.target/s390/vector/reverse-elements-1.c: New test.
> 	* gcc.target/s390/vector/reverse-elements-2.c: New test.
> 	* gcc.target/s390/vector/reverse-elements-3.c: New test.
> 	* gcc.target/s390/vector/reverse-elements-4.c: New test.
> 	* gcc.target/s390/vector/reverse-elements-5.c: New test.
> 	* gcc.target/s390/vector/reverse-elements-6.c: New test.
> 	* gcc.target/s390/vector/reverse-elements-7.c: New test.

Ok, thanks!

Andreas


  reply	other threads:[~2023-11-09  8:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09  8:22 [PATCH 1/3] s390: Recognize further vpdi and vmr{l,h} pattern Stefan Schulze Frielinghaus
2023-11-09  8:22 ` [PATCH 2/3] s390: Add expand_perm_reverse_elements Stefan Schulze Frielinghaus
2023-11-09  8:27   ` Andreas Krebbel
2023-11-09  8:22 ` [PATCH 3/3] s390: Revise vector reverse elements Stefan Schulze Frielinghaus
2023-11-09  8:27   ` Andreas Krebbel [this message]
2023-11-09  8:27 ` [PATCH 1/3] s390: Recognize further vpdi and vmr{l,h} pattern Andreas Krebbel

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=26db3cee-134a-8117-cba9-1de74f5033b0@linux.ibm.com \
    --to=krebbel@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=stefansf@linux.ibm.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).