Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_64-11.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv64gcv_zvfh -mabi=lp64d -fdump-tree-vect-details" } */
3
4 #include <stdint-gcc.h>
5
6 #define TEST_LOOP(DATA_TYPE) \
7 void __attribute__ ((noinline, noclone)) \
8 f_##DATA_TYPE (DATA_TYPE *restrict dest, DATA_TYPE *restrict *src) \
9 { \
10 for (int i = 0; i < 128; ++i) \
11 dest[i] += *src[i]; \
12 }
13
14 #define TEST_ALL(T) \
15 T (int8_t) \
16 T (uint8_t) \
17 T (int16_t) \
18 T (uint16_t) \
19 T (_Float16) \
20 T (int32_t) \
21 T (uint32_t) \
22 T (float) \
23 T (int64_t) \
24 T (uint64_t) \
25 T (double)
26
27 TEST_ALL (TEST_LOOP)
28
29 /* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 11 "vect" } } */
30 /* { dg-final { scan-tree-dump " \.MASK_LEN_GATHER_LOAD" "vect" } } */
31 /* { dg-final { scan-tree-dump-not " \.GATHER_LOAD" "vect" } } */
32 /* { dg-final { scan-tree-dump-not " \.MASK_GATHER_LOAD" "vect" } } */