2 /* { dg-options "-mavx2 -O2" } */
3 /* { dg-require-effective-target avx2 } */
5 #include "avx2-check.h"
8 compute_pmaxuw256 (unsigned short *s1
, unsigned short *s2
, unsigned short *r
)
12 for (i
= 0; i
< 16; i
++)
13 r
[i
] = s1
[i
] > s2
[i
] ? s1
[i
] : s2
[i
];
19 union256i_w s1
, s2
, res
;
20 unsigned short res_ref
[16];
24 for (i
= 0; i
< 10; i
++)
26 for (j
= 0; j
< 16; j
++)
32 res
.x
= _mm256_max_epu16 (s1
.x
, s2
.x
);
34 compute_pmaxuw256 ((unsigned short *) s1
.a
,
35 (unsigned short *) s2
.a
, (unsigned short *) res_ref
);
37 fail
+= check_union256i_w (res
, res_ref
);