public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-3928] LoongArch: Add tests of -mstrict-align option.
@ 2023-09-14  0:44 LuluCheng
  0 siblings, 0 replies; only message in thread
From: LuluCheng @ 2023-09-14  0:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4fedd6b14d90ab17bdb5a8ddf50c17560520d3b3

commit r14-3928-g4fedd6b14d90ab17bdb5a8ddf50c17560520d3b3
Author: Xiaolong Chen <chenxiaolong@loongson.cn>
Date:   Mon Sep 11 09:35:24 2023 +0800

    LoongArch: Add tests of -mstrict-align option.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/loongarch/strict-align.c: New test.

Diff:
---
 gcc/testsuite/gcc.target/loongarch/strict-align.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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 000000000000..040d849584be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/strict-align.c
@@ -0,0 +1,12 @@
+/* { 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];
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-14  0:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-14  0:44 [gcc r14-3928] LoongArch: Add tests of -mstrict-align option LuluCheng

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).