2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O2 -mavx2" } */
5 #include "ssse3-vals.h"
6 #include "avx2-check.h"
8 /* Routine to manually compute the results */
10 compute_pabs256 (int *i1
, short *r
)
12 short *b1
= (short *) i1
;
15 for (i
= 0; i
< 16; i
++)
31 for (i
= 0; i
< 256; ++i
)
33 /* Using only first 2 bytes of int */
34 /* Recompute the results for 256-bits */
35 compute_pabs256 (&vals
[i
], ck
);
37 s
.x
= _mm256_loadu_si256 ((__m256i
*) & vals
[i
]);
39 /* Run the 256-bit tests */
40 d
.x
= _mm256_abs_epi16 (s
.x
);
42 fail
+= check_union256i_w (d
, ck
);