public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>,  Jan Hubicka <hubicka@ucw.cz>,
	Uros Bizjak <ubizjak@gmail.com>
Subject: Re: [PATCH 01/10] i386: Properly encode vector registers in vector move
Date: Sat, 29 Feb 2020 02:16:00 -0000	[thread overview]
Message-ID: <de31ed58f61067483b70558f6d4b367e8531bbeb.camel@redhat.com> (raw)
In-Reply-To: <CAMe9rOpkG7va6Jzvso+j=iXEZmdV1i883xHSpERdaXsVdkWb+A@mail.gmail.com>

On Thu, 2020-02-27 at 06:50 -0800, H.J. Lu wrote:
> 
> How about this?  If it looks OK, I will post the whole patch set.
It's better.  I'm guessing the two cases that were previously handled with
vextract/vbroadcast aren't supposed to happen?  They're caught here IIUC:

> +  /* NB: To move xmm16-xmm31/ymm16-ymm31 registers without AVX512VL,
> +     we can only use zmm register move without memory operand.  */
> +   if (evex_reg_p
> +       && !TARGET_AVX512VL
> +       && GET_MODE_SIZE (mode) < 64)
> +     {
> +       if (memory_operand (operands[0], mode)
> +	   || memory_operand (operands[1], mode))
> +	gcc_unreachable ();
> 

If they truly can't happen, that's fine.  My worry is I don't see changes to
the operand predicates or constraints which would avoid this case.   Is it
prevented by the mode iterator on the operands?  Again, just want to make sure
I understand why the vextract/vbroadcast stuff isn't in the new code.

I'm doing a little assuming that the <ssescalarsize> bits in the old code are
mapped correctly to the 32/64 suffixes on the opcodes in the new version.

I'm also assuming that mapping of "size" in the argument to ix86_get_ssemov to
the operand modifiers g, t, and x are right.  I'm guessing the operand
modifiers weren't needed in the original because we had the actual operand and
could look at it to get the right modifier.  In the evex, but not avx512vl case
those are forced to a g modifier which seems to match the original.

Are we going to need further refinements to ix86_output_ssemov/ix86_get_ssemov?
If so, then I'd suggest the next patch be those patterns which don't require
further refinements to ix86_output_ssemov.

If no further refinements to ix86_output_ssemov/ix86_get_ssemov are required,
then I think you can just send the rest of the pattern changes in a single
unit.

jeff

  reply	other threads:[~2020-02-29  0:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15 15:26 [PATCH 00/10] i386: Properly encode xmm16-xmm31/ymm16-ymm31 for " H.J. Lu
2020-02-15 15:26 ` [PATCH 09/10] i386: Use ix86_output_ssemov for SFmode TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 02/10] i386: Use ix86_output_ssemov for XImode TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 01/10] i386: Properly encode vector registers in vector move H.J. Lu
2020-02-26 22:42   ` Jeff Law
2020-02-27  0:03     ` H.J. Lu
2020-02-27  0:24       ` Jeff Law
2020-02-27 14:51         ` H.J. Lu
2020-02-29  2:16           ` Jeff Law [this message]
2020-02-29  5:43             ` H.J. Lu
2020-02-29 12:18               ` H.J. Lu
2020-03-05 23:43               ` Jeff Law
2020-02-15 15:26 ` [PATCH 06/10] i386: Use ix86_output_ssemov for SImode TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 07/10] i386: Use ix86_output_ssemov for TFmode TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 08/10] i386: Use ix86_output_ssemov for DFmode TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 10/10] i386: Use ix86_output_ssemov for MMX TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 05/10] i386: Use ix86_output_ssemov for DImode TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 04/10] i386: Use ix86_output_ssemov for TImode TYPE_SSEMOV H.J. Lu
2020-02-15 15:26 ` [PATCH 03/10] i386: Use ix86_output_ssemov for OImode TYPE_SSEMOV H.J. Lu
2020-02-24 12:55 ` PING^8: [PATCH 00/10] i386: Properly encode xmm16-xmm31/ymm16-ymm31 for vector move H.J. Lu

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=de31ed58f61067483b70558f6d4b367e8531bbeb.camel@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=hubicka@ucw.cz \
    --cc=jakub@redhat.com \
    --cc=ubizjak@gmail.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).