aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr52631.c
blob: c18a5d570b446e62a8f77baaa6a12f47721bdf3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-forwprop -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"} } */