Debian Codegraph @

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

raw
1 /* Fix for PR119351 alignment peeling with vectors and VLS. */
2 /* { dg-do compile } */
3 /* { dg-options "-Ofast -msve-vector-bits=256 --param aarch64-autovec-preference=sve-only -fdump-tree-vect-details" } */
4
5 #define N 512
6 #define START 1
7 #define END 505
8
9 int x[N] __attribute__((aligned(32)));
10
11 int __attribute__((noipa))
12 foo (void)
13 {
14 for (int *p = x + START; p < x + END; p++)
15 {
16 if (*p == 0)
17 return START;
18 }
19 return -1;
20 }
21
22 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
23 /* Peels using a scalar loop. */
24 /* { dg-final { scan-tree-dump-not "pfa_iv_offset" "vect" } } */
25 /* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" } } */