aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr52631.c
blob: 21b2f3fed95fcc2db097c576770bedb6bf90bea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-fre1-details" } */

unsigned f(unsigned a)
{
#if __SIZEOF_INT__ == 2
  unsigned b = a >> 15;
#else
  unsigned b = a >> 31;
#endif
  return b&1;
}

/* We want to verify that we replace the b & 1 with b.  */
/* { dg-final { scan-tree-dump-times "Replaced b_\[0-9\]+ & 1 with b_\[0-9\]+ in" 1 "fre1"} } */
 
/* { dg-final { cleanup-tree-dump "fre1" } } */