[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-vec-length-run-1.h
blobb397fd1ac30ec309458240f808300785191e7a4a
1 #include "p9-vec-length-1.h"
3 #define decl(TYPE) \
4 TYPE a_##TYPE[N]; \
5 TYPE b_##TYPE[N]; \
6 TYPE c_##TYPE[N];
8 #define run(TYPE) \
9 { \
10 unsigned int i = 0; \
11 for (i = 0; i < N; i++) \
12 { \
13 a_##TYPE[i] = i * 2 + 1; \
14 b_##TYPE[i] = i % 2 - 2; \
15 } \
16 test##TYPE (); \
17 for (i = 0; i < N; i++) \
18 { \
19 TYPE a1 = i * 2 + 1; \
20 TYPE b1 = i % 2 - 2; \
21 TYPE exp_c = a1 + b1; \
22 if (c_##TYPE[i] != exp_c) \
23 __builtin_abort (); \
24 } \
27 TEST_ALL (decl)
29 int
30 main (void)
32 TEST_ALL (run)
33 return 0;