Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_64-9.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv64gcv_zvfh -mabi=lp64d -fdump-tree-vect-details" } */
3 /* For some reason we exceed
4 the default code model's +-2 GiB limits. We should investigate why and
5 add a proper description here. For now just make sure the test case
6 compiles properly. */
7 /* { dg-additional-options "-mcmodel=medany" } */
8
9 #include <stdint-gcc.h>
10
11 #define INDEX64 uint64_t
12
13 #define TEST_LOOP(DATA_TYPE, BITS) \
14 void __attribute__ ((noinline, noclone)) \
15 f_##DATA_TYPE (DATA_TYPE *restrict dest, DATA_TYPE *restrict src, \
16 INDEX##BITS *restrict indices, INDEX##BITS *restrict cond) \
17 { \
18 for (int i = 0; i < 128; ++i) \
19 if (cond[i]) \
20 dest[indices[i]] = src[i] + 1; \
21 }
22
23 #define TEST_ALL(T) \
24 T (int8_t, 64) \
25 T (uint8_t, 64) \
26 T (int16_t, 64) \
27 T (uint16_t, 64) \
28 T (_Float16, 64) \
29 T (int32_t, 64) \
30 T (uint32_t, 64) \
31 T (float, 64) \
32 T (int64_t, 64) \
33 T (uint64_t, 64) \
34 T (double, 64)
35
36 TEST_ALL (TEST_LOOP)
37
38 /* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 11 "vect" } } */
39 /* { dg-final { scan-tree-dump " \.MASK_LEN_SCATTER_STORE" "vect" } } */
40 /* { dg-final { scan-tree-dump-not " \.SCATTER_STORE" "vect" } } */
41 /* { dg-final { scan-tree-dump-not " \.MASK_SCATTER_STORE" "vect" } } */