Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/extract_last-11.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv_zvfh -mabi=ilp32d -mrvv-vector-bits=zvl -fno-vect-cost-model -fdump-tree-optimized" } */
3
4 #define N 32
5
6 #ifndef TYPE
7 #define TYPE float
8 #endif
9
10 /* Non-integer data types. */
11
12 TYPE __attribute__ ((noinline, noclone))
13 condition_reduction (TYPE *a, TYPE min_v)
14 {
15 TYPE last = 0;
16
17 for (int i = 0; i < N; i++)
18 if (a[i] < min_v)
19 last = a[i];
20
21 return last;
22 }
23
24 /* { dg-final { scan-tree-dump "\.LEN_FOLD_EXTRACT_LAST" "optimized" } } */