Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv64gcv -mabi=lp64d" } */
3
4 #include <stdint-gcc.h>
5
6 typedef int8_t vnx16qi __attribute__ ((vector_size (16)));
7 typedef int8_t vnx32qi __attribute__ ((vector_size (32)));
8 typedef int8_t vnx64qi __attribute__ ((vector_size (64)));
9 typedef int8_t vnx128qi __attribute__ ((vector_size (128)));
10
11 __attribute__ ((noipa)) void
12 f_vnx16qi (int8_t a, int8_t b, int8_t c, int8_t d, int8_t e, int8_t f, int8_t g, int8_t h, int8_t *out)
13 {
14 vnx16qi v = {a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h};
15 *(vnx16qi *) out = v;
16 }
17
18 __attribute__ ((noipa)) void
19 f_vnx32qi (int8_t a, int8_t b, int8_t c, int8_t d, int8_t e, int8_t f, int8_t g, int8_t h, int8_t *out)
20 {
21 vnx32qi v = {a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
22 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h};
23 *(vnx32qi *) out = v;
24 }
25
26 __attribute__ ((noipa)) void
27 f_vnx64qi (int8_t a, int8_t b, int8_t c, int8_t d, int8_t e, int8_t f, int8_t g, int8_t h, int8_t *out)
28 {
29 vnx64qi v = {a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
30 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
31 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
32 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h};
33 *(vnx64qi *) out = v;
34 }
35
36 __attribute__ ((noipa)) void
37 f_vnx128qi (int8_t a, int8_t b, int8_t c, int8_t d, int8_t e, int8_t f, int8_t g, int8_t h, int8_t *out)
38 {
39 vnx128qi v
40 = {a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
41 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
42 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
43 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
44 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
45 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
46 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h,
47 a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h};
48 *(vnx128qi *) out = v;
49 }
50
51 /* { dg-final { scan-assembler-times {vmv\.v\.x\tv[0-9]+,\s*[a-x0-9]+} 4 } } */
52 /* { dg-final { scan-assembler-times {slli} 28 } } */
53 /* { dg-final { scan-assembler-times {or} 28 } } */