[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-vec-length-5.h
blob406daaa3d3e003908ea0f69a07c729a52c5300dd
1 #include "p9-vec-length.h"
3 /* Test the case that the loop which has multiple vectors (concatenated vectors)
4 with different types. */
6 #define test(TYPE1, TYPE2) \
7 void __attribute__ ((noinline, noclone)) \
8 test_mv_##TYPE1##TYPE2 (TYPE1 *restrict a, TYPE2 *restrict b, int n) \
9 { \
10 for (int i = 0; i < n; ++i) \
11 { \
12 a[i * 2] += 1; \
13 a[i * 2 + 1] += 2; \
14 b[i * 2] += 3; \
15 b[i * 2 + 1] += 4; \
16 } \
19 #define TEST_ALL2(T) \
20 T (int8_t, uint16_t) \
21 T (uint8_t, int16_t) \
22 T (int16_t, uint32_t) \
23 T (uint16_t, int32_t) \
24 T (int32_t, double) \
25 T (uint32_t, int64_t) \
26 T (float, uint64_t)
28 TEST_ALL2 (test)