| 1 |
/* { dg-do compile } */ |
| 2 |
/* Pick an arbitrary target for which unaligned accesses are more |
| 3 |
expensive. */ |
| 4 |
/* { dg-options "-Ofast -msve-vector-bits=256 -mtune=thunderx -fno-vect-cost-model" } */ |
| 5 |
|
| 6 |
#define START 1 |
| 7 |
#define END 505 |
| 8 |
|
| 9 |
void __attribute__((noinline, noclone)) |
| 10 |
foo (double *x) |
| 11 |
{ |
| 12 |
double v = 10.0; |
| 13 |
for (unsigned int i = START; i < END; ++i) |
| 14 |
{ |
| 15 |
x[i] = v; |
| 16 |
v += 5.0; |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
/* We should operate on aligned vectors. */ |
| 21 |
/* { dg-final { scan-assembler {\tubfx\t} } } */ |