OSDN Git Service

2008-04-27 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-shift-1.c
1 /* { dg-require-effective-target vect_shift } */
2 /* { dg-require-effective-target vect_int } */
3
4 #include <stdarg.h>
5 #include "tree-vect.h"
6
7 #define N 8
8
9 int main ()
10 {
11   unsigned int A[N] = { 0x08000000, 0x08000001, 0x0ff0000ff, 0xf0000001,
12                         0x08000000, 0x08000001, 0x0ff0000ff, 0xf0000001 };
13   unsigned int B[N] = { 0x01000000, 0x01000000, 0x01fe0001f, 0x1e000000,
14                         0x01000000, 0x01000000, 0x01fe0001f, 0x1e000000 };
15   int i;
16
17   check_vect ();
18
19   for (i = 0; i < N; i++)
20     A[i] = A[i] >> 3;
21
22   /* check results:  */
23   for (i = 0; i < N; i++)
24     if (A[i] != B[i])
25       abort ();
26
27   return 0;
28 }
29
30 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
31 /* { dg-final { cleanup-tree-dump "vect" } } */