Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-conditional_store_5.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 #include <stdbool.h>
9
10 void foo3 (float *restrict a, int *restrict b, int *restrict c, int n, int stride)
11 {
12 if (stride <= 1)
13 return;
14
15 bool ai = a[0];
16
17 for (int i = 0; i < n; i++)
18 {
19 int res = c[i];
20 int t = b[i+stride];
21 if (ai)
22 t = res;
23 c[i] = t;
24 }
25 }
26
27 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
28 /* { dg-final { scan-tree-dump-not "VEC_COND_EXPR " "vect" { target aarch64-*-* } } } */