Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/slp-15.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv -mabi=ilp32d -mrvv-vector-bits=scalable -fno-vect-cost-model" } */
3
4 #include <stdint-gcc.h>
5
6 #define N1 (19 * 2)
7
8 #define VEC_PERM(TYPE) \
9 void __attribute__ ((noinline, noclone)) \
10 vec_slp_##TYPE (TYPE *restrict a, TYPE *restrict b) \
11 { \
12 for (int i = 0; i < N1; ++i) \
13 { \
14 a[i] += 1; \
15 b[i * 4] += 2; \
16 b[i * 4 + 1] += 3; \
17 b[i * 4 + 2] += 4; \
18 b[i * 4 + 3] += 5; \
19 } \
20 }
21
22 #define TEST_ALL(T) \
23 T (int8_t) \
24 T (uint8_t) \
25 T (int16_t) \
26 T (uint16_t) \
27 T (int32_t) \
28 T (uint32_t) \
29 T (int64_t) \
30 T (uint64_t)
31
32 TEST_ALL (VEC_PERM)
33
34 /* This testcase is from aarch64 and floating-point operations are removed.
35 TODO: We will add floating-point operations back and make them as common test in the future. */