From: Xiaolong Chen Date: Mon, 11 Sep 2023 01:35:24 +0000 (+0800) Subject: LoongArch: Add tests of -mstrict-align option. X-Git-Tag: basepoints/gcc-15~6211 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4fedd6b14d90ab17bdb5a8ddf50c17560520d3b3;p=thirdparty%2Fgcc.git LoongArch: Add tests of -mstrict-align option. gcc/testsuite/ChangeLog: * gcc.target/loongarch/strict-align.c: New test. --- 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]; +}