Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-conditional_store_3.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-require-effective-target vect_masked_store } */
4
5 /* { dg-additional-options "-mavx2" { target avx2 } } */
6 /* { dg-additional-options "-march=armv9-a" { target aarch64-*-* } } */
7
8 void foo3 (float *restrict a, int *restrict b, int *restrict c, int n, int stride)
9 {
10 if (stride <= 1)
11 return;
12
13 for (int i = 0; i < n; i++)
14 {
15 int res = c[i];
16 int t = b[i+stride];
17 if (a[i] >= 0)
18 t = res;
19 c[i] = t;
20 }
21 }
22
23 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
24 /* { dg-final { scan-tree-dump-not "VEC_COND_EXPR " "vect" { target aarch64-*-* } } } */