Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/slp-14.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 VEC_PERM(TYPE) \
7 void __attribute__ ((noinline, noclone)) \
8 vec_slp_##TYPE (TYPE *restrict a, TYPE *restrict b, int n) \
9 { \
10 for (int i = 0; i < n; ++i) \
11 { \
12 a[i] += 1; \
13 b[i * 4] += 2; \
14 b[i * 4 + 1] += 3; \
15 b[i * 4 + 2] += 4; \
16 b[i * 4 + 3] += 5; \
17 } \
18 }
19
20 #define TEST_ALL(T) \
21 T (int8_t) \
22 T (uint8_t) \
23 T (int16_t) \
24 T (uint16_t) \
25 T (int32_t) \
26 T (uint32_t) \
27 T (int64_t) \
28 T (uint64_t)
29
30 TEST_ALL (VEC_PERM)
31
32 /* This testcase is from aarch64 and floating-point operations are removed.
33 TODO: We will add floating-point operations back and make them as common test in the future. */