summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-struct-move.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-struct-move.c')
-rw-r--r--gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-struct-move.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-struct-move.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-struct-move.c
new file mode 100644
index 00000000000..ca10e9f47a6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-struct-move.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -lasx" } */
+
+struct vec
+{
+ int vec_a[32];
+ double vec_b[5];
+ char vec_c[32];
+};
+
+void
+foo (struct vec *dest, struct vec *src, int index)
+{
+ dest[index] = *src;
+}
+
+/* { dg-final { scan-assembler-times "alsl\.d" 3} } */