Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/clastb_1.c

raw
1 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
2 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details --save-temps" } */
3
4 #define N 32
5
6 /* Simple condition reduction. */
7
8 int __attribute__ ((noinline, noclone))
9 condition_reduction (int *a, int min_v)
10 {
11 int last = 66; /* High start value. */
12
13 for (int i = 0; i < N; i++)
14 if (a[i] < min_v)
15 last = i;
16
17 return last;
18 }
19
20 /* { dg-final { scan-tree-dump "operating on partial vectors." "vect" } } */
21 /* { dg-final { scan-assembler {\tclastb\ts[0-9]+, p[0-7], s[0-9]+, z[0-9]+\.s} } } */