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