PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-114.c
blob557b44110a095ae725b58cf1ca2494a103b96dd7
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 __attribute__ ((noinline)) int
9 main1 (void)
11 int i;
12 float a[N];
13 float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
15 /* Reverse access and forward access. */
16 for (i = N; i > 0; i--)
18 a[N-i] = b[i-1];
21 /* Check results. */
22 for (i = 0; i <N; i++)
24 if (a[i] != b[N-1-i])
25 abort ();
28 return 0;
31 int main (void)
33 check_vect ();
34 return main1 ();
37 /* Requires reverse for SVE, which is implemented by a later patch.
38 Until then we fall back to Advanced SIMD and successfully vectorize
39 the loop. */
40 /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { ! vect_perm } xfail { aarch64_sve && vect_variable_length } } } } */
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */