aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fold-parity-3.c
blob: e0355cca4a54aea48ca6bcef71a08e10b1031688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int foo(unsigned int x)
{
  return __builtin_parity(x&1);
}

int fool(unsigned long x)
{
  return __builtin_parityl(x&1);
}

int fooll(unsigned long long x)
{
  return __builtin_parityll(x&1);
}

/* { dg-final { scan-tree-dump-times "__builtin_parity" 0 "optimized" } } */