[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-vec-length-4.h
blob0ee7fc84502cae5e6723e479a312446bf164969b
1 #include "p9-vec-length.h"
3 /* Test the case that the loop which has multiple vectors (concatenated vectors)
4 but with same vector type. */
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 } \
23 TEST_ALL (test)