libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-conditional_store_5.c
blob37d60fa76351c13980427751be4450c14617a9a9
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-require-effective-target vect_masked_store } */
5 /* { dg-additional-options "-mavx2" { target avx2 } } */
6 /* { dg-additional-options "-march=armv9-a" { target aarch64-*-* } } */
8 #include <stdbool.h>
10 void foo3 (float *restrict a, int *restrict b, int *restrict c, int n, int stride)
12 if (stride <= 1)
13 return;
15 bool ai = a[0];
17 for (int i = 0; i < n; i++)
19 int res = c[i];
20 int t = b[i+stride];
21 if (ai)
22 t = res;
23 c[i] = t;
27 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
28 /* { dg-final { scan-tree-dump-not "VEC_COND_EXPR " "vect" { target aarch64-*-* } } } */