| 1 |
#include "s390-vec-length.h" |
| 2 |
|
| 3 |
/* Test the case loop iteration less than VF. */ |
| 4 |
|
| 5 |
/* For char. */ |
| 6 |
#define N_uint8_t 15 |
| 7 |
#define N_int8_t 15 |
| 8 |
/* For short. */ |
| 9 |
#define N_uint16_t 6 |
| 10 |
#define N_int16_t 6 |
| 11 |
/* For int/float. */ |
| 12 |
#define N_uint32_t 3 |
| 13 |
#define N_int32_t 3 |
| 14 |
#define N_float 3 |
| 15 |
/* For long/double. */ |
| 16 |
#define N_uint64_t 1 |
| 17 |
#define N_int64_t 1 |
| 18 |
#define N_double 1 |
| 19 |
|
| 20 |
#define test(TYPE) \ |
| 21 |
extern TYPE a_##TYPE[N_##TYPE]; \ |
| 22 |
extern TYPE b_##TYPE[N_##TYPE]; \ |
| 23 |
extern TYPE c_##TYPE[N_##TYPE]; \ |
| 24 |
void __attribute__ ((noinline, noclone)) test##TYPE () \ |
| 25 |
{ \ |
| 26 |
unsigned int i = 0; \ |
| 27 |
for (i = 0; i < N_##TYPE; i++) \ |
| 28 |
c_##TYPE[i] = a_##TYPE[i] + b_##TYPE[i]; \ |
| 29 |
} |
| 30 |
|
| 31 |
TEST_ALL (test) |