public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stamatis Markianos-Wright <stam.markianos-wright@arm.com>
To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: arm: Fix MVE vcreate definition
Date: Tue, 4 Apr 2023 13:10:24 +0100	[thread overview]
Message-ID: <bfb08076-5c67-da7a-be66-d4202347ec48@arm.com> (raw)
In-Reply-To: <PAXPR08MB6926B1657B4919FD8C58067593899@PAXPR08MB6926.eurprd08.prod.outlook.com>


On 29/03/2023 13:16, Kyrylo Tkachov wrote:
>> -----Original Message-----
>> From: Stam Markianos-Wright<Stam.Markianos-Wright@arm.com>
>> Sent: Wednesday, March 29, 2023 11:50 AM
>> To:gcc-patches@gcc.gnu.org
>> Cc: Kyrylo Tkachov<Kyrylo.Tkachov@arm.com>
>> Subject: arm: Fix MVE vcreate definition
>>
>> Hi all,
>>
>> I just found a bug that goes back to the initial merge of
>> the MVE backend: The vcreate intrinsic has had it's vector
>> lanes mixed up, compared to what was intended (as per
>> the ACLE) definition. This is also a discrepancy with clang:
>> https://godbolt.org/z/4n93e5aqj
>>
>> This patches simply switches the operands around and
>> makes the tests more specific on the input registers
>> (I do not touch the output Q regs as they vary based
>> on softfp/hardfp or the input registers when the input
>> is a constant, since, in that case, a single register
>> is loaded with a constant and then the same register is
>> used twice as "vmov q0[2], q0[0], r2, r2" and the reg
>> num might also not always be guaranteed).
>>
>> No regressions on MVE tesctsuite configurations or in
>> the CMSIS-NN testsuite.
>>
>> Ok for trunk? (Despite this being late in Stage 4, sorry
>> about that!)
> Ok, since this is a wrong-code fix.
Thanks, applied as:
3f0ca7a3e4431534bff3b8eb73709cc822e489b0.
> This needs backports as well, right?
Indeed! I'm building up a larger list of commits that we're hoping
to backport, so I will include this on that list.

> Thanks,
> Kyrill
>
>> Thanks,
>> Stamatis Markianos-Wright
>>
>> gcc/ChangeLog:
>>
>>           * config/arm/mve.md (mve_vcvtq_n_to_f_<supf><mode>): Swap
>> operands.
>>             (mve_vcreateq_f<mode>): Swap operands.
>>
>> gcc/testsuite/ChangeLog:
>>
>>           * gcc.target/arm/mve/intrinsics/vcreateq_f16.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_f32.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_s16.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_s32.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_s64.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_s8.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_u16.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_u32.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_u64.c: Tighten test.
>>           * gcc.target/arm/mve/intrinsics/vcreateq_u8.c: Tighten test.

      reply	other threads:[~2023-04-04 12:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 10:50 Stamatis Markianos-Wright
2023-03-29 12:16 ` Kyrylo Tkachov
2023-04-04 12:10   ` Stamatis Markianos-Wright [this message]

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=bfb08076-5c67-da7a-be66-d4202347ec48@arm.com \
    --to=stam.markianos-wright@arm.com \
    --cc=Kyrylo.Tkachov@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).