Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / bmi-andn-2.c
blobb9dabbe1bd46573055aa377142ee52ee2ca1085a
1 /* { dg-do run { target bmi } } */
2 /* { dg-options "-O2 -mbmi -fno-inline" } */
4 #include <x86intrin.h>
6 #include "bmi-check.h"
8 long long calc_andn_u32 (int src1, int src2, int dummy)
10 return (~src1+dummy) & (src2);
13 static void
14 bmi_test()
16 unsigned i;
18 int src = 0xfacec0ff;
19 int res, res_ref;
21 for (i=0; i<5; ++i) {
22 src = i + src << i;
24 res_ref = calc_andn_u32 (src, src+i, 0);
25 res = __andn_u32 (src, src+i);
27 if (res != res_ref)
28 abort();