3 /* { dg-options "-O3" } */
7 extern void abort (void);
13 #define SET_VEC(size, type) void set_vector_##size (pRINT##size a) \
17 a[i] = (type##_MIN) + (i + 1); \
20 #define SET_RVEC(size, type) void set_rvector_##size (pRINT##size a) \
24 a[i] = type##_MAX - i; \
27 #define CHECK_VEC(size) void check_vector_##size (pRINT##size a, \
40 SET_RVEC (64, LONG_LONG)
42 set_rvector_long (pRLONG a)
46 a[i] = (LONG_MAX) - i;
52 SET_VEC (64, LONG_LONG)
54 set_vector_long (long *__restrict__ a)
58 a[i] = (LONG_MIN) + i + 1;
66 check_vector_long (long *__restrict__ a, long *__restrict__ b)
81 /* abs () from stdlib. */
90 /* abs () from stdlib. */
93 signed char abs_vector_8[N];
94 short abs_vector_16[N];
96 long long abs_vector_64[N];
97 long abs_vector_long[N];
99 /* Set up result vectors. */
100 set_rvector_8 (abs_vector_8);
101 set_rvector_16 (abs_vector_16);
102 set_rvector_32 (abs_vector_32);
103 set_rvector_long (abs_vector_long);
104 set_rvector_64 (abs_vector_64);
111 set_vector_long (blibl);
113 /* Calculate their absolute values. */
114 absolute_s8 (a8, b8);
115 absolute_s16 (a16, b16);
116 absolute_s32 (a32, b32);
117 absolute_s64 (a64, b64);
118 /* abs () from stdlib. */
119 absolute_s32_lib (alib32, b32);
120 absolute_l32_lib (alibl, blibl);
123 check_vector_8 (a8, abs_vector_8);
124 check_vector_16 (a16, abs_vector_16);
125 check_vector_32 (a32, abs_vector_32);
126 check_vector_64 (a64, abs_vector_64);
127 check_vector_32 (alib32, abs_vector_32);
128 check_vector_long (alibl, abs_vector_long);