From: Xiaolong Chen <chenxiaolong@loongson.cn>
To: gcc-patches@gcc.gnu.org
Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn,
chenglulu@loongson.cn, Xiaolong Chen <chenxiaolong@loongson.cn>
Subject: [PATCH v1 1/4] LoongArch: Add tests of -mstrict-align option.
Date: Wed, 6 Sep 2023 18:43:04 +0800 [thread overview]
Message-ID: <20230906104307.37244-2-chenxiaolong@loongson.cn> (raw)
In-Reply-To: <20230906104307.37244-1-chenxiaolong@loongson.cn>
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/strict-align.c: New test.
---
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];
+}
+
--
2.20.1
next prev parent reply other threads:[~2023-09-06 10:43 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 ` Xiaolong Chen [this message]
2023-09-06 11:10 ` [PATCH v1 1/4] LoongArch: Add tests of -mstrict-align option Xi Ruoyao
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=20230906104307.37244-2-chenxiaolong@loongson.cn \
--to=chenxiaolong@loongson.cn \
--cc=chenglulu@loongson.cn \
--cc=gcc-patches@gcc.gnu.org \
--cc=i@xen0n.name \
--cc=xry111@xry111.site \
--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).