Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv -mabi=ilp32d" } */
3
4 #include <stdint-gcc.h>
5
6 typedef int64_t vnx2di __attribute__ ((vector_size (16)));
7 typedef int64_t vnx4di __attribute__ ((vector_size (32)));
8 typedef int64_t vnx8di __attribute__ ((vector_size (64)));
9 typedef int64_t vnx16di __attribute__ ((vector_size (128)));
10
11 __attribute__ ((noipa)) void
12 f_vnx2di (int64_t a, int64_t b, int64_t *out)
13 {
14 vnx2di v = {a, b};
15 *(vnx2di *) out = v;
16 }
17
18 __attribute__ ((noipa)) void
19 f_vnx4di (int64_t a, int64_t b, int64_t c, int64_t d, int64_t *out)
20 {
21 vnx4di v = {a, b, c, d};
22 *(vnx4di *) out = v;
23 }
24
25 __attribute__ ((noipa)) void
26 f_vnx8di (int64_t a, int64_t b, int64_t c, int64_t d, int64_t e, int64_t f, int64_t g, int64_t h, int64_t *out)
27 {
28 vnx8di v = {a, b, c, d, e, f, g, h};
29 *(vnx8di *) out = v;
30 }
31
32 __attribute__ ((noipa)) void
33 f_vnx16di (int64_t a, int64_t b, int64_t c, int64_t d, int64_t e, int64_t f,
34 int64_t g, int64_t h, int64_t a2, int64_t b2, int64_t c2, int64_t d2,
35 int64_t e2, int64_t f2, int64_t g2, int64_t h2, int64_t *out)
36 {
37 vnx16di v = {a, b, c, d, e, f, g, h, a2, b2, c2, d2, e2, f2, g2, h2};
38 *(vnx16di *) out = v;
39 }
40
41 /* { dg-final { scan-assembler-times {vslide1down\.vx\tv[0-9]+,\s*v[0-9]+,\s*[a-x0-9]+} 52 } } */