Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/insert-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv64gcv -mabi=lp64d" } */
3
4 #include <stdint-gcc.h>
5
6 typedef double vnx2df __attribute__ ((vector_size (16)));
7 typedef double vnx4df __attribute__ ((vector_size (32)));
8 typedef double vnx8df __attribute__ ((vector_size (64)));
9 typedef double vnx16df __attribute__ ((vector_size (128)));
10
11 __attribute__ ((noipa)) void
12 f_vnx2df (double a, double b, double *out)
13 {
14 vnx2df v = {a, b};
15 *(vnx2df *) out = v;
16 }
17
18 __attribute__ ((noipa)) void
19 f_vnx4df (double a, double b, double c, double d, double *out)
20 {
21 vnx4df v = {a, b, c, d};
22 *(vnx4df *) out = v;
23 }
24
25 __attribute__ ((noipa)) void
26 f_vnx8df (double a, double b, double c, double d, double e, double f, double g, double h, double *out)
27 {
28 vnx8df v = {a, b, c, d, e, f, g, h};
29 *(vnx8df *) out = v;
30 }
31
32 __attribute__ ((noipa)) void
33 f_vnx16df (double a, double b, double c, double d, double e, double f,
34 double g, double h, double a2, double b2, double c2, double d2,
35 double e2, double f2, double g2, double h2, double *out)
36 {
37 vnx16df v = {a, b, c, d, e, f, g, h, a2, b2, c2, d2, e2, f2, g2, h2};
38 *(vnx16df *) out = v;
39 }
40
41 /* { dg-final { scan-assembler-times {vfslide1down\.vf\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+} 26 } } */