aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c
blob: 42e002d06304fb0d918d85b747e4bcda39f18f88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* PR target/57623 */
/* { dg-do assemble { target bmi2 } } */
/* { dg-options "-O2 -mbmi2" } */

#include <x86intrin.h>

unsigned int
f1 (unsigned int x, unsigned int *y)
{
  return _bzhi_u32 (x, *y);
}

unsigned int
f2 (unsigned int *x, unsigned int y)
{
  return _bzhi_u32 (*x, y);
}

#ifdef  __x86_64__
unsigned long long
f3 (unsigned long long x, unsigned long long *y)
{
  return _bzhi_u64 (x, *y);
}

unsigned long long
f4 (unsigned long long *x, unsigned long long y)
{
  return _bzhi_u64 (*x, y);
}
#endif