public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Carl Love <cel@us.ibm.com>
Cc: dje.gcc@gmail.com, gcc-patches@gcc.gnu.org,
	Will Schmidt <will_schmidt@vnet.ibm.com>,
	Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [Patch 4/5] rs6000, Test 128-bit shifts for just the int128 type.
Date: Thu, 10 Sep 2020 12:52:52 -0500	[thread overview]
Message-ID: <20200910175252.GN28786@gate.crashing.org> (raw)
In-Reply-To: <79609311779c97e8fd4ac4853f3fba1df60adc5e.camel@us.ibm.com>

Hi!

On Wed, Aug 26, 2020 at 01:27:44PM -0700, Carl Love wrote:
> > > @@ -367,7 +367,7 @@
> > >     UNSPEC_INSERTR
> > >     UNSPEC_REPLACE_ELT
> > >     UNSPEC_REPLACE_UN
> > > -	UNSPEC_XXSWAPD_V1TI
> > > +	UNSPEC_XXSWAPD_VEC_I128
> > 
> > Why not just UNSPEC_XXSWAPD?  And, why an unspec at all?
> 
> I am trying to figure out how to specify this without using an unpsec
> per your last comment.  I changed the definition to:
> 
> ;; Swap upper/lower 64-bit values in V1TI or TI type
> (define_insn "xxswapd_<mode>"
>   [(set (match_operand:VEC_I128 0 "vsx_register_operand" "=v")
>         (vec_select:VEC_I128
>           (match_operand:VEC_I128 1 "vsx_register_operand" "v")
>           (parallel [(const_int 0)])))]
>   "TARGET_POWER10"
> ;; AIX does not support extended mnemonic xxswapd.  Use the basic
> ;; mnemonic xxpermdi instead.
>   "xxpermdi %x0,%x1,%x1,2"
>   [(set_attr "type" "vecperm")])

(define_insn "xxswapd_<mode>"
  [(set (match_operand:VEC_I128 0 "vsx_register_operand" "=v")
        (subreg:VEC_I128
          (vec_select:V2DI
            (match_operand:V2DI 1 "vsx_register_operand" "v")
            (parallel [(const_int 1) (const_int 0)]))
          0))]

or similar (i.e., just cast it to the type you want -- in hardware, all
vectors are just an opaque 128 bits, but in RTL they have a type).

(You probably want to cast operands[1] as well).


Segher

  reply	other threads:[~2020-09-10 17:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 19:01 [Patch 0/5] rs6000, 128-bit Binary Integer Operations Carl Love
2020-08-11 19:22 ` [Patch 1/5] rs6000, Add 128-bit sign extension support Carl Love
2020-08-13 17:36   ` Segher Boessenkool
2020-08-13 18:09     ` Carl Love
2020-08-13 18:29       ` Segher Boessenkool
2020-08-13 22:11         ` [EXTERNAL] " will schmidt
2020-08-13 22:55           ` Segher Boessenkool
2020-08-13 23:53             ` [EXTERNAL] " will schmidt
2020-08-18 21:50               ` Segher Boessenkool
2020-08-11 19:22 ` [Patch 2/5] rs6000, 128-bit multiply, divide, modulo, shift, compare Carl Love
2020-08-13 23:46   ` will schmidt
2020-08-20  1:06     ` Segher Boessenkool
2020-08-11 19:22 ` [Patch 3/5] rs6000, Add TI to TD (128-bit DFP) and TD to TI support Carl Love
2020-08-14 17:13   ` will schmidt
2020-08-20  1:29   ` Segher Boessenkool
2020-08-26 18:23     ` Carl Love
2020-09-10 17:36       ` Segher Boessenkool
2020-08-11 19:23 ` [Patch 4/5] rs6000, Test 128-bit shifts for just the int128 type Carl Love
2020-08-14 17:35   ` will schmidt
2020-08-20 21:50   ` Segher Boessenkool
2020-08-26 20:27     ` Carl Love
2020-09-10 17:52       ` Segher Boessenkool [this message]
2020-08-11 19:23 ` [Patch 5/5] rs6000, Conversions between 128-bit integer and floating point values Carl Love
2020-08-14 18:50   ` will schmidt
2020-08-20 22:36   ` Segher Boessenkool
2020-09-19  0:25   ` will schmidt

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=20200910175252.GN28786@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=cel@us.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=will_schmidt@vnet.ibm.com \
    --cc=wschmidt@linux.vnet.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).