Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/init-repeat-sequence-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv64gcv -mabi=lp64d" } */
3
4 #include <stdint-gcc.h>
5
6 typedef double vnx8df __attribute__ ((vector_size (64)));
7 typedef double vnx16df __attribute__ ((vector_size (128)));
8
9 __attribute__ ((noipa)) void
10 f_vnx8df (double a, double b, double *out)
11 {
12 vnx8df v = {a, b, a, b, a, b, a, b};
13 *(vnx8df *) out = v;
14 }
15
16 __attribute__ ((noipa)) void
17 f_vnx16df (double a, double b, double *out)
18 {
19 vnx16df v = {a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b};
20 *(vnx16df *) out = v;
21 }
22
23 /* { dg-final { scan-assembler-times {vmv\.s\.x\tv[0-9]+,\s*[a-x0-9]+} 1 } } */
24 /* { dg-final { scan-assembler-times {vfmerge\.vfm\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+,\s*v0} 1 } } */