Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / bmi2-bzhi64-1.c
blob33f1748b44e61e91a90d76eb2acdb237d9f93899
1 /* { dg-do run } */
2 /* { dg-options "-O3" } */
3 /* { dg-require-effective-target lp64 } */
4 /* { dg-require-effective-target ppc_cpu_supports_hw } */
6 #define NO_WARN_X86_INTRINSICS 1
7 #include <x86intrin.h>
8 #include "bmi2-check.h"
10 __attribute__((noinline))
11 unsigned long long
12 calc_bzhi_u64 (unsigned long long a, int l)
14 unsigned long long res = a;
15 int i;
16 for (i = 0; i < 64 - l; ++i)
17 res &= ~(1LL << (63 - i));
19 return res;
22 static void
23 bmi2_test ()
25 unsigned i;
26 unsigned long long src = 0xce7ace0ce7ace0ff;
27 unsigned long long res, res_ref;
29 for (i = 0; i < 5; ++i) {
30 src = src * (i + 1);
32 res_ref = calc_bzhi_u64 (src, i * 2);
33 res = _bzhi_u64 (src, i * 2);
35 if (res != res_ref)
36 abort();