summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/vect-shift-1.c
blob: 75070166aae7d2bf2b027c7e65ea618e87b44615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-require-effective-target vect_shift } */

#include <stdarg.h>
#include <signal.h>

extern void abort(void); 

int main ()
{  
  unsigned int A[4] =  {0x08000000,0x08000001,0xff0000ff,0xf0000001};
  unsigned int Answer[4] = {0x01000000,0x01000000,0x01fe0001f,0x1e000000};
  unsigned int B[4];
  int i, j;
  
  for (i=0; i<4; i++)
    B[i] = A[i] >> 3;
  for (i=0; i<4; i++)
    if (B[i] != Answer[i])
      abort ();
  return 0;
}

/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */