aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c
blob: a1401c0790bf201f43be9b9c48da5688979c9dbc (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" } } */