| 1 |
#include <stdarg.h> |
| 2 |
#include "tree-vect.h" |
| 3 |
|
| 4 |
#define N 128 |
| 5 |
|
| 6 |
/* unaligned store. */ |
| 7 |
|
| 8 |
int ib[N+7]; |
| 9 |
|
| 10 |
__attribute__ ((noinline)) |
| 11 |
int main1 () |
| 12 |
{ |
| 13 |
int i; |
| 14 |
int ia[N+1]; |
| 15 |
|
| 16 |
/* The store is aligned and the loads are misaligned with the same |
| 17 |
misalignment. Cost model is disabled. If misaligned stores are supported, |
| 18 |
we peel according to the loads to align them. */ |
| 19 |
for (i = 0; i <= N; i++) |
| 20 |
{ |
| 21 |
ia[i] = ib[i+2] + ib[i+6]; |
| 22 |
} |
| 23 |
|
| 24 |
/* check results: */ |
| 25 |
#pragma GCC novector |
| 26 |
for (i = 1; i <= N; i++) |
| 27 |
{ |
| 28 |
if (ia[i] != ib[i+2] + ib[i+6]) |
| 29 |
abort (); |
| 30 |
} |
| 31 |
|
| 32 |
return 0; |
| 33 |
} |
| 34 |
|
| 35 |
int main (void) |
| 36 |
{ |
| 37 |
int i; |
| 38 |
|
| 39 |
check_vect (); |
| 40 |
|
| 41 |
for (i = 0; i <= N+6; i++) |
| 42 |
{ |
| 43 |
asm volatile ("" : "+r" (i)); |
| 44 |
ib[i] = i; |
| 45 |
} |
| 46 |
|
| 47 |
return main1 (); |
| 48 |
} |
| 49 |
|