1 /* { dg-do run { target { bmi2 } } } */
2 /* { dg-options "-mbmi2 -O2" } */
5 #include "bmi2-check.h"
7 __attribute__((noinline))
9 calc_pdep_u32 (unsigned a, int mask)
14 for (i = 0; i < 32; ++i)
15 if (mask & (1 << i)) {
16 res |= ((a & (1 << k)) >> k) << i;
27 unsigned src = 0xce7acc;
28 unsigned res, res_ref;
30 for (i = 0; i < 5; ++i) {
33 res_ref = calc_pdep_u32 (src, i * 3);
34 res = _pdep_u32 (src, i * 3);