c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-vec-length-6.h
blob58b151e18f8b0583bafd6dcbe41e9551345d62e3
1 #include "p9-vec-length.h"
3 /* Test the case that the loop which has the same concatenated vectors (same
4 size per iteration) but from 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 * 4] += 3; \
15 b[i * 4 + 1] += 4; \
16 b[i * 4 + 2] += 5; \
17 b[i * 4 + 3] += 6; \
18 } \
21 #define TEST_ALL2(T) \
22 T (int16_t, uint8_t) \
23 T (uint16_t, int8_t) \
24 T (int32_t, uint16_t) \
25 T (uint32_t, int16_t) \
26 T (float, uint16_t) \
27 T (int64_t, float) \
28 T (uint64_t, int32_t) \
29 T (double, uint32_t)
31 TEST_ALL2 (test)