Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-bswap32.c
blob7f3a915ee97f5730131cbb095343ddda5a38b2d5
1 /* { dg-additional-options "-msse4" { target sse4_runtime } } */
3 #include "tree-vect.h"
5 #define N 128
7 volatile int y = 0;
9 static inline void
10 vfoo32 (unsigned int* a)
12 int i = 0;
13 for (i = 0; i < N; ++i)
14 a[i] = __builtin_bswap32 (a[i]);
17 int
18 main (void)
20 unsigned int arr[N];
21 unsigned int expect[N];
22 int i;
24 check_vect ();
26 for (i = 0; i < N; ++i)
28 arr[i] = i;
29 expect[i] = __builtin_bswap32 (i);
30 if (y) /* Avoid vectorisation. */
31 abort ();
34 vfoo32 (arr);
36 for (i = 0; i < N; ++i)
38 if (arr[i] != expect[i])
39 abort ();
42 return 0;
45 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_bswap || sse4_runtime } } } } */