aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c
blob: 1dbdca7dfffb074a96dc9324adb587d40fa6a478 (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
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int f(int y, int x)
{
  return x | ((~x) & y);
}
int f1(int y, int x)
{
  return x | (y & (~x));
}
int f2(int y, int x)
{
  return ((~x) & y) | x;
}
int f3(int y, int x)
{
  return (y & (~x)) | x;
}


/* { dg-final { scan-tree-dump-times "~x" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "x_..D. \\\| y_..D." 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */