| 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 |
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 }; |
| 13 |
|
| 14 |
int main () |
| 15 |
{ |
| 16 |
int i; |
| 17 |
|
| 18 |
check_vect (); |
| 19 |
|
| 20 |
for (i = 0; i < N; i++) |
| 21 |
A[i] = A[i] >> 3; |
| 22 |
|
| 23 |
/* check results: */ |
| 24 |
#pragma GCC novector |
| 25 |
for (i = 0; i < N; i++) |
| 26 |
if (A[i] != B[i]) |
| 27 |
abort (); |
| 28 |
|
| 29 |
return 0; |
| 30 |
} |
| 31 |
|
| 32 |
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ |