public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paulo Matos <pmatos@broadcom.com>
To: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: RE: Mode change for bswap pattern expansion
Date: Mon, 27 Jan 2014 17:57:00 -0000	[thread overview]
Message-ID: <19EB96622A777C4AB91610E763265F463F1731@SJEXCHMB14.corp.ad.broadcom.com> (raw)
In-Reply-To: <87vbx5s735.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com>

> -----Original Message-----
> From: Richard Sandiford [mailto:rsandifo@linux.vnet.ibm.com]
> Sent: 27 January 2014 16:50
> To: Paulo Matos
> Cc: gcc@gcc.gnu.org
> Subject: Re: Mode change for bswap pattern expansion
>  
> Sorry, I meant we use an unspec for the first ("V2HI") rotate.
> I.e. rather than:
> 
>   (set (subreg:V2HI (match_dup 2) 0)
>        (rotate:V2HI (subreg:V2HI (match_dup 1) 0)
>                     (const_int 8)))
>   (set (match_dup 0)
>        (rotate:SI (match_dup 2)
>                   (const_int 16)))
> 
> we have:
> 
>   (set (match_dup 2) (unspec:SI [(match_dup 1)] UNSPEC_FOO))
>   (set (match_dup 0)
>        (rotate:SI (match_dup 2)
>                   (const_int 16)))
> 
> In your case the define_insn for the UNSPEC_FOO pattern would have the
> same attributes as a V2HI rotate, so it should get scheduled in the same way.
> 

In that case it would work. My only concern would then be if it prevents further optimizations. On the other hand I am not sure if GCC would try to optimize a rotate with vector V2HI mode...
Might give both solutions a try and see what results I get.

Thanks,

Paulo Matos

> Thanks,
> Richard


  reply	other threads:[~2014-01-27 17:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27 11:28 Paulo Matos
2014-01-27 16:24 ` Richard Sandiford
2014-01-27 16:28   ` Paulo Matos
2014-01-27 17:00     ` Richard Sandiford
2014-01-27 17:57       ` Paulo Matos [this message]
2014-01-27 19:29         ` pinskia

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=19EB96622A777C4AB91610E763265F463F1731@SJEXCHMB14.corp.ad.broadcom.com \
    --to=pmatos@broadcom.com \
    --cc=gcc@gcc.gnu.org \
    --cc=rsandifo@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).