| 1 |
/* { dg-require-effective-target vect_int } */ |
| 2 |
|
| 3 |
#include "tree-vect.h" |
| 4 |
int arr[2048]; |
| 5 |
int res[100] = { 2148, 2146, 2144, 2142, 2140, 2138, 2136, 2134, 2132, 2130, |
| 6 |
2128, 2126, 2124, 2122, 2120, 2118, 2116, 2114, 2112, 2110, |
| 7 |
2108, 2106, 2104, 2102, 2100, 2098, 2096, 2094, 2092, 2090, |
| 8 |
2088, 2086, 2084, 2082, 2080, 2078, 2076, 2074, 2072, 2070, |
| 9 |
2068, 2066, 2064, 2062, 2060, 2058, 2056, 2054, 3078, 2050}; |
| 10 |
|
| 11 |
__attribute__ ((noinline)) int |
| 12 |
foo (int *a, int *b, int len) |
| 13 |
{ |
| 14 |
int i; |
| 15 |
int *a1 = a; |
| 16 |
int *a0 = a1 - 4; |
| 17 |
for (i = 0; i < len; i++) |
| 18 |
{ |
| 19 |
*b = *a0 + *a1; |
| 20 |
b--; |
| 21 |
a0++; |
| 22 |
a1++; |
| 23 |
} |
| 24 |
return 0; |
| 25 |
} |
| 26 |
|
| 27 |
int main (void) |
| 28 |
{ |
| 29 |
int *a = &arr[1027]; |
| 30 |
int *b = &arr[1024]; |
| 31 |
|
| 32 |
int i; |
| 33 |
for (i = 0; i < 2048; i++) |
| 34 |
arr[i] = i; |
| 35 |
|
| 36 |
foo (a, b, 50); |
| 37 |
|
| 38 |
#pragma GCC novector |
| 39 |
for (i = 975; i < 1025; i++) |
| 40 |
if (arr[i] != res[i - 975]) |
| 41 |
abort (); |
| 42 |
|
| 43 |
return 0; |
| 44 |
} |
| 45 |
|
| 46 |
/* { dg-final { scan-tree-dump "improved number of alias checks from \[0-9\]* to 1" "vect" { target vect_perm } } } */ |