| 1 |
#include "p9-vec-length.h" |
| 2 |
|
| 3 |
/* Test the case that the loop which has multiple vectors (concatenated vectors) |
| 4 |
but with same vector type. */ |
| 5 |
|
| 6 |
#define test(TYPE) \ |
| 7 |
void __attribute__ ((noinline, noclone)) \ |
| 8 |
test_mv_##TYPE (TYPE *restrict a, TYPE *restrict b, TYPE *restrict c, \ |
| 9 |
int n) \ |
| 10 |
{ \ |
| 11 |
for (int i = 0; i < n; ++i) \ |
| 12 |
{ \ |
| 13 |
a[i] += 1; \ |
| 14 |
b[i * 2] += 2; \ |
| 15 |
b[i * 2 + 1] += 3; \ |
| 16 |
c[i * 4] += 4; \ |
| 17 |
c[i * 4 + 1] += 5; \ |
| 18 |
c[i * 4 + 2] += 6; \ |
| 19 |
c[i * 4 + 3] += 7; \ |
| 20 |
} \ |
| 21 |
} |
| 22 |
|
| 23 |
TEST_ALL (test) |
| 24 |
|