public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "H. J. Lu" <hjl.tools@gmail.com>, Jeff Law <law@redhat.com>,
	 Kirill Yukhin <kirill.yukhin@gmail.com>,
	 "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] i386: Fix some -mavx512vl -mno-avx512bw bugs [PR99321]
Date: Sat, 6 Mar 2021 13:39:23 +0100	[thread overview]
Message-ID: <CAFULd4aX2ds+q+c25Oyk903q0hFJC7dhUqFN+Ak6rGaE81mrDw@mail.gmail.com> (raw)
In-Reply-To: <20210306103436.GP745611@tucnak>

On Sat, Mar 6, 2021 at 11:34 AM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Sat, Mar 06, 2021 at 11:19:15AM +0100, Uros Bizjak wrote:
> > > We already have Yw constraint which is equivalent to v for
> > > -mavx512bw -mavx512vl and to nothing otherwise, so for
> > > the instructions that need both we need to use xYw and
> > > v for modes that don't need that.
> >
> > Perhaps we should introduce another Y... constraint to return correct
> > SSE regset based on TARGET_... flags, instead of using compound xYw? I
> > think that introducing new constraint is the established approach we
> > should follow. The new mode_attr looks OK to me.
>
> One possibility would be to change the meaning of Yw, because it
> is an internal undocumented constraint and all uses in GCC currently use it
> as xYw:
> constraints.md:(define_register_constraint "Yw"
> mmx.md:  [(set (match_operand:V4HI 0 "register_operand" "=y,xYw")
> mmx.md:          (match_operand:V4HI 1 "register_mmxmem_operand" "ym,xYw")
> mmx.md:  [(set (match_operand:V4HI 0 "register_operand" "=y,xYw")
> mmx.md:     (match_operand:SI 1 "register_operand" "0,xYw"))))]
> Would that be ok?

Yes, this is an excellent idea.

Uros.

> If not, I'll add
> (define_register_constraint "Yl"
>  "TARGET_AVX512BW && TARGET_AVX512VL ? ALL_SSE_REGS : TARGET_SSE ? SSE_REGS : NO_REGS"
>  "@internal Any EVEX encodable SSE register (@code{%xmm0-%xmm31}) for AVX512BW with TARGET_AVX512VL target, otherwise any SSE register.")
>
>         Jakub
>

  reply	other threads:[~2021-03-06 12:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 20:50 Jakub Jelinek
2021-03-06 10:19 ` Uros Bizjak
2021-03-06 10:34   ` Jakub Jelinek
2021-03-06 12:39     ` Uros Bizjak [this message]
2021-03-07  8:40       ` [PATCH] i386, v2: " Jakub Jelinek
2021-03-07  9:07         ` Uros Bizjak

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=CAFULd4aX2ds+q+c25Oyk903q0hFJC7dhUqFN+Ak6rGaE81mrDw@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=jakub@redhat.com \
    --cc=kirill.yukhin@gmail.com \
    --cc=law@redhat.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).