public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon.oss@gmail.com>
To: Richard Sandiford <richard.sandiford@arm.com>,
	 Christophe Lyon via Gcc-patches <gcc-patches@gcc.gnu.org>,
	Christophe Lyon <christophe.lyon@foss.st.com>
Subject: Re: [PATCH 06/13] arm: Fix mve_vmvnq_n_<supf><mode> argument mode
Date: Wed, 13 Oct 2021 12:19:17 +0200	[thread overview]
Message-ID: <CAKhMtS+UTDN--JJZAHUefxowJrjaKOUVST-Yahq-78jKEYsLqw@mail.gmail.com> (raw)
In-Reply-To: <mpty26zlltq.fsf@arm.com>

On Mon, Oct 11, 2021 at 4:10 PM Richard Sandiford via Gcc-patches <
gcc-patches@gcc.gnu.org> wrote:

> Christophe Lyon via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> > The vmvnq_n* intrinsics and have [u]int[16|32]_t arguments, so use
> > <V_elem> iterator instead of HI in mve_vmvnq_n_<supf><mode>.
> >
> > 2021-09-03  Christophe Lyon  <christophe.lyon@foss.st.com>
> >
> >       gcc/
> >       * config/arm/mve.md (mve_vmvnq_n_<supf><mode>): Use V_elem mode
> >       for operand 1.
> >
> > diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md
> > index e393518ea88..14d17060290 100644
> > --- a/gcc/config/arm/mve.md
> > +++ b/gcc/config/arm/mve.md
> > @@ -617,7 +617,7 @@ (define_insn "mve_vcvtaq_<supf><mode>"
> >  (define_insn "mve_vmvnq_n_<supf><mode>"
> >    [
> >     (set (match_operand:MVE_5 0 "s_register_operand" "=w")
> > -     (unspec:MVE_5 [(match_operand:HI 1 "immediate_operand" "i")]
> > +     (unspec:MVE_5 [(match_operand:<V_elem> 1 "immediate_operand" "i")]
> >        VMVNQ_N))
> >    ]
> >    "TARGET_HAVE_MVE"
>
> I agree this is correct, but there's also the issue that the
> predicate is too broad.  At the moment it allows any immediate,
> so things like:
>
>   #include <arm_mve.h>
>   int32x4_t foo(void) { return vmvnq_n_s32(0x12345678); }
>
> are accepted by the compiler and only rejected by the assembler.
> Not your bug to fix, just saying :-)
>
>
Right, and it seems to be the case for vbicq_n, vorrq_n, ...
I'll check that separately.



> Thanks,
> Richard
>

  reply	other threads:[~2021-10-13 10:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  9:16 [PATCH 05/13] arm: Add support for VPR_REG in arm_class_likely_spilled_p Christophe Lyon
2021-09-07  9:16 ` [PATCH 06/13] arm: Fix mve_vmvnq_n_<supf><mode> argument mode Christophe Lyon
2021-09-28 11:24   ` Kyrylo Tkachov
2021-10-11 13:42   ` Richard Sandiford
2021-10-13 10:19     ` Christophe Lyon [this message]
2021-09-07  9:16 ` [PATCH 07/13] arm: Implement MVE predicates as vectors of booleans Christophe Lyon
2021-10-11 13:50   ` Richard Sandiford
2021-09-07  9:16 ` [PATCH 08/13] arm: Implement auto-vectorized MVE comparisons with vectors of boolean predicates Christophe Lyon
2021-10-11 13:59   ` Richard Sandiford
2021-09-07  9:17 ` [PATCH 09/13] arm: Fix vcond_mask expander for MVE (PR target/100757) Christophe Lyon
2021-10-11 14:06   ` Richard Sandiford
2021-09-28 11:23 ` [PATCH 05/13] arm: Add support for VPR_REG in arm_class_likely_spilled_p Kyrylo Tkachov
2021-10-11 13:11 ` Richard Sandiford

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=CAKhMtS+UTDN--JJZAHUefxowJrjaKOUVST-Yahq-78jKEYsLqw@mail.gmail.com \
    --to=christophe.lyon.oss@gmail.com \
    --cc=christophe.lyon@foss.st.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@arm.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).