Debian Codegraph @

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

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