From: Xi Ruoyao <xry111@xry111.site>
To: Xiaolong Chen <chenxiaolong@loongson.cn>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn
Subject: Re: [PATCH v1 1/4] LoongArch: Add tests of -mstrict-align option.
Date: Wed, 06 Sep 2023 19:10:28 +0800 [thread overview]
Message-ID: <923e96652d4310b2b4a6e4b38c6f5a3bde2c852d.camel@xry111.site> (raw)
In-Reply-To: <20230906104307.37244-2-chenxiaolong@loongson.cn>
On Wed, 2023-09-06 at 18:43 +0800, Xiaolong Chen wrote:
> gcc/testsuite/ChangeLog:
>
> * gcc.target/loongarch/strict-align.c: New test.
A question: is there really a CPU model with LSX/LASX but without
unaligned access support? If not I think we'd just reject -mstrict-
align -mlsx.
Currently Glibc assumes if LSX is available then unaligned access must
be available too.
> ---
> gcc/testsuite/gcc.target/loongarch/strict-align.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> create mode 100644 gcc/testsuite/gcc.target/loongarch/strict-align.c
>
> diff --git a/gcc/testsuite/gcc.target/loongarch/strict-align.c
> b/gcc/testsuite/gcc.target/loongarch/strict-align.c
> new file mode 100644
> index 00000000000..bcad2b84f68
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/loongarch/strict-align.c
> @@ -0,0 +1,13 @@
> +/* { dg-do compile } */
> +/* { dg-options "-Ofast -mstrict-align -mlasx" } */
> +/* { dg-final { scan-assembler-not "vfadd.s" } } */
> +
> +void
> +foo (float* restrict x, float* restrict y)
> +{
> + x[0] = x[0] + y[0];
> + x[1] = x[1] + y[1];
> + x[2] = x[2] + y[2];
> + x[3] = x[3] + y[3];
> +}
> +
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2023-09-06 11:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 10:43 [PATCH v1 0/4] Add Loongson SX/ASX instruction support to LoongArch Xiaolong Chen
2023-09-06 10:43 ` [PATCH v1 1/4] LoongArch: Add tests of -mstrict-align option Xiaolong Chen
2023-09-06 11:10 ` Xi Ruoyao [this message]
2023-09-07 1:28 ` chenglulu
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=923e96652d4310b2b4a6e4b38c6f5a3bde2c852d.camel@xry111.site \
--to=xry111@xry111.site \
--cc=chenglulu@loongson.cn \
--cc=chenxiaolong@loongson.cn \
--cc=gcc-patches@gcc.gnu.org \
--cc=i@xen0n.name \
--cc=xuchenghua@loongson.cn \
/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).