Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/live-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv_zvfh -mabi=ilp32d -fno-vect-cost-model -mrvv-vector-bits=scalable -fdump-tree-optimized-details" } */
3
4 #include <stdint-gcc.h>
5
6 #define EXTRACT_LAST(TYPE) \
7 _Bool __attribute__ ((noipa)) \
8 test_##TYPE (TYPE *restrict x, TYPE *restrict y, int n) \
9 { \
10 _Bool last; \
11 for (int j = 0; j < n; ++j) \
12 { \
13 last = !x[j]; \
14 y[j] = last; \
15 } \
16 return last; \
17 }
18
19 #define TEST_ALL(T) \
20 T (int8_t) \
21 T (int16_t) \
22 T (int32_t) \
23 T (int64_t) \
24 T (uint8_t) \
25 T (uint16_t) \
26 T (uint32_t) \
27 T (uint64_t)
28
29 TEST_ALL (EXTRACT_LAST)
30
31 /* { dg-final { scan-tree-dump-times "\.VEC_EXTRACT" 8 "optimized" } } */